summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-01-08 17:45:07 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-01-08 17:45:07 +0100
commitc1a79d24c54d3c1d6ecb2c65540f9b52a3d6dc31 (patch)
tree233b331e714ce90c8d86194d104fb73868a1677f /apps/user_ldap
parentc7f273040e9e2e200bbe458d89114a98464c3355 (diff)
downloadnextcloud-server-c1a79d24c54d3c1d6ecb2c65540f9b52a3d6dc31.tar.gz
nextcloud-server-c1a79d24c54d3c1d6ecb2c65540f9b52a3d6dc31.zip
fix order of initalizing instance properties, and paremeter order in a method call
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/jobs/cleanup.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/apps/user_ldap/lib/jobs/cleanup.php b/apps/user_ldap/lib/jobs/cleanup.php
index 7209126c82f..caf31f89820 100644
--- a/apps/user_ldap/lib/jobs/cleanup.php
+++ b/apps/user_ldap/lib/jobs/cleanup.php
@@ -8,10 +8,12 @@
namespace OCA\User_LDAP\Jobs;
+use \OC\BackgroundJob\TimedJob;
+use \OCA\user_ldap\User_LDAP;
use \OCA\user_ldap\User_Proxy;
use \OCA\user_ldap\lib\Helper;
use \OCA\user_ldap\lib\LDAP;
-use \OCA\User_LDAP\lib\User\DeletedUsersIndex;
+use \OCA\user_ldap\lib\user\DeletedUsersIndex;
use \OCA\User_LDAP\Mapping\UserMapping;
/**
@@ -21,14 +23,14 @@ use \OCA\User_LDAP\Mapping\UserMapping;
*
* @package OCA\user_ldap\lib;
*/
-class CleanUp extends \OC\BackgroundJob\TimedJob {
+class CleanUp extends TimedJob {
/** @var int $limit amount of users that should be checked per run */
protected $limit = 50;
/** @var int $defaultIntervalMin default interval in minutes */
protected $defaultIntervalMin = 51;
- /** @var \OCP\UserInterface $userBackend */
+ /** @var User_LDAP|User_Proxy $userBackend */
protected $userBackend;
/** @var \OCP\IConfig $ocConfig */
@@ -68,6 +70,12 @@ class CleanUp extends \OC\BackgroundJob\TimedJob {
$this->ldapHelper = new Helper();
}
+ if(isset($arguments['ocConfig'])) {
+ $this->ocConfig = $arguments['ocConfig'];
+ } else {
+ $this->ocConfig = \OC::$server->getConfig();
+ }
+
if(isset($arguments['userBackend'])) {
$this->userBackend = $arguments['userBackend'];
} else {
@@ -78,12 +86,6 @@ class CleanUp extends \OC\BackgroundJob\TimedJob {
);
}
- if(isset($arguments['ocConfig'])) {
- $this->ocConfig = $arguments['ocConfig'];
- } else {
- $this->ocConfig = \OC::$server->getConfig();
- }
-
if(isset($arguments['db'])) {
$this->db = $arguments['db'];
} else {
@@ -114,7 +116,7 @@ class CleanUp extends \OC\BackgroundJob\TimedJob {
if(!$this->isCleanUpAllowed()) {
return;
}
- $users = $this->mapping->getList($this->limit, $this->getOffset());
+ $users = $this->mapping->getList($this->getOffset(), $this->limit);
if(!is_array($users)) {
//something wrong? Let's start from the beginning next time and
//abort