summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/appinfo/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/appinfo/update.php')
-rw-r--r--apps/user_ldap/appinfo/update.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php
index 9b54ba18b6c..f9681e38e68 100644
--- a/apps/user_ldap/appinfo/update.php
+++ b/apps/user_ldap/appinfo/update.php
@@ -5,7 +5,7 @@
//ATTENTION
//Upgrade from ownCloud 3 (LDAP backend 0.1) to ownCloud 4.5 (LDAP backend 0.3) is not supported!!
//You must do upgrade to ownCloud 4.0 first!
-//The upgrade stuff in the section from 0.1 to 0.2 is just to minimize the bad efffects.
+//The upgrade stuff in the section from 0.1 to 0.2 is just to minimize the bad effects.
//settings
$pw = OCP\Config::getAppValue('user_ldap', 'ldap_password');
@@ -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 have ldap_configuration_active setting stored in the database
+$connector->getConfiguration();
+$connector->saveConfiguration(); \ No newline at end of file