diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-05-14 15:27:23 +0400 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-05-14 15:27:23 +0400 |
commit | 313324a7b459b59aefaca4fe1b648489971cdad2 (patch) | |
tree | 27aeb1f5947b84fad90ee02db3a649fe8c462d9c /apps/user_ldap | |
parent | c18f2943d523f7be5bb76100ebe8e5741aa932e7 (diff) |
bump version and don't overwrite values on next update if not necessary
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/appinfo/update.php | 33 | ||||
-rw-r--r-- | apps/user_ldap/appinfo/version | 2 |
2 files changed, 22 insertions, 13 deletions
diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index 8bf532fe3a3..47cc566b360 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -17,19 +17,28 @@ $configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true) $ldap = new OCA\user_ldap\lib\LDAP(); foreach($configPrefixes as $config) { $connection = new OCA\user_ldap\lib\Connection($ldap, $config); - $value = \OCP\Config::getAppValue('user_ldap', - $config.'ldap_uuid_attribute', 'auto'); - \OCP\Config::setAppValue('user_ldap', - $config.'ldap_uuid_user_attribute', $value); - \OCP\Config::setAppValue('user_ldap', - $config.'ldap_uuid_group_attribute', $value); - $value = \OCP\Config::getAppValue('user_ldap', - $config.'ldap_expert_uuid_attr', 'auto'); - \OCP\Config::setAppValue('user_ldap', - $config.'ldap_expert_uuid_user_attr', $value); - \OCP\Config::setAppValue('user_ldap', - $config.'ldap_expert_uuid_group_attr', $value); + $state = \OCP\Config::getAppValue( + 'user_ldap', $config.'ldap_uuid_user_attribute', 'not existing'); + if($state === 'non existing') { + $value = \OCP\Config::getAppValue( + 'user_ldap', $config.'ldap_uuid_attribute', 'auto'); + \OCP\Config::setAppValue( + 'user_ldap', $config.'ldap_uuid_user_attribute', $value); + \OCP\Config::setAppValue( + 'user_ldap', $config.'ldap_uuid_group_attribute', $value); + } + + $state = \OCP\Config::getAppValue( + 'user_ldap', $config.'ldap_expert_uuid_user_attr', 'not existing'); + if($state === 'non existing') { + $value = \OCP\Config::getAppValue( + 'user_ldap', $config.'ldap_expert_uuid_attr', 'auto'); + \OCP\Config::setAppValue( + 'user_ldap', $config.'ldap_expert_uuid_user_attr', $value); + \OCP\Config::setAppValue( + 'user_ldap', $config.'ldap_expert_uuid_group_attr', $value); + } if($enableRawMode) { \OCP\Config::setAppValue('user_ldap', $config.'ldap_user_filter_mode', 1); diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version index 44bb5d1f743..2b7c5ae0184 100644 --- a/apps/user_ldap/appinfo/version +++ b/apps/user_ldap/appinfo/version @@ -1 +1 @@ -0.4.1
\ No newline at end of file +0.4.2 |