@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | private static function initLocalStorageRootFS() { |
82 | 82 | // mount local file backend as root |
83 | - $configDataDirectory = \OC::$server->getSystemConfig()->getValue("datadirectory", OC::$SERVERROOT . "/data"); |
|
83 | + $configDataDirectory = \OC::$server->getSystemConfig()->getValue("datadirectory", OC::$SERVERROOT."/data"); |
|
84 | 84 | //first set up the local "root" storage |
85 | 85 | \OC\Files\Filesystem::initMountManager(); |
86 | 86 | if (!self::$rootMounted) { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | \OC\Files\Filesystem::initMountManager(); |
203 | 203 | |
204 | 204 | \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false); |
205 | - \OC\Files\Filesystem::addStorageWrapper('mount_options', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) { |
|
205 | + \OC\Files\Filesystem::addStorageWrapper('mount_options', function($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) { |
|
206 | 206 | if ($storage->instanceOfStorage('\OC\Files\Storage\Common')) { |
207 | 207 | /** @var \OC\Files\Storage\Common $storage */ |
208 | 208 | $storage->setMountOptions($mount->getOptions()); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | return $storage; |
211 | 211 | }); |
212 | 212 | |
213 | - \OC\Files\Filesystem::addStorageWrapper('enable_sharing', function ($mountPoint, \OCP\Files\Storage\IStorage $storage, \OCP\Files\Mount\IMountPoint $mount) { |
|
213 | + \OC\Files\Filesystem::addStorageWrapper('enable_sharing', function($mountPoint, \OCP\Files\Storage\IStorage $storage, \OCP\Files\Mount\IMountPoint $mount) { |
|
214 | 214 | if (!$mount->getOption('enable_sharing', true)) { |
215 | 215 | return new \OC\Files\Storage\Wrapper\PermissionsMask([ |
216 | 216 | 'storage' => $storage, |
@@ -221,21 +221,21 @@ discard block |
||
221 | 221 | }); |
222 | 222 | |
223 | 223 | // install storage availability wrapper, before most other wrappers |
224 | - \OC\Files\Filesystem::addStorageWrapper('oc_availability', function ($mountPoint, \OCP\Files\Storage\IStorage $storage) { |
|
224 | + \OC\Files\Filesystem::addStorageWrapper('oc_availability', function($mountPoint, \OCP\Files\Storage\IStorage $storage) { |
|
225 | 225 | if (!$storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage') && !$storage->isLocal()) { |
226 | 226 | return new \OC\Files\Storage\Wrapper\Availability(['storage' => $storage]); |
227 | 227 | } |
228 | 228 | return $storage; |
229 | 229 | }); |
230 | 230 | |
231 | - \OC\Files\Filesystem::addStorageWrapper('oc_encoding', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) { |
|
231 | + \OC\Files\Filesystem::addStorageWrapper('oc_encoding', function($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) { |
|
232 | 232 | if ($mount->getOption('encoding_compatibility', false) && !$storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage') && !$storage->isLocal()) { |
233 | 233 | return new \OC\Files\Storage\Wrapper\Encoding(['storage' => $storage]); |
234 | 234 | } |
235 | 235 | return $storage; |
236 | 236 | }); |
237 | 237 | |
238 | - \OC\Files\Filesystem::addStorageWrapper('oc_quota', function ($mountPoint, $storage) { |
|
238 | + \OC\Files\Filesystem::addStorageWrapper('oc_quota', function($mountPoint, $storage) { |
|
239 | 239 | // set up quota for home storages, even for other users |
240 | 240 | // which can happen when using sharing |
241 | 241 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | //if we aren't logged in, there is no use to set up the filesystem |
283 | 283 | if ($user != "") { |
284 | 284 | |
285 | - $userDir = '/' . $user . '/files'; |
|
285 | + $userDir = '/'.$user.'/files'; |
|
286 | 286 | |
287 | 287 | //jail the user into his "home" directory |
288 | 288 | \OC\Files\Filesystem::init($user, $userDir); |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | return \OCP\Files\FileInfo::SPACE_UNLIMITED; |
364 | 364 | } |
365 | 365 | $userQuota = $user->getQuota(); |
366 | - if($userQuota === 'none') { |
|
366 | + if ($userQuota === 'none') { |
|
367 | 367 | return \OCP\Files\FileInfo::SPACE_UNLIMITED; |
368 | 368 | } |
369 | 369 | return OC_Helper::computerFileSize($userQuota); |
@@ -379,15 +379,15 @@ discard block |
||
379 | 379 | */ |
380 | 380 | public static function copySkeleton($userId, \OCP\Files\Folder $userDirectory) { |
381 | 381 | |
382 | - $skeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton'); |
|
382 | + $skeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT.'/core/skeleton'); |
|
383 | 383 | $instanceId = \OC::$server->getConfig()->getSystemValue('instanceid', ''); |
384 | 384 | |
385 | 385 | if ($instanceId === null) { |
386 | 386 | throw new \RuntimeException('no instance id!'); |
387 | 387 | } |
388 | - $appdata = 'appdata_' . $instanceId; |
|
388 | + $appdata = 'appdata_'.$instanceId; |
|
389 | 389 | if ($userId === $appdata) { |
390 | - throw new \RuntimeException('username is reserved name: ' . $appdata); |
|
390 | + throw new \RuntimeException('username is reserved name: '.$appdata); |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | if (!empty($skeletonDirectory)) { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | // Verify if folder exists |
416 | 416 | $dir = opendir($source); |
417 | - if($dir === false) { |
|
417 | + if ($dir === false) { |
|
418 | 418 | $logger->error(sprintf('Could not opendir "%s"', $source), ['app' => 'core']); |
419 | 419 | return; |
420 | 420 | } |
@@ -422,14 +422,14 @@ discard block |
||
422 | 422 | // Copy the files |
423 | 423 | while (false !== ($file = readdir($dir))) { |
424 | 424 | if (!\OC\Files\Filesystem::isIgnoredDir($file)) { |
425 | - if (is_dir($source . '/' . $file)) { |
|
425 | + if (is_dir($source.'/'.$file)) { |
|
426 | 426 | $child = $target->newFolder($file); |
427 | - self::copyr($source . '/' . $file, $child); |
|
427 | + self::copyr($source.'/'.$file, $child); |
|
428 | 428 | } else { |
429 | 429 | $child = $target->newFile($file); |
430 | - $sourceStream = fopen($source . '/' . $file, 'r'); |
|
431 | - if($sourceStream === false) { |
|
432 | - $logger->error(sprintf('Could not fopen "%s"', $source . '/' . $file), ['app' => 'core']); |
|
430 | + $sourceStream = fopen($source.'/'.$file, 'r'); |
|
431 | + if ($sourceStream === false) { |
|
432 | + $logger->error(sprintf('Could not fopen "%s"', $source.'/'.$file), ['app' => 'core']); |
|
433 | 433 | closedir($dir); |
434 | 434 | return; |
435 | 435 | } |
@@ -506,8 +506,8 @@ discard block |
||
506 | 506 | return; |
507 | 507 | } |
508 | 508 | |
509 | - $timestamp = filemtime(OC::$SERVERROOT . '/version.php'); |
|
510 | - require OC::$SERVERROOT . '/version.php'; |
|
509 | + $timestamp = filemtime(OC::$SERVERROOT.'/version.php'); |
|
510 | + require OC::$SERVERROOT.'/version.php'; |
|
511 | 511 | /** @var $timestamp int */ |
512 | 512 | self::$versionCache['OC_Version_Timestamp'] = $timestamp; |
513 | 513 | /** @var $OC_Version string */ |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | |
555 | 555 | // core js files need separate handling |
556 | 556 | if ($application !== 'core' && $file !== null) { |
557 | - self::addTranslations ( $application ); |
|
557 | + self::addTranslations($application); |
|
558 | 558 | } |
559 | 559 | self::addExternalResource($application, $prepend, $path, "script"); |
560 | 560 | } |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | if ($type === "style") { |
632 | 632 | if (!in_array($path, self::$styles)) { |
633 | 633 | if ($prepend === true) { |
634 | - array_unshift ( self::$styles, $path ); |
|
634 | + array_unshift(self::$styles, $path); |
|
635 | 635 | } else { |
636 | 636 | self::$styles[] = $path; |
637 | 637 | } |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | } elseif ($type === "script") { |
640 | 640 | if (!in_array($path, self::$scripts)) { |
641 | 641 | if ($prepend === true) { |
642 | - array_unshift ( self::$scripts, $path ); |
|
642 | + array_unshift(self::$scripts, $path); |
|
643 | 643 | } else { |
644 | 644 | self::$scripts [] = $path; |
645 | 645 | } |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | * @param array $attributes array of attributes for the element |
656 | 656 | * @param string $text the text content for the element |
657 | 657 | */ |
658 | - public static function addHeader($tag, $attributes, $text=null) { |
|
658 | + public static function addHeader($tag, $attributes, $text = null) { |
|
659 | 659 | self::$headers[] = array( |
660 | 660 | 'tag' => $tag, |
661 | 661 | 'attributes' => $attributes, |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | public static function checkServer(\OC\SystemConfig $config) { |
696 | 696 | $l = \OC::$server->getL10N('lib'); |
697 | 697 | $errors = array(); |
698 | - $CONFIG_DATADIRECTORY = $config->getValue('datadirectory', OC::$SERVERROOT . '/data'); |
|
698 | + $CONFIG_DATADIRECTORY = $config->getValue('datadirectory', OC::$SERVERROOT.'/data'); |
|
699 | 699 | |
700 | 700 | if (!self::needUpgrade($config) && $config->getValue('installed', false)) { |
701 | 701 | // this check needs to be done every time |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | } |
731 | 731 | |
732 | 732 | // Check if config folder is writable. |
733 | - if(!OC_Helper::isReadOnlyConfigEnabled()) { |
|
733 | + if (!OC_Helper::isReadOnlyConfigEnabled()) { |
|
734 | 734 | if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) { |
735 | 735 | $errors[] = array( |
736 | 736 | 'error' => $l->t('Cannot write into "config" directory'), |
@@ -870,15 +870,15 @@ discard block |
||
870 | 870 | } |
871 | 871 | } |
872 | 872 | |
873 | - foreach($missingDependencies as $missingDependency) { |
|
873 | + foreach ($missingDependencies as $missingDependency) { |
|
874 | 874 | $errors[] = array( |
875 | 875 | 'error' => $l->t('PHP module %s not installed.', array($missingDependency)), |
876 | 876 | 'hint' => $moduleHint |
877 | 877 | ); |
878 | 878 | $webServerRestart = true; |
879 | 879 | } |
880 | - foreach($invalidIniSettings as $setting) { |
|
881 | - if(is_bool($setting[1])) { |
|
880 | + foreach ($invalidIniSettings as $setting) { |
|
881 | + if (is_bool($setting[1])) { |
|
882 | 882 | $setting[1] = ($setting[1]) ? 'on' : 'off'; |
883 | 883 | } |
884 | 884 | $errors[] = [ |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | * TODO: Should probably be implemented in the above generic dependency |
897 | 897 | * check somehow in the long-term. |
898 | 898 | */ |
899 | - if($iniWrapper->getBool('mbstring.func_overload') !== null && |
|
899 | + if ($iniWrapper->getBool('mbstring.func_overload') !== null && |
|
900 | 900 | $iniWrapper->getBool('mbstring.func_overload') === true) { |
901 | 901 | $errors[] = array( |
902 | 902 | 'error' => $l->t('mbstring.func_overload is set to "%s" instead of the expected value "0"', [$iniWrapper->getString('mbstring.func_overload')]), |
@@ -904,16 +904,16 @@ discard block |
||
904 | 904 | ); |
905 | 905 | } |
906 | 906 | |
907 | - if(function_exists('xml_parser_create') && |
|
908 | - LIBXML_LOADED_VERSION < 20700 ) { |
|
907 | + if (function_exists('xml_parser_create') && |
|
908 | + LIBXML_LOADED_VERSION < 20700) { |
|
909 | 909 | $version = LIBXML_LOADED_VERSION; |
910 | - $major = floor($version/10000); |
|
910 | + $major = floor($version / 10000); |
|
911 | 911 | $version -= ($major * 10000); |
912 | - $minor = floor($version/100); |
|
912 | + $minor = floor($version / 100); |
|
913 | 913 | $version -= ($minor * 100); |
914 | 914 | $patch = $version; |
915 | 915 | $errors[] = array( |
916 | - 'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [$major . '.' . $minor . '.' . $patch]), |
|
916 | + 'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [$major.'.'.$minor.'.'.$patch]), |
|
917 | 917 | 'hint' => $l->t('To fix this issue update your libxml2 version and restart your web server.') |
918 | 918 | ); |
919 | 919 | } |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | * @return array arrays with error messages and hints |
980 | 980 | */ |
981 | 981 | public static function checkDataDirectoryPermissions($dataDirectory) { |
982 | - if(\OC::$server->getConfig()->getSystemValue('check_data_directory_permissions', true) === false) { |
|
982 | + if (\OC::$server->getConfig()->getSystemValue('check_data_directory_permissions', true) === false) { |
|
983 | 983 | return []; |
984 | 984 | } |
985 | 985 | $l = \OC::$server->getL10N('lib'); |
@@ -1017,10 +1017,10 @@ discard block |
||
1017 | 1017 | 'hint' => $l->t('Check the value of "datadirectory" in your configuration') |
1018 | 1018 | ]; |
1019 | 1019 | } |
1020 | - if (!file_exists($dataDirectory . '/.ocdata')) { |
|
1020 | + if (!file_exists($dataDirectory.'/.ocdata')) { |
|
1021 | 1021 | $errors[] = [ |
1022 | 1022 | 'error' => $l->t('Your data directory is invalid'), |
1023 | - 'hint' => $l->t('Ensure there is a file called ".ocdata"' . |
|
1023 | + 'hint' => $l->t('Ensure there is a file called ".ocdata"'. |
|
1024 | 1024 | ' in the root of the data directory.') |
1025 | 1025 | ]; |
1026 | 1026 | } |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | public static function checkLoggedIn() { |
1037 | 1037 | // Check if we are a user |
1038 | 1038 | if (!\OC::$server->getUserSession()->isLoggedIn()) { |
1039 | - header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute( |
|
1039 | + header('Location: '.\OC::$server->getURLGenerator()->linkToRoute( |
|
1040 | 1040 | 'core.login.showLoginForm', |
1041 | 1041 | [ |
1042 | 1042 | 'redirect_url' => \OC::$server->getRequest()->getRequestUri(), |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | } |
1048 | 1048 | // Redirect to 2FA challenge selection if 2FA challenge was not solved yet |
1049 | 1049 | if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) { |
1050 | - header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge')); |
|
1050 | + header('Location: '.\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge')); |
|
1051 | 1051 | exit(); |
1052 | 1052 | } |
1053 | 1053 | } |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | public static function checkAdminUser() { |
1061 | 1061 | OC_Util::checkLoggedIn(); |
1062 | 1062 | if (!OC_User::isAdminUser(OC_User::getUser())) { |
1063 | - header('Location: ' . \OCP\Util::linkToAbsolute('', 'index.php')); |
|
1063 | + header('Location: '.\OCP\Util::linkToAbsolute('', 'index.php')); |
|
1064 | 1064 | exit(); |
1065 | 1065 | } |
1066 | 1066 | } |
@@ -1074,12 +1074,12 @@ discard block |
||
1074 | 1074 | OC_Util::checkLoggedIn(); |
1075 | 1075 | $userObject = \OC::$server->getUserSession()->getUser(); |
1076 | 1076 | $isSubAdmin = false; |
1077 | - if($userObject !== null) { |
|
1077 | + if ($userObject !== null) { |
|
1078 | 1078 | $isSubAdmin = \OC::$server->getGroupManager()->getSubAdmin()->isSubAdmin($userObject); |
1079 | 1079 | } |
1080 | 1080 | |
1081 | 1081 | if (!$isSubAdmin) { |
1082 | - header('Location: ' . \OCP\Util::linkToAbsolute('', 'index.php')); |
|
1082 | + header('Location: '.\OCP\Util::linkToAbsolute('', 'index.php')); |
|
1083 | 1083 | exit(); |
1084 | 1084 | } |
1085 | 1085 | return true; |
@@ -1116,10 +1116,10 @@ discard block |
||
1116 | 1116 | } |
1117 | 1117 | } |
1118 | 1118 | |
1119 | - if($config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') { |
|
1120 | - $location = $urlGenerator->getAbsoluteURL('/apps/' . $appId . '/'); |
|
1119 | + if ($config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') { |
|
1120 | + $location = $urlGenerator->getAbsoluteURL('/apps/'.$appId.'/'); |
|
1121 | 1121 | } else { |
1122 | - $location = $urlGenerator->getAbsoluteURL('/index.php/apps/' . $appId . '/'); |
|
1122 | + $location = $urlGenerator->getAbsoluteURL('/index.php/apps/'.$appId.'/'); |
|
1123 | 1123 | } |
1124 | 1124 | } |
1125 | 1125 | } |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | */ |
1134 | 1134 | public static function redirectToDefaultPage() { |
1135 | 1135 | $location = self::getDefaultPageUrl(); |
1136 | - header('Location: ' . $location); |
|
1136 | + header('Location: '.$location); |
|
1137 | 1137 | exit(); |
1138 | 1138 | } |
1139 | 1139 | |
@@ -1146,7 +1146,7 @@ discard block |
||
1146 | 1146 | $id = \OC::$server->getSystemConfig()->getValue('instanceid', null); |
1147 | 1147 | if (is_null($id)) { |
1148 | 1148 | // We need to guarantee at least one letter in instanceid so it can be used as the session_name |
1149 | - $id = 'oc' . \OC::$server->getSecureRandom()->generate(10, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS); |
|
1149 | + $id = 'oc'.\OC::$server->getSecureRandom()->generate(10, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS); |
|
1150 | 1150 | \OC::$server->getSystemConfig()->setValue('instanceid', $id); |
1151 | 1151 | } |
1152 | 1152 | return $id; |
@@ -1168,7 +1168,7 @@ discard block |
||
1168 | 1168 | }, $value); |
1169 | 1169 | } else { |
1170 | 1170 | // Specify encoding for PHP<5.4 |
1171 | - $value = htmlspecialchars((string)$value, ENT_QUOTES, 'UTF-8'); |
|
1171 | + $value = htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8'); |
|
1172 | 1172 | } |
1173 | 1173 | return $value; |
1174 | 1174 | } |
@@ -1201,7 +1201,7 @@ discard block |
||
1201 | 1201 | $testContent = 'This is used for testing whether htaccess is properly enabled to disallow access from the outside. This file can be safely removed.'; |
1202 | 1202 | |
1203 | 1203 | // creating a test file |
1204 | - $testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName; |
|
1204 | + $testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT.'/data').'/'.$fileName; |
|
1205 | 1205 | |
1206 | 1206 | if (file_exists($testFile)) {// already running this test, possible recursive call |
1207 | 1207 | return false; |
@@ -1210,7 +1210,7 @@ discard block |
||
1210 | 1210 | $fp = @fopen($testFile, 'w'); |
1211 | 1211 | if (!$fp) { |
1212 | 1212 | throw new OC\HintException('Can\'t create test file to check for working .htaccess file.', |
1213 | - 'Make sure it is possible for the webserver to write to ' . $testFile); |
|
1213 | + 'Make sure it is possible for the webserver to write to '.$testFile); |
|
1214 | 1214 | } |
1215 | 1215 | fwrite($fp, $testContent); |
1216 | 1216 | fclose($fp); |
@@ -1237,10 +1237,10 @@ discard block |
||
1237 | 1237 | } |
1238 | 1238 | |
1239 | 1239 | $fileName = '/htaccesstest.txt'; |
1240 | - $testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName; |
|
1240 | + $testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT.'/data').'/'.$fileName; |
|
1241 | 1241 | |
1242 | 1242 | // accessing the file via http |
1243 | - $url = \OC::$server->getURLGenerator()->getAbsoluteURL(OC::$WEBROOT . '/data' . $fileName); |
|
1243 | + $url = \OC::$server->getURLGenerator()->getAbsoluteURL(OC::$WEBROOT.'/data'.$fileName); |
|
1244 | 1244 | try { |
1245 | 1245 | $content = \OC::$server->getHTTPClientService()->newClient()->get($url)->getBody(); |
1246 | 1246 | } catch (\Exception $e) { |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | $theme = \OC::$server->getSystemConfig()->getValue("theme", ''); |
1332 | 1332 | |
1333 | 1333 | if ($theme === '') { |
1334 | - if (is_dir(OC::$SERVERROOT . '/themes/default')) { |
|
1334 | + if (is_dir(OC::$SERVERROOT.'/themes/default')) { |
|
1335 | 1335 | $theme = 'default'; |
1336 | 1336 | } |
1337 | 1337 | } |
@@ -1404,13 +1404,13 @@ discard block |
||
1404 | 1404 | * @return bool|string |
1405 | 1405 | */ |
1406 | 1406 | public static function normalizeUnicode($value) { |
1407 | - if(Normalizer::isNormalized($value)) { |
|
1407 | + if (Normalizer::isNormalized($value)) { |
|
1408 | 1408 | return $value; |
1409 | 1409 | } |
1410 | 1410 | |
1411 | 1411 | $normalizedValue = Normalizer::normalize($value); |
1412 | 1412 | if ($normalizedValue === null || $normalizedValue === false) { |
1413 | - \OC::$server->getLogger()->warning('normalizing failed for "' . $value . '"', ['app' => 'core']); |
|
1413 | + \OC::$server->getLogger()->warning('normalizing failed for "'.$value.'"', ['app' => 'core']); |
|
1414 | 1414 | return $value; |
1415 | 1415 | } |
1416 | 1416 | |
@@ -1426,7 +1426,7 @@ discard block |
||
1426 | 1426 | $version = OC_Util::getVersionString(); |
1427 | 1427 | $build = OC_Util::getBuild(); |
1428 | 1428 | if (!empty($build) and OC_Util::getChannel() === 'daily') { |
1429 | - $version .= ' Build:' . $build; |
|
1429 | + $version .= ' Build:'.$build; |
|
1430 | 1430 | } |
1431 | 1431 | return $version; |
1432 | 1432 | } |
@@ -1448,7 +1448,7 @@ discard block |
||
1448 | 1448 | } |
1449 | 1449 | |
1450 | 1450 | // detect part files |
1451 | - if (preg_match('/' . \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX . '/', $trimmed) !== 0) { |
|
1451 | + if (preg_match('/'.\OCP\Files\FileInfo::BLACKLIST_FILES_REGEX.'/', $trimmed) !== 0) { |
|
1452 | 1452 | return false; |
1453 | 1453 | } |
1454 | 1454 | |
@@ -1479,19 +1479,19 @@ discard block |
||
1479 | 1479 | } else if ($config->getValue('debug', false) && $versionDiff < 0) { |
1480 | 1480 | // downgrade with debug |
1481 | 1481 | $installedMajor = explode('.', $installedVersion); |
1482 | - $installedMajor = $installedMajor[0] . '.' . $installedMajor[1]; |
|
1482 | + $installedMajor = $installedMajor[0].'.'.$installedMajor[1]; |
|
1483 | 1483 | $currentMajor = explode('.', $currentVersion); |
1484 | - $currentMajor = $currentMajor[0] . '.' . $currentMajor[1]; |
|
1484 | + $currentMajor = $currentMajor[0].'.'.$currentMajor[1]; |
|
1485 | 1485 | if ($installedMajor === $currentMajor) { |
1486 | 1486 | // Same major, allow downgrade for developers |
1487 | 1487 | return true; |
1488 | 1488 | } else { |
1489 | 1489 | // downgrade attempt, throw exception |
1490 | - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); |
|
1490 | + throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from '.$installedVersion.' to '.$currentVersion.')'); |
|
1491 | 1491 | } |
1492 | 1492 | } else if ($versionDiff < 0) { |
1493 | 1493 | // downgrade attempt, throw exception |
1494 | - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); |
|
1494 | + throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from '.$installedVersion.' to '.$currentVersion.')'); |
|
1495 | 1495 | } |
1496 | 1496 | |
1497 | 1497 | // also check for upgrades for apps (independently from the user) |