summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-05-12 16:28:21 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2016-05-25 16:04:58 +0200
commit7db6b487f5b2a49abaa1f233367f12ce4c99de89 (patch)
treeac055b4cf67e4c54bc1c273493d636e65f22471f
parent391531851cb73d7f6e7f989f481772f09f9f00a6 (diff)
downloadnextcloud-server-7db6b487f5b2a49abaa1f233367f12ce4c99de89.tar.gz
nextcloud-server-7db6b487f5b2a49abaa1f233367f12ce4c99de89.zip
Move Helper to PSR-4
-rw-r--r--apps/user_ldap/ajax/deleteConfiguration.php2
-rw-r--r--apps/user_ldap/ajax/getNewServerConfigPrefix.php2
-rw-r--r--apps/user_ldap/appinfo/app.php4
-rw-r--r--apps/user_ldap/appinfo/register_command.php2
-rw-r--r--apps/user_ldap/lib/Command/CheckUser.php4
-rw-r--r--apps/user_ldap/lib/Command/CreateEmptyConfig.php4
-rw-r--r--apps/user_ldap/lib/Command/DeleteConfig.php4
-rw-r--r--apps/user_ldap/lib/Command/Search.php2
-rw-r--r--apps/user_ldap/lib/Command/SetConfig.php2
-rw-r--r--apps/user_ldap/lib/Command/ShowConfig.php4
-rw-r--r--apps/user_ldap/lib/Command/TestConfig.php2
-rw-r--r--apps/user_ldap/lib/Helper.php (renamed from apps/user_ldap/lib/helper.php)4
-rw-r--r--apps/user_ldap/lib/Jobs/CleanUp.php2
-rw-r--r--apps/user_ldap/lib/Wizard.php1
-rw-r--r--apps/user_ldap/settings.php2
-rw-r--r--apps/user_ldap/tests/jobs/cleanup.php2
16 files changed, 20 insertions, 23 deletions
diff --git a/apps/user_ldap/ajax/deleteConfiguration.php b/apps/user_ldap/ajax/deleteConfiguration.php
index 780a4bc35d0..80b73cb82f9 100644
--- a/apps/user_ldap/ajax/deleteConfiguration.php
+++ b/apps/user_ldap/ajax/deleteConfiguration.php
@@ -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 {
diff --git a/apps/user_ldap/ajax/getNewServerConfigPrefix.php b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
index df85d99f2c7..3820c05d9d6 100644
--- a/apps/user_ldap/ajax/getNewServerConfigPrefix.php
+++ b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
@@ -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);
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php
index a6c766f2612..28b38594494 100644
--- a/apps/user_ldap/appinfo/app.php
+++ b/apps/user_ldap/appinfo/app.php
@@ -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'
);
diff --git a/apps/user_ldap/appinfo/register_command.php b/apps/user_ldap/appinfo/register_command.php
index daddad7dda4..6ed6325e197 100644
--- a/apps/user_ldap/appinfo/register_command.php
+++ b/apps/user_ldap/appinfo/register_command.php
@@ -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;
diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php
index f26b2f4546b..43de421de6a 100644
--- a/apps/user_ldap/lib/Command/CheckUser.php
+++ b/apps/user_ldap/lib/Command/CheckUser.php
@@ -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 */
diff --git a/apps/user_ldap/lib/Command/CreateEmptyConfig.php b/apps/user_ldap/lib/Command/CreateEmptyConfig.php
index 9ce665e049c..779dbbc6fd5 100644
--- a/apps/user_ldap/lib/Command/CreateEmptyConfig.php
+++ b/apps/user_ldap/lib/Command/CreateEmptyConfig.php
@@ -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;
/**
diff --git a/apps/user_ldap/lib/Command/DeleteConfig.php b/apps/user_ldap/lib/Command/DeleteConfig.php
index 5a7986d1303..a56753daddc 100644
--- a/apps/user_ldap/lib/Command/DeleteConfig.php
+++ b/apps/user_ldap/lib/Command/DeleteConfig.php
@@ -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;
/**
diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php
index 77c0271a708..795530e2044 100644
--- a/apps/user_ldap/lib/Command/Search.php
+++ b/apps/user_ldap/lib/Command/Search.php
@@ -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;
diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php
index 7e2e2f19f66..d9308c0afd4 100644
--- a/apps/user_ldap/lib/Command/SetConfig.php
+++ b/apps/user_ldap/lib/Command/SetConfig.php
@@ -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 {
diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php
index ea0ad3fed05..91904ca8380 100644
--- a/apps/user_ldap/lib/Command/ShowConfig.php
+++ b/apps/user_ldap/lib/Command/ShowConfig.php
@@ -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;
/**
diff --git a/apps/user_ldap/lib/Command/TestConfig.php b/apps/user_ldap/lib/Command/TestConfig.php
index aa369f1a421..656752095cf 100644
--- a/apps/user_ldap/lib/Command/TestConfig.php
+++ b/apps/user_ldap/lib/Command/TestConfig.php
@@ -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 {
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/Helper.php
index c0900f54a62..aa6d6aa1bce 100644
--- a/apps/user_ldap/lib/helper.php
+++ b/apps/user_ldap/lib/Helper.php
@@ -25,9 +25,7 @@
*
*/
-namespace OCA\user_ldap\lib;
-
-use OCA\User_LDAP\User_Proxy;
+namespace OCA\User_LDAP;
class Helper {
diff --git a/apps/user_ldap/lib/Jobs/CleanUp.php b/apps/user_ldap/lib/Jobs/CleanUp.php
index 3bbf897ea19..45669a278ba 100644
--- a/apps/user_ldap/lib/Jobs/CleanUp.php
+++ b/apps/user_ldap/lib/Jobs/CleanUp.php
@@ -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;
diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php
index a94d3174c4e..c565b5bdc43 100644
--- a/apps/user_ldap/lib/Wizard.php
+++ b/apps/user_ldap/lib/Wizard.php
@@ -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;
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 9d54684685a..3bb9689d290 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -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();
diff --git a/apps/user_ldap/tests/jobs/cleanup.php b/apps/user_ldap/tests/jobs/cleanup.php
index f19c7cd8858..18d46071172 100644
--- a/apps/user_ldap/tests/jobs/cleanup.php
+++ b/apps/user_ldap/tests/jobs/cleanup.php
@@ -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;
}