[Pkg-owncloud-commits] [owncloud] 10/215: save configs when requesting a config ID. They are empty, but avoid configID collisioning when creating many new configs in the wizard without saving anything directly.

David Prévot taffit at moszumanska.debian.org
Tue May 5 01:01:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 52025e98399e290931b14796c3f4746901ecde91
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Tue Apr 21 13:20:31 2015 +0200

    save configs when requesting a config ID. They are empty, but avoid configID collisioning when creating many new configs in the wizard without saving anything directly.
---
 apps/user_ldap/ajax/getNewServerConfigPrefix.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/user_ldap/ajax/getNewServerConfigPrefix.php b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
index d013591..aa97b18 100644
--- a/apps/user_ldap/ajax/getNewServerConfigPrefix.php
+++ b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
@@ -35,14 +35,14 @@ $nk = 's'.str_pad($ln+1, 2, '0', STR_PAD_LEFT);
 
 $resultData = array('configPrefix' => $nk);
 
+$newConfig = new \OCA\user_ldap\lib\Configuration($nk, false);
 if(isset($_POST['copyConfig'])) {
 	$originalConfig = new \OCA\user_ldap\lib\Configuration($_POST['copyConfig']);
-	$newConfig = new \OCA\user_ldap\lib\Configuration($nk, false);
 	$newConfig->setConfiguration($originalConfig->getConfiguration());
-	$newConfig->saveConfiguration();
 } else {
 	$configuration = new \OCA\user_ldap\lib\Configuration($nk, false);
 	$resultData['defaults'] = $configuration->getDefaults();
 }
+$newConfig->saveConfiguration();
 
 OCP\JSON::success($resultData);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list