@@ -140,7 +140,7 @@ |
||
| 140 | 140 | return [ |
| 141 | 141 | 'type' => 'user', |
| 142 | 142 | 'id' => $remoteUser->getUser(), |
| 143 | - 'name' => $cloudId,// Todo display name from contacts |
|
| 143 | + 'name' => $cloudId, // Todo display name from contacts |
|
| 144 | 144 | 'server' => $remoteUser->getRemote(), |
| 145 | 145 | ]; |
| 146 | 146 | } |
@@ -131,15 +131,15 @@ |
||
| 131 | 131 | */ |
| 132 | 132 | public function testRemote($remote) { |
| 133 | 133 | if ( |
| 134 | - $this->testUrl('https://' . $remote . '/ocs-provider/') || |
|
| 135 | - $this->testUrl('https://' . $remote . '/ocs-provider/index.php') || |
|
| 136 | - $this->testUrl('https://' . $remote . '/status.php', true) |
|
| 134 | + $this->testUrl('https://'.$remote.'/ocs-provider/') || |
|
| 135 | + $this->testUrl('https://'.$remote.'/ocs-provider/index.php') || |
|
| 136 | + $this->testUrl('https://'.$remote.'/status.php', true) |
|
| 137 | 137 | ) { |
| 138 | 138 | return new DataResponse('https'); |
| 139 | 139 | } elseif ( |
| 140 | - $this->testUrl('http://' . $remote . '/ocs-provider/') || |
|
| 141 | - $this->testUrl('http://' . $remote . '/ocs-provider/index.php') || |
|
| 142 | - $this->testUrl('http://' . $remote . '/status.php', true) |
|
| 140 | + $this->testUrl('http://'.$remote.'/ocs-provider/') || |
|
| 141 | + $this->testUrl('http://'.$remote.'/ocs-provider/index.php') || |
|
| 142 | + $this->testUrl('http://'.$remote.'/status.php', true) |
|
| 143 | 143 | ) { |
| 144 | 144 | return new DataResponse('http'); |
| 145 | 145 | } else { |
@@ -23,6 +23,6 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace OCA\Files_Sharing; |
| 25 | 25 | |
| 26 | -interface ISharedStorage{ |
|
| 26 | +interface ISharedStorage { |
|
| 27 | 27 | |
| 28 | 28 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | /** {@inheritDoc} */ |
| 39 | 39 | public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) { |
| 40 | - if(!$this->storage->remoteIsOwnCloud()) { |
|
| 40 | + if (!$this->storage->remoteIsOwnCloud()) { |
|
| 41 | 41 | return parent::scan($path, $recursive, $recursive, $lock); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | } catch (\Exception $e) { |
| 89 | 89 | $this->storage->checkStorageAvailability(); |
| 90 | 90 | throw new \Exception( |
| 91 | - 'Error while scanning remote share: "' . |
|
| 92 | - $this->storage->getRemote() . '" ' . |
|
| 91 | + 'Error while scanning remote share: "'. |
|
| 92 | + $this->storage->getRemote().'" '. |
|
| 93 | 93 | $e->getMessage() |
| 94 | 94 | ); |
| 95 | 95 | } |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | $this->addResult($data['data'], ''); |
| 98 | 98 | } else { |
| 99 | 99 | throw new \Exception( |
| 100 | - 'Error while scanning remote share: "' . |
|
| 101 | - $this->storage->getRemote() . '"' |
|
| 100 | + 'Error while scanning remote share: "'. |
|
| 101 | + $this->storage->getRemote().'"' |
|
| 102 | 102 | ); |
| 103 | 103 | } |
| 104 | 104 | } |
@@ -113,14 +113,14 @@ discard block |
||
| 113 | 113 | $children = []; |
| 114 | 114 | foreach ($data['children'] as $child) { |
| 115 | 115 | $children[$child['name']] = true; |
| 116 | - $this->addResult($child, ltrim($path . '/' . $child['name'], '/')); |
|
| 116 | + $this->addResult($child, ltrim($path.'/'.$child['name'], '/')); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $existingCache = $this->cache->getFolderContentsById($id); |
| 120 | 120 | foreach ($existingCache as $existingChild) { |
| 121 | 121 | // if an existing child is not in the new data, remove it |
| 122 | 122 | if (!isset($children[$existingChild['name']])) { |
| 123 | - $this->cache->remove(ltrim($path . '/' . $existingChild['name'], '/')); |
|
| 123 | + $this->cache->remove(ltrim($path.'/'.$existingChild['name'], '/')); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $managerProvider = $this->managerProvider; |
| 62 | 62 | $manager = $managerProvider(); |
| 63 | 63 | $data['manager'] = $manager; |
| 64 | - $mountPoint = '/' . $user->getUID() . '/files/' . ltrim($data['mountpoint'], '/'); |
|
| 64 | + $mountPoint = '/'.$user->getUID().'/files/'.ltrim($data['mountpoint'], '/'); |
|
| 65 | 65 | $data['mountpoint'] = $mountPoint; |
| 66 | 66 | $data['cloudId'] = $this->cloudIdManager->getCloudId($data['owner'], $data['remote']); |
| 67 | 67 | $data['certificateManager'] = \OC::$server->getCertificateManager($user->getUID()); |
@@ -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 | } |
@@ -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 | } |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $rows = $result->fetchAll(); |
| 48 | 48 | $result->closeCursor(); |
| 49 | 49 | |
| 50 | - return array_map(function ($row) { |
|
| 50 | + return array_map(function($row) { |
|
| 51 | 51 | return BackupCode::fromRow($row); |
| 52 | 52 | }, $rows); |
| 53 | 53 | } |