@@ -90,11 +90,11 @@ |
||
| 90 | 90 | */ |
| 91 | 91 | static private function renameChildren($oldPath, $newPath) { |
| 92 | 92 | |
| 93 | - $absNewPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath); |
|
| 94 | - $absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath); |
|
| 93 | + $absNewPath = \OC\Files\Filesystem::normalizePath('/'.\OCP\User::getUser().'/files/'.$newPath); |
|
| 94 | + $absOldPath = \OC\Files\Filesystem::normalizePath('/'.\OCP\User::getUser().'/files/'.$oldPath); |
|
| 95 | 95 | |
| 96 | 96 | $mountManager = \OC\Files\Filesystem::getMountManager(); |
| 97 | - $mountedShares = $mountManager->findIn('/' . \OCP\User::getUser() . '/files/' . $oldPath); |
|
| 97 | + $mountedShares = $mountManager->findIn('/'.\OCP\User::getUser().'/files/'.$oldPath); |
|
| 98 | 98 | foreach ($mountedShares as $mount) { |
| 99 | 99 | if ($mount->getStorage()->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')) { |
| 100 | 100 | $mountPoint = $mount->getMountPoint(); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | /** |
| 42 | 42 | * sets the correct interval for this timed job |
| 43 | 43 | */ |
| 44 | - public function __construct(){ |
|
| 44 | + public function __construct() { |
|
| 45 | 45 | $this->interval = $this->defaultIntervalMin * 60; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | $logger = \OC::$server->getLogger(); |
| 56 | 56 | |
| 57 | 57 | $sql = |
| 58 | - 'DELETE FROM `*PREFIX*share` ' . |
|
| 59 | - 'WHERE `item_type` in (\'file\', \'folder\') ' . |
|
| 58 | + 'DELETE FROM `*PREFIX*share` '. |
|
| 59 | + 'WHERE `item_type` in (\'file\', \'folder\') '. |
|
| 60 | 60 | 'AND NOT EXISTS (SELECT `fileid` FROM `*PREFIX*filecache` WHERE `file_source` = `fileid`)'; |
| 61 | 61 | |
| 62 | 62 | $deletedEntries = $connection->executeUpdate($sql); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function generateTarget($filePath, $shareWith, $exclude = null) { |
| 98 | 98 | $shareFolder = \OCA\Files_Sharing\Helper::getShareFolder(); |
| 99 | - $target = \OC\Files\Filesystem::normalizePath($shareFolder . '/' . basename($filePath)); |
|
| 99 | + $target = \OC\Files\Filesystem::normalizePath($shareFolder.'/'.basename($filePath)); |
|
| 100 | 100 | |
| 101 | 101 | // for group shares we return the target right away |
| 102 | 102 | if ($shareWith === false) { |
@@ -104,13 +104,13 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | \OC\Files\Filesystem::initMountPoints($shareWith); |
| 107 | - $view = new \OC\Files\View('/' . $shareWith . '/files'); |
|
| 107 | + $view = new \OC\Files\View('/'.$shareWith.'/files'); |
|
| 108 | 108 | |
| 109 | 109 | if (!$view->is_dir($shareFolder)) { |
| 110 | 110 | $dir = ''; |
| 111 | 111 | $subdirs = explode('/', $shareFolder); |
| 112 | 112 | foreach ($subdirs as $subdir) { |
| 113 | - $dir = $dir . '/' . $subdir; |
|
| 113 | + $dir = $dir.'/'.$subdir; |
|
| 114 | 114 | if (!$view->is_dir($dir)) { |
| 115 | 115 | $view->mkdir($dir); |
| 116 | 116 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | if ($share['item_type'] === 'folder' && $target !== '') { |
| 238 | 238 | // note: in case of ext storage mount points the path might be empty |
| 239 | 239 | // which would cause a leading slash to appear |
| 240 | - $share['path'] = ltrim($share['path'] . '/' . $target, '/'); |
|
| 240 | + $share['path'] = ltrim($share['path'].'/'.$target, '/'); |
|
| 241 | 241 | } |
| 242 | 242 | return self::resolveReshares($share); |
| 243 | 243 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $token = isset($_GET['t']) ? $_GET['t'] : ''; |
| 28 | 28 | $route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare'; |
| 29 | 29 | |
| 30 | -if($token !== '') { |
|
| 30 | +if ($token !== '') { |
|
| 31 | 31 | OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token))); |
| 32 | 32 | } else { |
| 33 | 33 | header('HTTP/1.0 404 Not Found'); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $notification->setParsedSubject($l->t('Update to %1$s is available.', [$parameters['version']])); |
| 92 | 92 | |
| 93 | 93 | if ($this->isAdmin()) { |
| 94 | - $notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index') . '#updater'); |
|
| 94 | + $notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index').'#updater'); |
|
| 95 | 95 | } |
| 96 | 96 | } else { |
| 97 | 97 | $appInfo = $this->getAppInfo($notification->getObjectType()); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | ]); |
| 112 | 112 | |
| 113 | 113 | if ($this->isAdmin()) { |
| 114 | - $notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps') . '#app-' . $notification->getObjectType()); |
|
| 114 | + $notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps').'#app-'.$notification->getObjectType()); |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | $currentChannel = \OCP\Util::getChannel(); |
| 100 | 100 | |
| 101 | 101 | // Remove the currently used channel from the channels list |
| 102 | - if(($key = array_search($currentChannel, $channels)) !== false) { |
|
| 102 | + if (($key = array_search($currentChannel, $channels)) !== false) { |
|
| 103 | 103 | unset($channels[$key]); |
| 104 | 104 | } |
| 105 | 105 | $updateState = $this->updateChecker->getUpdateState(); |
@@ -43,14 +43,14 @@ discard block |
||
| 43 | 43 | $data = $this->updater->check(); |
| 44 | 44 | $result = []; |
| 45 | 45 | |
| 46 | - if(isset($data['version']) && $data['version'] !== '' && $data['version'] !== []) { |
|
| 46 | + if (isset($data['version']) && $data['version'] !== '' && $data['version'] !== []) { |
|
| 47 | 47 | $result['updateAvailable'] = true; |
| 48 | 48 | $result['updateVersion'] = $data['versionstring']; |
| 49 | 49 | $result['updaterEnabled'] = $data['autoupdater'] === '1'; |
| 50 | - if(substr($data['web'], 0, 8) === 'https://') { |
|
| 50 | + if (substr($data['web'], 0, 8) === 'https://') { |
|
| 51 | 51 | $result['updateLink'] = $data['web']; |
| 52 | 52 | } |
| 53 | - if(substr($data['url'], 0, 8) === 'https://') { |
|
| 53 | + if (substr($data['url'], 0, 8) === 'https://') { |
|
| 54 | 54 | $result['downloadLink'] = $data['url']; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @param array $data |
| 65 | 65 | */ |
| 66 | 66 | public function getJavaScript(array $data) { |
| 67 | - $data['array']['oc_updateState'] = json_encode([ |
|
| 67 | + $data['array']['oc_updateState'] = json_encode([ |
|
| 68 | 68 | 'updateAvailable' => true, |
| 69 | 69 | 'updateVersion' => $this->getUpdateState()['updateVersion'], |
| 70 | 70 | 'updateLink' => isset($this->getUpdateState()['updateLink']) ? $this->getUpdateState()['updateLink'] : '', |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | use OCP\AppFramework\IAppContainer; |
| 31 | 31 | |
| 32 | 32 | class Application extends App { |
| 33 | - public function __construct (array $urlParams = array()) { |
|
| 33 | + public function __construct(array $urlParams = array()) { |
|
| 34 | 34 | parent::__construct('updatenotification', $urlParams); |
| 35 | 35 | $container = $this->getContainer(); |
| 36 | 36 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | protected function run($argument) { |
| 71 | 71 | // Delete old tokens after 2 days |
| 72 | - if($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) { |
|
| 72 | + if ($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) { |
|
| 73 | 73 | $this->config->deleteSystemValue('updater.secret'); |
| 74 | 74 | } |
| 75 | 75 | } |