diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-01-24 22:39:05 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-01-24 22:39:05 +0100 |
commit | 2749a14171ee7ce32085cc2d0edbfcd5490d2ca3 (patch) | |
tree | 3ee167082c5ba0a34148bc866b942331de7f69bb /apps/user_ldap/appinfo | |
parent | 6bc72569666ac5fc8063a4b6233fb25a8ec94060 (diff) | |
download | nextcloud-server-2749a14171ee7ce32085cc2d0edbfcd5490d2ca3.tar.gz nextcloud-server-2749a14171ee7ce32085cc2d0edbfcd5490d2ca3.zip |
LDAP: make it possible to enable/disable server configurations
Diffstat (limited to 'apps/user_ldap/appinfo')
-rw-r--r-- | apps/user_ldap/appinfo/app.php | 10 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/update.php | 14 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/version | 2 |
3 files changed, 18 insertions, 8 deletions
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 79cfab58796..dec87684c9e 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -23,7 +23,7 @@ OCP\App::registerAdmin('user_ldap', 'settings'); -$configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(); +$configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true); if(count($configPrefixes) == 1) { $connector = new OCA\user_ldap\lib\Connection($configPrefixes[0]); $userBackend = new OCA\user_ldap\USER_LDAP(); @@ -35,9 +35,11 @@ if(count($configPrefixes) == 1) { $groupBackend = new OCA\user_ldap\Group_Proxy($configPrefixes); } -// register user backend -OC_User::useBackend($userBackend); -OC_Group::useBackend($groupBackend); +if(count($configPrefixes) > 0) { + // register user backend + OC_User::useBackend($userBackend); + OC_Group::useBackend($groupBackend); +} // add settings page to navigation $entry = array( diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index 9b54ba18b6c..11e19289918 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -22,12 +22,10 @@ if($state == 'unset') { OCP\Config::setSystemValue('ldapIgnoreNamingRules', false); } -// ### SUPPORTED upgrade path starts here ### - //from version 0.2 to 0.3 (0.2.0.x dev version) $objects = array('user', 'group'); -$connector = new \OCA\user_ldap\lib\Connection('user_ldap'); +$connector = new \OCA\user_ldap\lib\Connection(); $userBE = new \OCA\user_ldap\USER_LDAP(); $userBE->setConnector($connector); $groupBE = new \OCA\user_ldap\GROUP_LDAP(); @@ -80,3 +78,13 @@ function escapeDN($dn) { return $dn; } + + +// SUPPORTED UPGRADE FROM Version 0.3 (ownCloud 4.5) to 0.4 (ownCloud 5) + +if(!isset($connector)) { + $connector = new \OCA\user_ldap\lib\Connection(); +} +//it is required, that connections do habe ldap_configuration_active setting stored in the database +$connector->getConfiguration(); +$connector->saveConfiguration();
\ No newline at end of file diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version index b1a5f4781d1..705e30728e0 100644 --- a/apps/user_ldap/appinfo/version +++ b/apps/user_ldap/appinfo/version @@ -1 +1 @@ -0.3.0.1
\ No newline at end of file +0.3.9.0
\ No newline at end of file |