Merge pull request #1726 from nextcloud/fix-symfony-table

symfony replaced table helper by class, fixes two broken LDAP occ com…
This commit is contained in:
Morris Jobke 2016-10-13 12:19:15 +02:00 committed by GitHub
commit 05869e4d22
3 changed files with 4 additions and 3 deletions

View file

@ -304,7 +304,6 @@ class Access extends LDAPUtility implements IUserTools {
} }
/** /**
public function ocname2dn($name, $isUser) {
* returns the internal ownCloud name for the given LDAP DN of the group, false on DN outside of search DN or failure * returns the internal ownCloud name for the given LDAP DN of the group, false on DN outside of search DN or failure
* @param string $fdn the dn of the group object * @param string $fdn the dn of the group object
* @param string $ldapName optional, the display name of the object * @param string $ldapName optional, the display name of the object

View file

@ -26,6 +26,7 @@
namespace OCA\User_LDAP\Command; namespace OCA\User_LDAP\Command;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;
@ -91,7 +92,7 @@ class ShowConfig extends Command {
$configuration = $configHolder->getConfiguration(); $configuration = $configHolder->getConfiguration();
ksort($configuration); ksort($configuration);
$table = $this->getHelperSet()->get('table'); $table = new Table($output);
$table->setHeaders(array('Configuration', $id)); $table->setHeaders(array('Configuration', $id));
$rows = array(); $rows = array();
foreach($configuration as $key => $value) { foreach($configuration as $key => $value) {

View file

@ -26,6 +26,7 @@
namespace OCA\User_LDAP\Command; namespace OCA\User_LDAP\Command;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
@ -64,7 +65,7 @@ class ShowRemnants extends Command {
*/ */
protected function execute(InputInterface $input, OutputInterface $output) { protected function execute(InputInterface $input, OutputInterface $output) {
/** @var \Symfony\Component\Console\Helper\Table $table */ /** @var \Symfony\Component\Console\Helper\Table $table */
$table = $this->getHelperSet()->get('table'); $table = new Table($output);
$table->setHeaders(array( $table->setHeaders(array(
'ownCloud name', 'Display Name', 'LDAP UID', 'LDAP DN', 'Last Login', 'ownCloud name', 'Display Name', 'LDAP UID', 'LDAP DN', 'Last Login',
'Dir', 'Sharer')); 'Dir', 'Sharer'));