]> source.dussan.org Git - nextcloud-server.git/commitdiff
better readbility, no effective changes
authorArthur Schiwon <blizzz@owncloud.com>
Wed, 29 Oct 2014 18:30:49 +0000 (19:30 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Thu, 20 Nov 2014 17:31:40 +0000 (18:31 +0100)
apps/user_ldap/js/ldapFilter.js

index 4db8555f639fa96c5050870b5b76b27553edd4c9..63baec24eccfe7994e36108de7e8bb80992884e6 100644 (file)
@@ -159,17 +159,17 @@ LdapFilter.prototype.findFeatures = function() {
  * resolving the passed status variable will fire up counting
  * @param {object} status an instance of $.Deferred
  */
-LdapFilter.prototype.beforeUpdateCount = function(status) {
-       return LdapWizard.runDetectors(this.target, function() {
+LdapFilter.prototype.beforeUpdateCount = function() {
+       var status = $.Deferred();
+       LdapWizard.runDetectors(this.target, function() {
                status.resolve();
        });
+       return status;
 };
 
 LdapFilter.prototype.updateCount = function(doneCallback) {
-       var beforeUpdateCountDone = $.Deferred();
-       this.beforeUpdateCount(beforeUpdateCountDone);
        var filter = this;
-       $.when(beforeUpdateCountDone).done(function() {
+       $.when(this.beforeUpdateCount()).done(function() {
                if(filter.target === 'User') {
                        LdapWizard.countUsers(doneCallback);
                } else if (filter.target === 'Group') {