@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | const FORMAT_NONE = -1; |
| 37 | 37 | const FORMAT_STATUSES = -2; |
| 38 | - const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it |
|
| 38 | + const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it |
|
| 39 | 39 | |
| 40 | 40 | const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls |
| 41 | 41 | |
@@ -44,23 +44,23 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function run(IOutput $output) { |
| 46 | 46 | |
| 47 | - $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
| 47 | + $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
| 48 | 48 | $instanceId = $this->config->getSystemValue('instanceid', null); |
| 49 | 49 | |
| 50 | - if(!is_string($instanceId) || empty($instanceId)) { |
|
| 50 | + if (!is_string($instanceId) || empty($instanceId)) { |
|
| 51 | 51 | return; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - $updaterFolderPath = $dataDir . '/updater-' . $instanceId; |
|
| 55 | - $stepFile = $updaterFolderPath . '/.step'; |
|
| 56 | - if(file_exists($stepFile)) { |
|
| 54 | + $updaterFolderPath = $dataDir.'/updater-'.$instanceId; |
|
| 55 | + $stepFile = $updaterFolderPath.'/.step'; |
|
| 56 | + if (file_exists($stepFile)) { |
|
| 57 | 57 | $output->info('.step file exists'); |
| 58 | 58 | |
| 59 | - $previousStepFile = $updaterFolderPath . '/.step-previous-update'; |
|
| 59 | + $previousStepFile = $updaterFolderPath.'/.step-previous-update'; |
|
| 60 | 60 | |
| 61 | 61 | // cleanup |
| 62 | - if(file_exists($previousStepFile)) { |
|
| 63 | - if(\OC_Helper::rmdirr($previousStepFile)) { |
|
| 62 | + if (file_exists($previousStepFile)) { |
|
| 63 | + if (\OC_Helper::rmdirr($previousStepFile)) { |
|
| 64 | 64 | $output->info('.step-previous-update removed'); |
| 65 | 65 | } else { |
| 66 | 66 | $output->info('.step-previous-update can\'t be removed - abort move of .step file'); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | // move step file |
| 72 | - if(rename($stepFile, $previousStepFile)) { |
|
| 72 | + if (rename($stepFile, $previousStepFile)) { |
|
| 73 | 73 | $output->info('.step file moved to .step-previous-update'); |
| 74 | 74 | } else { |
| 75 | 75 | $output->warning('.step file can\'t be moved'); |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | public function run(IOutput $output) { |
| 66 | 66 | if (!$this->config->getAppValue('core', 'previewsCleanedUp', false)) { |
| 67 | - $this->userManager->callForSeenUsers(function (IUser $user) { |
|
| 67 | + $this->userManager->callForSeenUsers(function(IUser $user) { |
|
| 68 | 68 | $this->jobList->add(CleanPreviewsBackgroundJob::class, ['uid' => $user->getUID()]); |
| 69 | 69 | }); |
| 70 | 70 | $this->config->setAppValue('core', 'previewsCleanedUp', 1); |
@@ -64,14 +64,14 @@ |
||
| 64 | 64 | |
| 65 | 65 | public function run($arguments) { |
| 66 | 66 | $uid = $arguments['uid']; |
| 67 | - $this->logger->info('Started preview cleanup for ' . $uid); |
|
| 67 | + $this->logger->info('Started preview cleanup for '.$uid); |
|
| 68 | 68 | $empty = $this->cleanupPreviews($uid); |
| 69 | 69 | |
| 70 | 70 | if (!$empty) { |
| 71 | 71 | $this->jobList->add(self::class, ['uid' => $uid]); |
| 72 | - $this->logger->info('New preview cleanup scheduled for ' . $uid); |
|
| 72 | + $this->logger->info('New preview cleanup scheduled for '.$uid); |
|
| 73 | 73 | } else { |
| 74 | - $this->logger->info('Preview cleanup done for ' . $uid); |
|
| 74 | + $this->logger->info('Preview cleanup done for '.$uid); |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | $result->closeCursor(); |
| 70 | 70 | |
| 71 | 71 | if ($entriesUpdated > 0) { |
| 72 | - $output->info($entriesUpdated . ' mounts updated'); |
|
| 72 | + $output->info($entriesUpdated.' mounts updated'); |
|
| 73 | 73 | return; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | private function updateMimetypes($updatedMimetypes) { |
| 136 | 136 | if (empty($this->folderMimeTypeId)) { |
| 137 | 137 | $result = \OC_DB::executeAudited(self::getIdStmt(), array('httpd/unix-directory')); |
| 138 | - $this->folderMimeTypeId = (int)$result->fetchOne(); |
|
| 138 | + $this->folderMimeTypeId = (int) $result->fetchOne(); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | foreach ($updatedMimetypes as $extension => $mimetype) { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $mimetypeId = $result->fetchOne(); |
| 153 | 153 | |
| 154 | 154 | // change mimetype for files with x extension |
| 155 | - \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension)); |
|
| 155 | + \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.'.$extension)); |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $result->closeCursor(); |
| 94 | 94 | |
| 95 | 95 | if ($deletedEntries) { |
| 96 | - $output->info('Removed ' . $deletedEntries . ' shares where user is not a member of the group anymore'); |
|
| 96 | + $output->info('Removed '.$deletedEntries.' shares where user is not a member of the group anymore'); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | } |
| 34 | 34 | if ($table !== null) { |
| 35 | 35 | $suffix = '_SEQ'; |
| 36 | - $table = '"' . $table . $suffix . '"'; |
|
| 36 | + $table = '"'.$table.$suffix.'"'; |
|
| 37 | 37 | } |
| 38 | 38 | return $this->conn->realLastInsertId($table); |
| 39 | 39 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | /** |
| 38 | 38 | * {@inheritDoc} |
| 39 | 39 | */ |
| 40 | - protected function _getCreateTableSQL($name, array $columns, array $options = array()){ |
|
| 40 | + protected function _getCreateTableSQL($name, array $columns, array $options = array()) { |
|
| 41 | 41 | // if auto increment is set the column is already defined as primary key |
| 42 | 42 | foreach ($columns as $column) { |
| 43 | 43 | if (!empty($column['autoincrement'])) { |