diff options
author | blizzz <blizzz@owncloud.com> | 2015-02-09 16:55:50 +0100 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2015-02-09 16:55:50 +0100 |
commit | dc475ab3e0fad65208e64fd53b7bfbb275a97c3a (patch) | |
tree | c6ec0a6b8e525f40b44dc252837b8730c4876d68 /apps | |
parent | 018f9fddafe571cdd04257b438596498a843429e (diff) | |
parent | 2bcb7862143e62932a8d7cb92299a9a49d0fdc31 (diff) | |
download | nextcloud-server-dc475ab3e0fad65208e64fd53b7bfbb275a97c3a.tar.gz nextcloud-server-dc475ab3e0fad65208e64fd53b7bfbb275a97c3a.zip |
Merge pull request #13925 from owncloud/fix-13898
no fruitless count attempts, and notification should disappear
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/ajax/wizard.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/js/settings.js | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index 48bfb56311c..7c4ef3a9a29 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -85,7 +85,7 @@ switch($action) { exit; } } catch (\Exception $e) { - \OCP\JSON::error(array('message' => $e->getMessage())); + \OCP\JSON::error(array('message' => $e->getMessage(), 'code' => $e->getCode())); exit; } \OCP\JSON::error(); diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index b1abb0994ba..768d62a18d1 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -351,7 +351,7 @@ var LdapWizard = { encodeURIComponent($('#ldap_serverconfig_chooser').val()); LdapWizard.showSpinner(spinnerID); - var request = LdapWizard.ajax(param, + LdapWizard.ajax(param, function(result) { LdapWizard.applyChanges(result); LdapWizard.hideSpinner(spinnerID); @@ -360,7 +360,7 @@ var LdapWizard = { } }, function (result) { - OC.Notification.show('Counting the entries failed with, ' + result.message); + OC.Notification.showTemporary('Counting the entries failed with: ' + result.message); LdapWizard.hideSpinner(spinnerID); if(!_.isUndefined(doneCallback)) { doneCallback(method); @@ -371,11 +371,17 @@ var LdapWizard = { }, countGroups: function(doneCallback) { - LdapWizard._countThings('countGroups', '#ldap_group_count', doneCallback); + var groupFilter = $('#ldap_group_filter').val(); + if(!_.isEmpty(groupFilter)) { + LdapWizard._countThings('countGroups', '#ldap_group_count', doneCallback); + } }, countUsers: function(doneCallback) { - LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback); + var userFilter = $('#ldap_userlist_filter').val(); + if(!_.isEmpty(userFilter)) { + LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback); + } }, /** |