Move Helper to PSR-4
This commit is contained in:
parent
391531851c
commit
7db6b487f5
|
@ -30,7 +30,7 @@ OCP\JSON::checkAppEnabled('user_ldap');
|
|||
OCP\JSON::callCheck();
|
||||
|
||||
$prefix = (string)$_POST['ldap_serverconfig_chooser'];
|
||||
$helper = new \OCA\user_ldap\lib\Helper();
|
||||
$helper = new \OCA\User_LDAP\Helper();
|
||||
if($helper->deleteServerConfiguration($prefix)) {
|
||||
OCP\JSON::success();
|
||||
} else {
|
||||
|
|
|
@ -25,7 +25,7 @@ OCP\JSON::checkAdminUser();
|
|||
OCP\JSON::checkAppEnabled('user_ldap');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$helper = new \OCA\user_ldap\lib\Helper();
|
||||
$helper = new \OCA\User_LDAP\Helper();
|
||||
$serverConnections = $helper->getServerConfigurationPrefixes();
|
||||
sort($serverConnections);
|
||||
$lk = array_pop($serverConnections);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
OCP\App::registerAdmin('user_ldap', 'settings');
|
||||
|
||||
$helper = new \OCA\user_ldap\lib\Helper();
|
||||
$helper = new \OCA\User_LDAP\Helper();
|
||||
$configPrefixes = $helper->getServerConfigurationPrefixes(true);
|
||||
$ldapWrapper = new OCA\User_LDAP\LDAP();
|
||||
$ocConfig = \OC::$server->getConfig();
|
||||
|
@ -64,7 +64,7 @@ if(count($configPrefixes) > 0) {
|
|||
\OCP\Util::connectHook(
|
||||
'\OCA\Files_Sharing\API\Server2Server',
|
||||
'preLoginNameUsedAsUserName',
|
||||
'\OCA\user_ldap\lib\Helper',
|
||||
'\OCA\User_LDAP\Helper',
|
||||
'loginName2UserName'
|
||||
);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use OCA\user_ldap\lib\Helper;
|
||||
use OCA\User_LDAP\Helper;
|
||||
use OCA\User_LDAP\LDAP;
|
||||
use OCA\User_LDAP\User_Proxy;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
|
|
|
@ -30,14 +30,14 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
|
||||
use OCA\User_LDAP\User\DeletedUsersIndex;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\user_ldap\lib\Helper as LDAPHelper;
|
||||
use OCA\User_LDAP\Helper as LDAPHelper;
|
||||
use OCA\User_LDAP\User_Proxy;
|
||||
|
||||
class CheckUser extends Command {
|
||||
/** @var \OCA\User_LDAP\User_Proxy */
|
||||
protected $backend;
|
||||
|
||||
/** @var \OCA\User_LDAP\lib\Helper */
|
||||
/** @var \OCA\User_LDAP\Helper */
|
||||
protected $helper;
|
||||
|
||||
/** @var \OCA\User_LDAP\User\DeletedUsersIndex */
|
||||
|
|
|
@ -26,11 +26,11 @@ namespace OCA\User_LDAP\Command;
|
|||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use \OCA\user_ldap\lib\Helper;
|
||||
use \OCA\User_LDAP\Helper;
|
||||
use \OCA\user_ldap\lib\Configuration;
|
||||
|
||||
class CreateEmptyConfig extends Command {
|
||||
/** @var \OCA\User_LDAP\lib\Helper */
|
||||
/** @var \OCA\User_LDAP\Helper */
|
||||
protected $helper;
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,10 +27,10 @@ use Symfony\Component\Console\Command\Command;
|
|||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use \OCA\user_ldap\lib\Helper;
|
||||
use \OCA\User_LDAP\Helper;
|
||||
|
||||
class DeleteConfig extends Command {
|
||||
/** @var \OCA\User_LDAP\lib\Helper */
|
||||
/** @var \OCA\User_LDAP\Helper */
|
||||
protected $helper;
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
|
||||
use OCA\User_LDAP\User_Proxy;
|
||||
use OCA\User_LDAP\Group_Proxy;
|
||||
use OCA\user_ldap\lib\Helper;
|
||||
use OCA\User_LDAP\Helper;
|
||||
use OCA\User_LDAP\LDAP;
|
||||
use OCP\IConfig;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ use Symfony\Component\Console\Command\Command;
|
|||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use \OCA\user_ldap\lib\Helper;
|
||||
use OCA\User_LDAP\Helper;
|
||||
use \OCA\user_ldap\lib\Configuration;
|
||||
|
||||
class SetConfig extends Command {
|
||||
|
|
|
@ -28,11 +28,11 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use \OCA\user_ldap\lib\Helper;
|
||||
use \OCA\User_LDAP\Helper;
|
||||
use \OCA\user_ldap\lib\Configuration;
|
||||
|
||||
class ShowConfig extends Command {
|
||||
/** @var \OCA\User_LDAP\lib\Helper */
|
||||
/** @var \OCA\User_LDAP\Helper */
|
||||
protected $helper;
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,7 +27,7 @@ use Symfony\Component\Console\Command\Command;
|
|||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use \OCA\user_ldap\lib\Helper;
|
||||
use \OCA\User_LDAP\Helper;
|
||||
use \OCA\user_ldap\lib\Connection;
|
||||
|
||||
class TestConfig extends Command {
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\lib;
|
||||
|
||||
use OCA\User_LDAP\User_Proxy;
|
||||
namespace OCA\User_LDAP;
|
||||
|
||||
class Helper {
|
||||
|
|
@ -25,7 +25,7 @@ namespace OCA\User_LDAP\Jobs;
|
|||
use \OC\BackgroundJob\TimedJob;
|
||||
use \OCA\user_ldap\User_LDAP;
|
||||
use \OCA\User_LDAP\User_Proxy;
|
||||
use \OCA\user_ldap\lib\Helper;
|
||||
use \OCA\User_LDAP\Helper;
|
||||
use \OCA\User_LDAP\LDAP;
|
||||
use \OCA\User_LDAP\User\DeletedUsersIndex;
|
||||
use \OCA\User_LDAP\Mapping\UserMapping;
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace OCA\User_LDAP;
|
|||
use OC\ServerNotAvailableException;
|
||||
use OCA\user_ldap\lib\Access;
|
||||
use OCA\user_ldap\lib\Configuration;
|
||||
use OCA\user_ldap\lib\Helper;
|
||||
|
||||
class Wizard extends LDAPUtility {
|
||||
static protected $l;
|
||||
|
|
|
@ -31,7 +31,7 @@ OC_Util::checkAdminUser();
|
|||
// fill template
|
||||
$tmpl = new OCP\Template('user_ldap', 'settings');
|
||||
|
||||
$helper = new \OCA\user_ldap\lib\Helper();
|
||||
$helper = new \OCA\User_LDAP\Helper();
|
||||
$prefixes = $helper->getServerConfigurationPrefixes();
|
||||
$hosts = $helper->getServerConfigurationHosts();
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Test_CleanUp extends \PHPUnit_Framework_TestCase {
|
|||
->getMock();
|
||||
$mocks['ocConfig'] = $this->getMock('\OCP\IConfig');
|
||||
$mocks['db'] = $this->getMock('\OCP\IDBConnection');
|
||||
$mocks['helper'] = $this->getMock('\OCA\user_ldap\lib\Helper');
|
||||
$mocks['helper'] = $this->getMock('\OCA\User_LDAP\Helper');
|
||||
|
||||
return $mocks;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue