mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Move Configuration to PSR-4
This commit is contained in:
parent
af0a6961b1
commit
aa7b600383
10 changed files with 14 additions and 15 deletions
|
|
@ -34,12 +34,12 @@ $nk = 's'.str_pad($ln+1, 2, '0', STR_PAD_LEFT);
|
|||
|
||||
$resultData = array('configPrefix' => $nk);
|
||||
|
||||
$newConfig = new \OCA\user_ldap\lib\Configuration($nk, false);
|
||||
$newConfig = new \OCA\User_LDAP\Configuration($nk, false);
|
||||
if(isset($_POST['copyConfig'])) {
|
||||
$originalConfig = new \OCA\user_ldap\lib\Configuration($_POST['copyConfig']);
|
||||
$originalConfig = new \OCA\User_LDAP\Configuration($_POST['copyConfig']);
|
||||
$newConfig->setConfiguration($originalConfig->getConfiguration());
|
||||
} else {
|
||||
$configuration = new \OCA\user_ldap\lib\Configuration($nk, false);
|
||||
$configuration = new \OCA\User_LDAP\Configuration($nk, false);
|
||||
$newConfig->setConfiguration($configuration->getDefaults());
|
||||
$resultData['defaults'] = $configuration->getDefaults();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ if(!isset($_POST['ldap_serverconfig_chooser'])) {
|
|||
$prefix = (string)$_POST['ldap_serverconfig_chooser'];
|
||||
|
||||
$ldapWrapper = new \OCA\User_LDAP\LDAP();
|
||||
$configuration = new \OCA\user_ldap\lib\Configuration($prefix);
|
||||
$configuration = new \OCA\User_LDAP\Configuration($prefix);
|
||||
|
||||
$con = new \OCA\User_LDAP\Connection($ldapWrapper, '', null);
|
||||
$con->setConfiguration($configuration->getConfiguration());
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use Symfony\Component\Console\Command\Command;
|
|||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use \OCA\User_LDAP\Helper;
|
||||
use \OCA\user_ldap\lib\Configuration;
|
||||
use \OCA\User_LDAP\Configuration;
|
||||
|
||||
class CreateEmptyConfig extends Command {
|
||||
/** @var \OCA\User_LDAP\Helper */
|
||||
|
|
|
|||
|
|
@ -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\Configuration;
|
||||
use OCA\User_LDAP\Configuration;
|
||||
|
||||
class SetConfig extends Command {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ 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\Helper;
|
||||
use \OCA\user_ldap\lib\Configuration;
|
||||
use OCA\User_LDAP\Helper;
|
||||
use OCA\User_LDAP\Configuration;
|
||||
|
||||
class ShowConfig extends Command {
|
||||
/** @var \OCA\User_LDAP\Helper */
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\lib;
|
||||
namespace OCA\User_LDAP;
|
||||
|
||||
/**
|
||||
* @property int ldapPagingSize holds an integer
|
||||
|
|
@ -33,7 +33,6 @@ namespace OCA\User_LDAP;
|
|||
|
||||
use OC\ServerNotAvailableException;
|
||||
use OCA\user_ldap\lib\Access;
|
||||
use OCA\user_ldap\lib\Configuration;
|
||||
|
||||
class Wizard extends LDAPUtility {
|
||||
static protected $l;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ $tmpl->assign('toc', $toc);
|
|||
$tmpl->assign('settingControls', $sControls);
|
||||
|
||||
// assign default values
|
||||
$config = new \OCA\user_ldap\lib\Configuration('', false);
|
||||
$config = new \OCA\User_LDAP\Configuration('', false);
|
||||
$defaults = $config->getDefaults();
|
||||
foreach($defaults as $key => $default) {
|
||||
$tmpl->assign($key.'_default', $default);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use \OCA\User_LDAP\Wizard;
|
|||
|
||||
// use \OCA\User_LDAP\User_LDAP as UserLDAP;
|
||||
// use \OCA\user_ldap\lib\Access;
|
||||
// use \OCA\user_ldap\lib\Configuration;
|
||||
// use \OCA\User_LDAP\Configuration;
|
||||
// use \OCA\User_LDAP\ILDAPWrapper;
|
||||
|
||||
/**
|
||||
|
|
@ -59,12 +59,12 @@ class WizardTest extends \Test\TestCase {
|
|||
static $accMethods;
|
||||
|
||||
if(is_null($confMethods)) {
|
||||
$confMethods = get_class_methods('\OCA\user_ldap\lib\Configuration');
|
||||
$confMethods = get_class_methods('\OCA\User_LDAP\Configuration');
|
||||
$connMethods = get_class_methods('\OCA\User_LDAP\Connection');
|
||||
$accMethods = get_class_methods('\OCA\user_ldap\lib\Access');
|
||||
}
|
||||
$lw = $this->getMock('\OCA\User_LDAP\ILDAPWrapper');
|
||||
$conf = $this->getMock('\OCA\user_ldap\lib\Configuration',
|
||||
$conf = $this->getMock('\OCA\User_LDAP\Configuration',
|
||||
$confMethods,
|
||||
array($lw, null, null));
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class Test_Configuration extends \Test\TestCase {
|
|||
* @dataProvider configurationDataProvider
|
||||
*/
|
||||
public function testSetValue($key, $input, $expected) {
|
||||
$configuration = new \OCA\user_ldap\lib\Configuration('t01', false);
|
||||
$configuration = new \OCA\User_LDAP\Configuration('t01', false);
|
||||
|
||||
$settingsInput = array(
|
||||
'ldapBaseUsers' => array(
|
||||
|
|
|
|||
Loading…
Reference in a new issue