diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-09-30 09:37:32 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-09-30 09:37:32 +0400 |
commit | a00487b0b841c4b15463b591c7f62176c4b84d15 (patch) | |
tree | 6eb893ce356a4740e044c9cdadaf84ffb2095b9d /core/Filechecks.php | |
parent | 0edef3332289a7cbe54b58084b967907d1086d29 (diff) |
coding style fixes, some PHPStorm inspection fixes, improved readability of code, few refactorings, all as part of our code cleanup strategy
Diffstat (limited to 'core/Filechecks.php')
-rw-r--r-- | core/Filechecks.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Filechecks.php b/core/Filechecks.php index 33d0ed0696..3dc6d53195 100644 --- a/core/Filechecks.php +++ b/core/Filechecks.php @@ -43,7 +43,7 @@ class Filechecks $directoryToCheck = PIWIK_USER_PATH . $directoryToCheck; } - if(strpos($directoryToCheck, '/tmp/') !== false) { + if (strpos($directoryToCheck, '/tmp/') !== false) { $directoryToCheck = SettingsPiwik::rewriteTmpPathWithInstanceId($directoryToCheck); } @@ -87,9 +87,9 @@ class Filechecks $directoryList = "<code>chown -R ". self::getUserAndGroup() ." " . $realpath . "</code><br />" . $directoryList; } - if(function_exists('shell_exec')) { + if (function_exists('shell_exec')) { $currentUser = self::getUser(); - if(!empty($currentUser)) { + if (!empty($currentUser)) { $optionalUserInfo = " (running as user '" . $currentUser . "')"; } } @@ -211,13 +211,13 @@ class Filechecks private static function getUserAndGroup() { $user = self::getUser(); - if(!function_exists('shell_exec')) { + if (!function_exists('shell_exec')) { return $user . ':' . $user; } $group = trim(shell_exec('groups '. $user .' | cut -f3 -d" "')); - if(empty($group)) { + if (empty($group)) { $group = 'www-data'; } return $user . ':' . $group; @@ -225,7 +225,7 @@ class Filechecks private static function getUser() { - if(!function_exists('shell_exec')) { + if (!function_exists('shell_exec')) { return 'www-data'; } return trim(shell_exec('whoami')); |