Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
c1a79d24
Commit
c1a79d24
authored
Jan 08, 2015
by
Arthur Schiwon
Browse files
fix order of initalizing instance properties, and paremeter order in a method call
parent
c7f27304
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/user_ldap/lib/jobs/cleanup.php
View file @
c1a79d24
...
...
@@ -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\
U
ser_
LDAP
\lib\
U
ser\DeletedUsersIndex
;
use
\
OCA\
u
ser_
ldap
\lib\
u
ser\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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment