@@ -65,9 +65,9 @@ |
||
| 65 | 65 | } |
| 66 | 66 | $userFolder = $rootFolder->getUserFolder($user->getUID()); |
| 67 | 67 | $fileQuery = new SearchQuery( |
| 68 | - new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', '%' . $query . '%'), |
|
| 69 | - (int)$limit, |
|
| 70 | - (int)$offset, |
|
| 68 | + new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', '%'.$query.'%'), |
|
| 69 | + (int) $limit, |
|
| 70 | + (int) $offset, |
|
| 71 | 71 | [ |
| 72 | 72 | new SearchOrder(ISearchOrder::DIRECTION_DESCENDING, 'mtime'), |
| 73 | 73 | ], |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | public function search(IUser $user, ISearchQuery $query): SearchResult { |
| 104 | 104 | $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
| 105 | 105 | $fileQuery = new SearchQuery( |
| 106 | - new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', '%' . $query->getTerm() . '%'), |
|
| 106 | + new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', '%'.$query->getTerm().'%'), |
|
| 107 | 107 | $query->getLimit(), |
| 108 | - (int)$query->getCursor(), |
|
| 108 | + (int) $query->getCursor(), |
|
| 109 | 109 | $query->getSortOrder() === ISearchQuery::SORT_DATE_DESC ? [ |
| 110 | 110 | new SearchOrder(ISearchOrder::DIRECTION_DESCENDING, 'mtime'), |
| 111 | 111 | ] : [], |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | return SearchResult::paginated( |
| 116 | 116 | $this->l10n->t('Files'), |
| 117 | - array_map(function (Node $result) use ($userFolder) { |
|
| 117 | + array_map(function(Node $result) use ($userFolder) { |
|
| 118 | 118 | // Generate thumbnail url |
| 119 | 119 | $thumbnailUrl = $this->urlGenerator->linkToRouteAbsolute('core.Preview.getPreviewByFileId', ['x' => 32, 'y' => 32, 'fileId' => $result->getId()]); |
| 120 | 120 | $path = $userFolder->getRelativePath($result->getPath()); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $this->urlGenerator->getAbsoluteURL($link), |
| 134 | 134 | $result->getMimetype() === FileInfo::MIMETYPE_FOLDER ? 'icon-folder' : $this->mimeTypeDetector->mimeTypeIcon($result->getMimetype()) |
| 135 | 135 | ); |
| 136 | - $searchResultEntry->addAttribute('fileId', (string)$result->getId()); |
|
| 136 | + $searchResultEntry->addAttribute('fileId', (string) $result->getId()); |
|
| 137 | 137 | $searchResultEntry->addAttribute('path', $path); |
| 138 | 138 | return $searchResultEntry; |
| 139 | 139 | }, $userFolder->search($fileQuery)), |
@@ -43,6 +43,6 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function getData(): int { |
| 46 | - return (int)$this->config->getAppValue('comments', 'maxAutoCompleteResults', '10'); |
|
| 46 | + return (int) $this->config->getAppValue('comments', 'maxAutoCompleteResults', '10'); |
|
| 47 | 47 | } |
| 48 | 48 | } |
@@ -6,23 +6,23 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
| 10 | - 'OCA\\Comments\\Activity\\Filter' => $baseDir . '/../lib/Activity/Filter.php', |
|
| 11 | - 'OCA\\Comments\\Activity\\Listener' => $baseDir . '/../lib/Activity/Listener.php', |
|
| 12 | - 'OCA\\Comments\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php', |
|
| 13 | - 'OCA\\Comments\\Activity\\Setting' => $baseDir . '/../lib/Activity/Setting.php', |
|
| 14 | - 'OCA\\Comments\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 15 | - 'OCA\\Comments\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
| 16 | - 'OCA\\Comments\\Collaboration\\CommentersSorter' => $baseDir . '/../lib/Collaboration/CommentersSorter.php', |
|
| 17 | - 'OCA\\Comments\\Controller\\Notifications' => $baseDir . '/../lib/Controller/Notifications.php', |
|
| 18 | - 'OCA\\Comments\\EventHandler' => $baseDir . '/../lib/EventHandler.php', |
|
| 19 | - 'OCA\\Comments\\Listener\\CommentsEntityEventListener' => $baseDir . '/../lib/Listener/CommentsEntityEventListener.php', |
|
| 20 | - 'OCA\\Comments\\Listener\\LoadAdditionalScripts' => $baseDir . '/../lib/Listener/LoadAdditionalScripts.php', |
|
| 21 | - 'OCA\\Comments\\Listener\\LoadSidebarScripts' => $baseDir . '/../lib/Listener/LoadSidebarScripts.php', |
|
| 22 | - 'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => $baseDir . '/../lib/MaxAutoCompleteResultsInitialState.php', |
|
| 23 | - 'OCA\\Comments\\Notification\\Listener' => $baseDir . '/../lib/Notification/Listener.php', |
|
| 24 | - 'OCA\\Comments\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', |
|
| 25 | - 'OCA\\Comments\\Search\\CommentsSearchProvider' => $baseDir . '/../lib/Search/CommentsSearchProvider.php', |
|
| 26 | - 'OCA\\Comments\\Search\\LegacyProvider' => $baseDir . '/../lib/Search/LegacyProvider.php', |
|
| 27 | - 'OCA\\Comments\\Search\\Result' => $baseDir . '/../lib/Search/Result.php', |
|
| 9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
| 10 | + 'OCA\\Comments\\Activity\\Filter' => $baseDir.'/../lib/Activity/Filter.php', |
|
| 11 | + 'OCA\\Comments\\Activity\\Listener' => $baseDir.'/../lib/Activity/Listener.php', |
|
| 12 | + 'OCA\\Comments\\Activity\\Provider' => $baseDir.'/../lib/Activity/Provider.php', |
|
| 13 | + 'OCA\\Comments\\Activity\\Setting' => $baseDir.'/../lib/Activity/Setting.php', |
|
| 14 | + 'OCA\\Comments\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 15 | + 'OCA\\Comments\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
| 16 | + 'OCA\\Comments\\Collaboration\\CommentersSorter' => $baseDir.'/../lib/Collaboration/CommentersSorter.php', |
|
| 17 | + 'OCA\\Comments\\Controller\\Notifications' => $baseDir.'/../lib/Controller/Notifications.php', |
|
| 18 | + 'OCA\\Comments\\EventHandler' => $baseDir.'/../lib/EventHandler.php', |
|
| 19 | + 'OCA\\Comments\\Listener\\CommentsEntityEventListener' => $baseDir.'/../lib/Listener/CommentsEntityEventListener.php', |
|
| 20 | + 'OCA\\Comments\\Listener\\LoadAdditionalScripts' => $baseDir.'/../lib/Listener/LoadAdditionalScripts.php', |
|
| 21 | + 'OCA\\Comments\\Listener\\LoadSidebarScripts' => $baseDir.'/../lib/Listener/LoadSidebarScripts.php', |
|
| 22 | + 'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => $baseDir.'/../lib/MaxAutoCompleteResultsInitialState.php', |
|
| 23 | + 'OCA\\Comments\\Notification\\Listener' => $baseDir.'/../lib/Notification/Listener.php', |
|
| 24 | + 'OCA\\Comments\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php', |
|
| 25 | + 'OCA\\Comments\\Search\\CommentsSearchProvider' => $baseDir.'/../lib/Search/CommentsSearchProvider.php', |
|
| 26 | + 'OCA\\Comments\\Search\\LegacyProvider' => $baseDir.'/../lib/Search/LegacyProvider.php', |
|
| 27 | + 'OCA\\Comments\\Search\\Result' => $baseDir.'/../lib/Search/Result.php', |
|
| 28 | 28 | ); |
@@ -6,45 +6,45 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitComments |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\Comments\\' => 13, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\Comments\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 25 | - 'OCA\\Comments\\Activity\\Filter' => __DIR__ . '/..' . '/../lib/Activity/Filter.php', |
|
| 26 | - 'OCA\\Comments\\Activity\\Listener' => __DIR__ . '/..' . '/../lib/Activity/Listener.php', |
|
| 27 | - 'OCA\\Comments\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php', |
|
| 28 | - 'OCA\\Comments\\Activity\\Setting' => __DIR__ . '/..' . '/../lib/Activity/Setting.php', |
|
| 29 | - 'OCA\\Comments\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 30 | - 'OCA\\Comments\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', |
|
| 31 | - 'OCA\\Comments\\Collaboration\\CommentersSorter' => __DIR__ . '/..' . '/../lib/Collaboration/CommentersSorter.php', |
|
| 32 | - 'OCA\\Comments\\Controller\\Notifications' => __DIR__ . '/..' . '/../lib/Controller/Notifications.php', |
|
| 33 | - 'OCA\\Comments\\EventHandler' => __DIR__ . '/..' . '/../lib/EventHandler.php', |
|
| 34 | - 'OCA\\Comments\\Listener\\CommentsEntityEventListener' => __DIR__ . '/..' . '/../lib/Listener/CommentsEntityEventListener.php', |
|
| 35 | - 'OCA\\Comments\\Listener\\LoadAdditionalScripts' => __DIR__ . '/..' . '/../lib/Listener/LoadAdditionalScripts.php', |
|
| 36 | - 'OCA\\Comments\\Listener\\LoadSidebarScripts' => __DIR__ . '/..' . '/../lib/Listener/LoadSidebarScripts.php', |
|
| 37 | - 'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => __DIR__ . '/..' . '/../lib/MaxAutoCompleteResultsInitialState.php', |
|
| 38 | - 'OCA\\Comments\\Notification\\Listener' => __DIR__ . '/..' . '/../lib/Notification/Listener.php', |
|
| 39 | - 'OCA\\Comments\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', |
|
| 40 | - 'OCA\\Comments\\Search\\CommentsSearchProvider' => __DIR__ . '/..' . '/../lib/Search/CommentsSearchProvider.php', |
|
| 41 | - 'OCA\\Comments\\Search\\LegacyProvider' => __DIR__ . '/..' . '/../lib/Search/LegacyProvider.php', |
|
| 42 | - 'OCA\\Comments\\Search\\Result' => __DIR__ . '/..' . '/../lib/Search/Result.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 25 | + 'OCA\\Comments\\Activity\\Filter' => __DIR__.'/..'.'/../lib/Activity/Filter.php', |
|
| 26 | + 'OCA\\Comments\\Activity\\Listener' => __DIR__.'/..'.'/../lib/Activity/Listener.php', |
|
| 27 | + 'OCA\\Comments\\Activity\\Provider' => __DIR__.'/..'.'/../lib/Activity/Provider.php', |
|
| 28 | + 'OCA\\Comments\\Activity\\Setting' => __DIR__.'/..'.'/../lib/Activity/Setting.php', |
|
| 29 | + 'OCA\\Comments\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 30 | + 'OCA\\Comments\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php', |
|
| 31 | + 'OCA\\Comments\\Collaboration\\CommentersSorter' => __DIR__.'/..'.'/../lib/Collaboration/CommentersSorter.php', |
|
| 32 | + 'OCA\\Comments\\Controller\\Notifications' => __DIR__.'/..'.'/../lib/Controller/Notifications.php', |
|
| 33 | + 'OCA\\Comments\\EventHandler' => __DIR__.'/..'.'/../lib/EventHandler.php', |
|
| 34 | + 'OCA\\Comments\\Listener\\CommentsEntityEventListener' => __DIR__.'/..'.'/../lib/Listener/CommentsEntityEventListener.php', |
|
| 35 | + 'OCA\\Comments\\Listener\\LoadAdditionalScripts' => __DIR__.'/..'.'/../lib/Listener/LoadAdditionalScripts.php', |
|
| 36 | + 'OCA\\Comments\\Listener\\LoadSidebarScripts' => __DIR__.'/..'.'/../lib/Listener/LoadSidebarScripts.php', |
|
| 37 | + 'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => __DIR__.'/..'.'/../lib/MaxAutoCompleteResultsInitialState.php', |
|
| 38 | + 'OCA\\Comments\\Notification\\Listener' => __DIR__.'/..'.'/../lib/Notification/Listener.php', |
|
| 39 | + 'OCA\\Comments\\Notification\\Notifier' => __DIR__.'/..'.'/../lib/Notification/Notifier.php', |
|
| 40 | + 'OCA\\Comments\\Search\\CommentsSearchProvider' => __DIR__.'/..'.'/../lib/Search/CommentsSearchProvider.php', |
|
| 41 | + 'OCA\\Comments\\Search\\LegacyProvider' => __DIR__.'/..'.'/../lib/Search/LegacyProvider.php', |
|
| 42 | + 'OCA\\Comments\\Search\\Result' => __DIR__.'/..'.'/../lib/Search/Result.php', |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | public static function getInitializer(ClassLoader $loader) |
| 46 | 46 | { |
| 47 | - return \Closure::bind(function () use ($loader) { |
|
| 47 | + return \Closure::bind(function() use ($loader) { |
|
| 48 | 48 | $loader->prefixLengthsPsr4 = ComposerStaticInitComments::$prefixLengthsPsr4; |
| 49 | 49 | $loader->prefixDirsPsr4 = ComposerStaticInitComments::$prefixDirsPsr4; |
| 50 | 50 | $loader->classMap = ComposerStaticInitComments::$classMap; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $this->storageId = self::adjustStorageId($this->storageId); |
| 74 | 74 | |
| 75 | 75 | if ($row = self::getStorageById($this->storageId)) { |
| 76 | - $this->numericId = (int)$row['numeric_id']; |
|
| 76 | + $this->numericId = (int) $row['numeric_id']; |
|
| 77 | 77 | } else { |
| 78 | 78 | $connection = \OC::$server->getDatabaseConnection(); |
| 79 | 79 | $available = $isAvailable ? 1 : 0; |
@@ -81,9 +81,9 @@ discard block |
||
| 81 | 81 | $this->numericId = $connection->lastInsertId('*PREFIX*storages'); |
| 82 | 82 | } else { |
| 83 | 83 | if ($row = self::getStorageById($this->storageId)) { |
| 84 | - $this->numericId = (int)$row['numeric_id']; |
|
| 84 | + $this->numericId = (int) $row['numeric_id']; |
|
| 85 | 85 | } else { |
| 86 | - throw new \RuntimeException('Storage could neither be inserted nor be selected from the database: ' . $this->storageId); |
|
| 86 | + throw new \RuntimeException('Storage could neither be inserted nor be selected from the database: '.$this->storageId); |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $storageId = self::adjustStorageId($storageId); |
| 151 | 151 | |
| 152 | 152 | if ($row = self::getStorageById($storageId)) { |
| 153 | - return (int)$row['numeric_id']; |
|
| 153 | + return (int) $row['numeric_id']; |
|
| 154 | 154 | } else { |
| 155 | 155 | return null; |
| 156 | 156 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | public function getAvailability() { |
| 163 | 163 | if ($row = self::getStorageById($this->storageId)) { |
| 164 | 164 | return [ |
| 165 | - 'available' => (int)$row['available'] === 1, |
|
| 165 | + 'available' => (int) $row['available'] === 1, |
|
| 166 | 166 | 'last_checked' => $row['last_checked'] |
| 167 | 167 | ]; |
| 168 | 168 | } else { |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | public function setAvailability($isAvailable, int $delay = 0) { |
| 178 | 178 | $available = $isAvailable ? 1 : 0; |
| 179 | 179 | if (!$isAvailable) { |
| 180 | - \OC::$server->get(LoggerInterface::class)->info('Storage with ' . $this->storageId . ' marked as unavailable', ['app' => 'lib']); |
|
| 180 | + \OC::$server->get(LoggerInterface::class)->info('Storage with '.$this->storageId.' marked as unavailable', ['app' => 'lib']); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | $query = \OC::$server->getDatabaseConnection()->getQueryBuilder(); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $options['nextcloud']['allow_local_address'] = $this->isLocalAddressAllowed($options); |
| 85 | 85 | if ($options['nextcloud']['allow_local_address'] === false) { |
| 86 | - $onRedirectFunction = function ( |
|
| 86 | + $onRedirectFunction = function( |
|
| 87 | 87 | \Psr\Http\Message\RequestInterface $request, |
| 88 | 88 | \Psr\Http\Message\ResponseInterface $response, |
| 89 | 89 | \Psr\Http\Message\UriInterface $uri |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | // $this->certificateManager->getAbsoluteBundlePath() tries to instantiate |
| 128 | 128 | // a view |
| 129 | 129 | if ($this->config->getSystemValue('installed', false) === false) { |
| 130 | - return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; |
|
| 130 | + return \OC::$SERVERROOT.'/resources/config/ca-bundle.crt'; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | return $this->certificateManager->getAbsoluteBundlePath(); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | $proxyUserPwd = $this->config->getSystemValue('proxyuserpwd', ''); |
| 159 | 159 | if ($proxyUserPwd !== '' && $proxyUserPwd !== null) { |
| 160 | - $proxyHost = $proxyUserPwd . '@' . $proxyHost; |
|
| 160 | + $proxyHost = $proxyUserPwd.'@'.$proxyHost; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | $proxy = [ |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | private function createCacheKey(string $domain, int $type) : string { |
| 41 | - return $domain . "-" . (string)$type; |
|
| 41 | + return $domain."-".(string) $type; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function setNegativeCacheForDnsType(string $domain, int $type, int $ttl) : void { |
@@ -46,6 +46,6 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function isNegativeCached(string $domain, int $type) : bool { |
| 49 | - return (bool)$this->cache->hasKey($this->createCacheKey($domain, $type)); |
|
| 49 | + return (bool) $this->cache->hasKey($this->createCacheKey($domain, $type)); |
|
| 50 | 50 | } |
| 51 | 51 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $defaultExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes'; |
| 154 | 154 | $defaultExpireDate = $enforceDefaultExpireDate = null; |
| 155 | 155 | if ($defaultExpireDateEnabled) { |
| 156 | - $defaultExpireDate = (int)$this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); |
|
| 156 | + $defaultExpireDate = (int) $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); |
|
| 157 | 157 | $enforceDefaultExpireDate = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes'; |
| 158 | 158 | } |
| 159 | 159 | $outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes'; |
@@ -161,19 +161,19 @@ discard block |
||
| 161 | 161 | $defaultInternalExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_internal_expire_date', 'no') === 'yes'; |
| 162 | 162 | $defaultInternalExpireDate = $defaultInternalExpireDateEnforced = null; |
| 163 | 163 | if ($defaultInternalExpireDateEnabled) { |
| 164 | - $defaultInternalExpireDate = (int)$this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7'); |
|
| 164 | + $defaultInternalExpireDate = (int) $this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7'); |
|
| 165 | 165 | $defaultInternalExpireDateEnforced = $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no') === 'yes'; |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | $defaultRemoteExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_remote_expire_date', 'no') === 'yes'; |
| 169 | 169 | $defaultRemoteExpireDate = $defaultRemoteExpireDateEnforced = null; |
| 170 | 170 | if ($defaultRemoteExpireDateEnabled) { |
| 171 | - $defaultRemoteExpireDate = (int)$this->config->getAppValue('core', 'shareapi_remote_expire_after_n_days', '7'); |
|
| 171 | + $defaultRemoteExpireDate = (int) $this->config->getAppValue('core', 'shareapi_remote_expire_after_n_days', '7'); |
|
| 172 | 172 | $defaultRemoteExpireDateEnforced = $this->config->getAppValue('core', 'shareapi_enforce_remote_expire_date', 'no') === 'yes'; |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | $countOfDataLocation = 0; |
| 176 | - $dataLocation = str_replace(\OC::$SERVERROOT . '/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
| 176 | + $dataLocation = str_replace(\OC::$SERVERROOT.'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
| 177 | 177 | if ($countOfDataLocation !== 1 || $uid === null || !$this->groupManager->isAdmin($uid)) { |
| 178 | 178 | $dataLocation = false; |
| 179 | 179 | } |
@@ -207,8 +207,8 @@ discard block |
||
| 207 | 207 | "_oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false', |
| 208 | 208 | "_oc_isadmin" => $uid !== null && $this->groupManager->isAdmin($uid) ? 'true' : 'false', |
| 209 | 209 | "backendAllowsPasswordConfirmation" => $userBackendAllowsPasswordConfirmation ? 'true' : 'false', |
| 210 | - "oc_dataURL" => is_string($dataLocation) ? "\"" . $dataLocation . "\"" : 'false', |
|
| 211 | - "_oc_webroot" => "\"" . \OC::$WEBROOT . "\"", |
|
| 210 | + "oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false', |
|
| 211 | + "_oc_webroot" => "\"".\OC::$WEBROOT."\"", |
|
| 212 | 212 | "_oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution |
| 213 | 213 | "datepickerFormatDate" => json_encode($this->l->l('jsdate', null)), |
| 214 | 214 | 'nc_lastLogin' => $lastConfirmTimestamp, |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | if ($this->currentUser !== null) { |
| 310 | 310 | $array['oc_userconfig'] = json_encode([ |
| 311 | 311 | 'avatar' => [ |
| 312 | - 'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0), |
|
| 312 | + 'version' => (int) $this->config->getUserValue($uid, 'avatar', 'version', 0), |
|
| 313 | 313 | 'generated' => $this->config->getUserValue($uid, 'avatar', 'generated', 'true') === 'true', |
| 314 | 314 | ] |
| 315 | 315 | ]); |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | |
| 326 | 326 | // Echo it |
| 327 | 327 | foreach ($array as $setting => $value) { |
| 328 | - $result .= 'var '. $setting . '='. $value . ';' . PHP_EOL; |
|
| 328 | + $result .= 'var '.$setting.'='.$value.';'.PHP_EOL; |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | return $result; |