Skip to content

Commit 2844800

Browse files
committed
Merge remote-tracking branch 'origin/develop'
# Conflicts: # config/version.php
2 parents c93f4ef + b7e8b9b commit 2844800

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

app/Console/Commands/LdapSync.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,11 @@ private function updateCreateUser(AdldapUser $snipeUser): void
221221
*
222222
* @since 5.0.0
223223
*
224-
* @param int $page The page to get the result set
225224
*/
226-
private function processLdapUsers(int $page=0): void
225+
private function processLdapUsers(): void
227226
{
228227
try {
229-
$ldapUsers = $this->ldap->getLdapUsers($page);
228+
$ldapUsers = $this->ldap->getLdapUsers();
230229
} catch (Exception $e) {
231230
$this->outputError($e);
232231
exit($e->getMessage());
@@ -242,15 +241,9 @@ private function processLdapUsers(int $page=0): void
242241
}
243242

244243
// Process each individual users
245-
foreach ($ldapUsers as $user) {
244+
foreach ($ldapUsers->getResults() as $user) { // AdLdap2's paginate() method is weird, it gets *everything* and ->getResults() returns *everything*
246245
$this->updateCreateUser($user);
247246
}
248-
249-
if ($ldapUsers->getCurrentPage() < $ldapUsers->getPages()-1) {
250-
$current_page = $ldapUsers->getCurrentPage();
251-
unset($ldapUsers); //deliberately unset the variable so we don't OOM
252-
$this->processLdapUsers($current_page + 1); //this recursive call means that the $ldapUsers variable is not going to get GC'ed until everything returns. Blech.
253-
}
254247
}
255248

256249
/**

config/version.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
return array (
3-
'app_version' => 'v5.0.3',
4-
'full_app_version' => 'v5.0.3 - build 5443-g5f8221470',
5-
'build_version' => '5443',
3+
'app_version' => 'v5.0.4',
4+
'full_app_version' => 'v5.0.4 - build 5452-gc93f4ef0d',
5+
'build_version' => '5452',
66
'prerelease_version' => '',
7-
'hash_version' => 'g5f8221470',
8-
'full_hash' => 'v5.0.2-27-g5f8221470',
7+
'hash_version' => 'gc93f4ef0d',
8+
'full_hash' => 'v5.0.4-7-gc93f4ef0d',
99
'branch' => 'master',
1010
);

0 commit comments

Comments
 (0)