diff options
Diffstat (limited to 'apps/user_ldap/lib/Migration')
-rw-r--r-- | apps/user_ldap/lib/Migration/UUIDFix.php | 6 | ||||
-rw-r--r-- | apps/user_ldap/lib/Migration/UUIDFixInsert.php | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/Migration/UUIDFix.php b/apps/user_ldap/lib/Migration/UUIDFix.php index f6359c2e882..f7e399a51bd 100644 --- a/apps/user_ldap/lib/Migration/UUIDFix.php +++ b/apps/user_ldap/lib/Migration/UUIDFix.php @@ -37,14 +37,14 @@ abstract class UUIDFix extends QueuedJob { public function run($argument) { $isUser = $this->proxy instanceof User_Proxy; - foreach($argument['records'] as $record) { + foreach ($argument['records'] as $record) { $access = $this->proxy->getLDAPAccess($record['name']); $uuid = $access->getUUID($record['dn'], $isUser); - if($uuid === false) { + if ($uuid === false) { // record not found, no prob, continue with the next continue; } - if($uuid !== $record['uuid']) { + if ($uuid !== $record['uuid']) { $this->mapper->setUUIDbyDN($uuid, $record['dn']); } } diff --git a/apps/user_ldap/lib/Migration/UUIDFixInsert.php b/apps/user_ldap/lib/Migration/UUIDFixInsert.php index 1674882803a..873c8bcd98e 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixInsert.php +++ b/apps/user_ldap/lib/Migration/UUIDFixInsert.php @@ -72,7 +72,7 @@ class UUIDFixInsert implements IRepairStep { */ public function run(IOutput $output) { $installedVersion = $this->config->getAppValue('user_ldap', 'installed_version', '1.2.1'); - if(version_compare($installedVersion, '1.2.1') !== -1) { + if (version_compare($installedVersion, '1.2.1') !== -1) { return; } @@ -83,20 +83,19 @@ class UUIDFixInsert implements IRepairStep { do { $retry = false; $records = $mapper->getList($offset, $batchSize); - if(count($records) === 0){ + if (count($records) === 0) { continue; } try { $this->jobList->add($jobClass, ['records' => $records]); $offset += $batchSize; } catch (\InvalidArgumentException $e) { - if(strpos($e->getMessage(), 'Background job arguments can\'t exceed 4000') !== false) { + if (strpos($e->getMessage(), 'Background job arguments can\'t exceed 4000') !== false) { $batchSize = (int)floor(count($records) * 0.8); $retry = true; } } } while (count($records) === $batchSize || $retry); } - } } |