Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-05-12 17:35:33 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2016-05-25 17:04:59 +0300
commitaf0a6961b1ae867e354ecf71d61708af9618c44f (patch)
tree6f5805dc9d1055d9be985f69d0b223a8daa15944
parent387019a212224ffbd4300576b9c28e61d5e021a6 (diff)
Move Connection to PSR-4
-rw-r--r--apps/user_ldap/ajax/getConfiguration.php2
-rw-r--r--apps/user_ldap/ajax/setConfiguration.php2
-rw-r--r--apps/user_ldap/ajax/testConfiguration.php2
-rw-r--r--apps/user_ldap/ajax/wizard.php4
-rw-r--r--apps/user_ldap/appinfo/app.php2
-rw-r--r--apps/user_ldap/lib/Command/TestConfig.php2
-rw-r--r--apps/user_ldap/lib/Connection.php (renamed from apps/user_ldap/lib/connection.php)4
-rw-r--r--apps/user_ldap/lib/Proxy.php1
-rw-r--r--apps/user_ldap/lib/User/User.php2
-rw-r--r--apps/user_ldap/lib/access.php5
-rw-r--r--apps/user_ldap/tests/GroupLDAPTest.php6
-rw-r--r--apps/user_ldap/tests/User/ManagerTest.php2
-rw-r--r--apps/user_ldap/tests/User/UserTest.php4
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php6
-rw-r--r--apps/user_ldap/tests/WizardTest.php4
-rw-r--r--apps/user_ldap/tests/access.php6
-rw-r--r--apps/user_ldap/tests/connection.php4
-rw-r--r--apps/user_ldap/tests/integration/abstractintegrationtest.php2
-rw-r--r--apps/user_ldap/tests/integration/lib/IntegrationTestAccessGroupsMatchFilter.php2
19 files changed, 30 insertions, 32 deletions
diff --git a/apps/user_ldap/ajax/getConfiguration.php b/apps/user_ldap/ajax/getConfiguration.php
index 37f780f0eb5..b2c2bc5cbc5 100644
--- a/apps/user_ldap/ajax/getConfiguration.php
+++ b/apps/user_ldap/ajax/getConfiguration.php
@@ -29,5 +29,5 @@ OCP\JSON::callCheck();
$prefix = (string)$_POST['ldap_serverconfig_chooser'];
$ldapWrapper = new OCA\User_LDAP\LDAP();
-$connection = new \OCA\user_ldap\lib\Connection($ldapWrapper, $prefix);
+$connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
OCP\JSON::success(array('configuration' => $connection->getConfiguration()));
diff --git a/apps/user_ldap/ajax/setConfiguration.php b/apps/user_ldap/ajax/setConfiguration.php
index 34d8e4e24ce..964baa81c55 100644
--- a/apps/user_ldap/ajax/setConfiguration.php
+++ b/apps/user_ldap/ajax/setConfiguration.php
@@ -42,7 +42,7 @@ foreach($chkboxes as $boxid) {
}
$ldapWrapper = new OCA\User_LDAP\LDAP();
-$connection = new \OCA\user_ldap\lib\Connection($ldapWrapper, $prefix);
+$connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
$connection->setConfiguration($_POST);
$connection->saveConfiguration();
OCP\JSON::success();
diff --git a/apps/user_ldap/ajax/testConfiguration.php b/apps/user_ldap/ajax/testConfiguration.php
index 840ee2bfe09..0b69dd3af57 100644
--- a/apps/user_ldap/ajax/testConfiguration.php
+++ b/apps/user_ldap/ajax/testConfiguration.php
@@ -31,7 +31,7 @@ OCP\JSON::callCheck();
$l = \OC::$server->getL10N('user_ldap');
$ldapWrapper = new OCA\User_LDAP\LDAP();
-$connection = new \OCA\user_ldap\lib\Connection($ldapWrapper, '', null);
+$connection = new \OCA\User_LDAP\Connection($ldapWrapper, '', null);
//needs to be true, otherwise it will also fail with an irritating message
$_POST['ldap_configuration_active'] = 1;
diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php
index fa42706fac9..1d0f6000666 100644
--- a/apps/user_ldap/ajax/wizard.php
+++ b/apps/user_ldap/ajax/wizard.php
@@ -44,7 +44,7 @@ $prefix = (string)$_POST['ldap_serverconfig_chooser'];
$ldapWrapper = new \OCA\User_LDAP\LDAP();
$configuration = new \OCA\user_ldap\lib\Configuration($prefix);
-$con = new \OCA\user_ldap\lib\Connection($ldapWrapper, '', null);
+$con = new \OCA\User_LDAP\Connection($ldapWrapper, '', null);
$con->setConfiguration($configuration->getConfiguration());
$con->ldapConfigurationActive = true;
$con->setIgnoreValidation(true);
@@ -127,7 +127,7 @@ switch($action) {
}
$configuration->saveConfiguration();
//clear the cache on save
- $connection = new \OCA\user_ldap\lib\Connection($ldapWrapper, $prefix);
+ $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
$connection->clearCache();
OCP\JSON::success();
break;
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php
index e9777b0f985..98eb10080d7 100644
--- a/apps/user_ldap/appinfo/app.php
+++ b/apps/user_ldap/appinfo/app.php
@@ -41,7 +41,7 @@ if(count($configPrefixes) === 1) {
$dbc,
\OC::$server->getUserManager()
);
- $connector = new OCA\user_ldap\lib\Connection($ldapWrapper, $configPrefixes[0]);
+ $connector = new OCA\User_LDAP\Connection($ldapWrapper, $configPrefixes[0]);
$ldapAccess = new OCA\user_ldap\lib\Access($connector, $ldapWrapper, $userManager);
$ldapAccess->setUserMapper(new OCA\User_LDAP\Mapping\UserMapping($dbc));
diff --git a/apps/user_ldap/lib/Command/TestConfig.php b/apps/user_ldap/lib/Command/TestConfig.php
index 656752095cf..93a9f644714 100644
--- a/apps/user_ldap/lib/Command/TestConfig.php
+++ b/apps/user_ldap/lib/Command/TestConfig.php
@@ -28,7 +28,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use \OCA\User_LDAP\Helper;
-use \OCA\user_ldap\lib\Connection;
+use \OCA\User_LDAP\Connection;
class TestConfig extends Command {
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/Connection.php
index f3e39d4fb0b..1cf02a0a898 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/Connection.php
@@ -26,11 +26,9 @@
*
*/
-namespace OCA\user_ldap\lib;
+namespace OCA\User_LDAP;
use OC\ServerNotAvailableException;
-use OCA\User_LDAP\ILDAPWrapper;
-use OCA\User_LDAP\LDAPUtility;
/**
* magic properties (incomplete)
diff --git a/apps/user_ldap/lib/Proxy.php b/apps/user_ldap/lib/Proxy.php
index c51d6473482..d263e9a4383 100644
--- a/apps/user_ldap/lib/Proxy.php
+++ b/apps/user_ldap/lib/Proxy.php
@@ -29,7 +29,6 @@
namespace OCA\User_LDAP;
use OCA\user_ldap\lib\Access;
-use OCA\user_ldap\lib\Connection;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Mapping\GroupMapping;
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index aee644a2b6c..828648906fb 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -24,7 +24,7 @@
namespace OCA\User_LDAP\User;
-use OCA\user_ldap\lib\Connection;
+use OCA\User_LDAP\Connection;
use OCA\User_LDAP\FilesystemHelper;
use OCA\User_LDAP\LogWrapper;
use OCP\IAvatarManager;
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 355ce7c681e..025f5710862 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -37,6 +37,7 @@
namespace OCA\user_ldap\lib;
+use OCA\User_LDAP\Connection;
use OCA\User_LDAP\ILDAPWrapper;
use OCA\User_LDAP\LDAPUtility;
use OCA\User_LDAP\User\IUserTools;
@@ -50,7 +51,7 @@ use OCA\User_LDAP\Mapping\AbstractMapping;
*/
class Access extends LDAPUtility implements IUserTools {
/**
- * @var \OCA\user_ldap\lib\Connection
+ * @var \OCA\User_LDAP\Connection
*/
public $connection;
public $userManager;
@@ -135,7 +136,7 @@ class Access extends LDAPUtility implements IUserTools {
/**
* returns the Connection instance
- * @return \OCA\user_ldap\lib\Connection
+ * @return \OCA\User_LDAP\Connection
*/
public function getConnection() {
return $this->connection;
diff --git a/apps/user_ldap/tests/GroupLDAPTest.php b/apps/user_ldap/tests/GroupLDAPTest.php
index f4185b2ae3a..b8aa4ff5591 100644
--- a/apps/user_ldap/tests/GroupLDAPTest.php
+++ b/apps/user_ldap/tests/GroupLDAPTest.php
@@ -28,7 +28,7 @@ namespace OCA\User_LDAP\Tests;
use OCA\User_LDAP\Group_LDAP as GroupLDAP;
use \OCA\user_ldap\lib\Access;
-use \OCA\user_ldap\lib\Connection;
+use \OCA\User_LDAP\Connection;
/**
* Class GroupLDAPTest
@@ -43,11 +43,11 @@ class GroupLDAPTest extends \Test\TestCase {
static $accMethods;
if(is_null($conMethods) || is_null($accMethods)) {
- $conMethods = get_class_methods('\OCA\user_ldap\lib\Connection');
+ $conMethods = get_class_methods('\OCA\User_LDAP\Connection');
$accMethods = get_class_methods('\OCA\user_ldap\lib\Access');
}
$lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper');
- $connector = $this->getMock('\OCA\user_ldap\lib\Connection',
+ $connector = $this->getMock('\OCA\User_LDAP\Connection',
$conMethods,
array($lw, null, null));
$um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager')
diff --git a/apps/user_ldap/tests/User/ManagerTest.php b/apps/user_ldap/tests/User/ManagerTest.php
index 478cd2aca8c..09eff64b9b1 100644
--- a/apps/user_ldap/tests/User/ManagerTest.php
+++ b/apps/user_ldap/tests/User/ManagerTest.php
@@ -46,7 +46,7 @@ class ManagerTest extends \Test\TestCase {
$dbc = $this->getMock('\OCP\IDBConnection');
$userMgr = $this->getMock('\OCP\IUserManager');
- $connection = new \OCA\user_ldap\lib\Connection(
+ $connection = new \OCA\User_LDAP\Connection(
$lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper'),
'',
null
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php
index 63854685023..9d165c7f29e 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -55,7 +55,7 @@ class UserTest extends \Test\TestCase {
static $umMethods;
if(is_null($conMethods) || is_null($accMethods)) {
- $conMethods = get_class_methods('\OCA\user_ldap\lib\Connection');
+ $conMethods = get_class_methods('\OCA\User_LDAP\Connection');
$accMethods = get_class_methods('\OCA\user_ldap\lib\Access');
//getConnection shall not be replaced
unset($accMethods[array_search('getConnection', $accMethods)]);
@@ -68,7 +68,7 @@ class UserTest extends \Test\TestCase {
}
$um = $this->getMock('\OCA\User_LDAP\User\Manager',
$umMethods, array($cfMock, $fsMock, $logMock, $avaMgr, $im, $dbc, $userMgr));
- $connector = $this->getMock('\OCA\user_ldap\lib\Connection',
+ $connector = $this->getMock('\OCA\User_LDAP\Connection',
$conMethods, array($lw, null, null));
$access = $this->getMock('\OCA\user_ldap\lib\Access',
$accMethods, array($connector, $lw, $um));
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index de634f21315..748b8f83706 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -29,7 +29,7 @@ namespace OCA\User_LDAP\Tests;
use OCA\User_LDAP\User_LDAP as UserLDAP;
use \OCA\user_ldap\lib\Access;
-use \OCA\user_ldap\lib\Connection;
+use \OCA\User_LDAP\Connection;
/**
* Class Test_User_Ldap_Direct
@@ -56,7 +56,7 @@ class User_LDAPTest extends \Test\TestCase {
static $uMethods;
if(is_null($conMethods) || is_null($accMethods)) {
- $conMethods = get_class_methods('\OCA\user_ldap\lib\Connection');
+ $conMethods = get_class_methods('\OCA\User_LDAP\Connection');
$accMethods = get_class_methods('\OCA\user_ldap\lib\Access');
unset($accMethods[array_search('getConnection', $accMethods)]);
$uMethods = get_class_methods('\OCA\User_LDAP\User\User');
@@ -65,7 +65,7 @@ class User_LDAPTest extends \Test\TestCase {
unset($uMethods[array_search('__construct', $uMethods)]);
}
$lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper');
- $connector = $this->getMock('\OCA\user_ldap\lib\Connection',
+ $connector = $this->getMock('\OCA\User_LDAP\Connection',
$conMethods,
array($lw, null, null));
diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php
index f74defa8ae2..f0767ea635a 100644
--- a/apps/user_ldap/tests/WizardTest.php
+++ b/apps/user_ldap/tests/WizardTest.php
@@ -60,7 +60,7 @@ class WizardTest extends \Test\TestCase {
if(is_null($confMethods)) {
$confMethods = get_class_methods('\OCA\user_ldap\lib\Configuration');
- $connMethods = get_class_methods('\OCA\user_ldap\lib\Connection');
+ $connMethods = get_class_methods('\OCA\User_LDAP\Connection');
$accMethods = get_class_methods('\OCA\user_ldap\lib\Access');
}
$lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper');
@@ -68,7 +68,7 @@ class WizardTest extends \Test\TestCase {
$confMethods,
array($lw, null, null));
- $connector = $this->getMock('\OCA\user_ldap\lib\Connection',
+ $connector = $this->getMock('\OCA\User_LDAP\Connection',
$connMethods, array($lw, null, null));
$um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager')
->disableOriginalConstructor()
diff --git a/apps/user_ldap/tests/access.php b/apps/user_ldap/tests/access.php
index bf80ac6af91..1578e0ffad2 100644
--- a/apps/user_ldap/tests/access.php
+++ b/apps/user_ldap/tests/access.php
@@ -26,7 +26,7 @@
namespace OCA\user_ldap\tests;
use \OCA\user_ldap\lib\Access;
-use \OCA\user_ldap\lib\Connection;
+use \OCA\User_LDAP\Connection;
/**
* Class Test_Access
@@ -42,12 +42,12 @@ class Test_Access extends \Test\TestCase {
static $umMethods;
if(is_null($conMethods) || is_null($accMethods)) {
- $conMethods = get_class_methods('\OCA\user_ldap\lib\Connection');
+ $conMethods = get_class_methods('\OCA\User_LDAP\Connection');
$accMethods = get_class_methods('\OCA\user_ldap\lib\Access');
$umMethods = get_class_methods('\OCA\User_LDAP\User\Manager');
}
$lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper');
- $connector = $this->getMock('\OCA\user_ldap\lib\Connection',
+ $connector = $this->getMock('\OCA\User_LDAP\Connection',
$conMethods,
array($lw, null, null));
$um = $this->getMock('\OCA\User_LDAP\User\Manager',
diff --git a/apps/user_ldap/tests/connection.php b/apps/user_ldap/tests/connection.php
index e93009ee8ff..2c87d41cfa1 100644
--- a/apps/user_ldap/tests/connection.php
+++ b/apps/user_ldap/tests/connection.php
@@ -23,7 +23,7 @@
*/
namespace OCA\user_ldap\tests;
-use OCA\user_ldap\lib\Connection;
+use OCA\User_LDAP\Connection;
/**
* Class Test_Connection
@@ -44,7 +44,7 @@ class Test_Connection extends \Test\TestCase {
$this->ldap = $this->getMock('\OCA\User_LDAP\ILDAPWrapper');
// we use a mock here to replace the cache mechanism, due to missing DI in LDAP backend.
- $this->connection = $this->getMockBuilder('OCA\user_ldap\lib\Connection')
+ $this->connection = $this->getMockBuilder('OCA\User_LDAP\Connection')
->setMethods(['getFromCache', 'writeToCache'])
->setConstructorArgs([$this->ldap, '', null])
->getMock();
diff --git a/apps/user_ldap/tests/integration/abstractintegrationtest.php b/apps/user_ldap/tests/integration/abstractintegrationtest.php
index 73b4d6667d7..e5ecad75ba0 100644
--- a/apps/user_ldap/tests/integration/abstractintegrationtest.php
+++ b/apps/user_ldap/tests/integration/abstractintegrationtest.php
@@ -22,7 +22,7 @@
namespace OCA\user_ldap\tests\integration;
use OCA\user_ldap\lib\Access;
-use OCA\user_ldap\lib\Connection;
+use OCA\User_LDAP\Connection;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\User\Manager;
diff --git a/apps/user_ldap/tests/integration/lib/IntegrationTestAccessGroupsMatchFilter.php b/apps/user_ldap/tests/integration/lib/IntegrationTestAccessGroupsMatchFilter.php
index af553c01728..829dc2e0a48 100644
--- a/apps/user_ldap/tests/integration/lib/IntegrationTestAccessGroupsMatchFilter.php
+++ b/apps/user_ldap/tests/integration/lib/IntegrationTestAccessGroupsMatchFilter.php
@@ -21,7 +21,7 @@
namespace OCA\user_ldap\tests\integration\lib;
-use OCA\user_ldap\lib\Connection;
+use OCA\User_LDAP\Connection;
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
require_once __DIR__ . '/../../../../../lib/base.php';