Browse Source
Switch user:report from deprecated tablehelper to table
pull/1210/head
Roeland Jago Douma
10 years ago
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with
3 additions and
3 deletions
-
core/Command/User/Report.php
|
|
|
@ -27,6 +27,7 @@ namespace OC\Core\Command\User; |
|
|
|
|
|
|
|
use OCP\IUserManager; |
|
|
|
use Symfony\Component\Console\Command\Command; |
|
|
|
use Symfony\Component\Console\Helper\Table; |
|
|
|
use Symfony\Component\Console\Input\InputInterface; |
|
|
|
use Symfony\Component\Console\Output\OutputInterface; |
|
|
|
|
|
|
|
@ -49,8 +50,7 @@ class Report extends Command { |
|
|
|
} |
|
|
|
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output) { |
|
|
|
/** @var \Symfony\Component\Console\Helper\TableHelper $table */ |
|
|
|
$table = $this->getHelperSet()->get('table'); |
|
|
|
$table = new Table($output); |
|
|
|
$table->setHeaders(array('User Report', '')); |
|
|
|
$userCountArray = $this->countUsers(); |
|
|
|
if(!empty($userCountArray)) { |
|
|
|
@ -72,7 +72,7 @@ class Report extends Command { |
|
|
|
$rows[] = array('user directories', $userDirectoryCount); |
|
|
|
|
|
|
|
$table->setRows($rows); |
|
|
|
$table->render($output); |
|
|
|
$table->render(); |
|
|
|
} |
|
|
|
|
|
|
|
private function countUsers() { |
|
|
|
|