diff options
-rw-r--r-- | core/CliMulti/Output.php | 3 | ||||
-rw-r--r-- | core/CliMulti/Process.php | 2 | ||||
-rw-r--r-- | core/Filesystem.php | 10 | ||||
-rw-r--r-- | plugins/CoreAdminHome/CustomLogo.php | 2 | ||||
-rw-r--r-- | plugins/CoreConsole/Commands/GeneratePlugin.php | 2 | ||||
-rw-r--r-- | plugins/CoreConsole/Commands/GeneratePluginBase.php | 2 |
6 files changed, 8 insertions, 13 deletions
diff --git a/core/CliMulti/Output.php b/core/CliMulti/Output.php index e060bc4988..6b67435525 100644 --- a/core/CliMulti/Output.php +++ b/core/CliMulti/Output.php @@ -21,7 +21,8 @@ class Output { } $dir = CliMulti::getTmpPath(); - Filesystem::mkdir($dir, true); + Filesystem::mkdir($dir); + $this->tmpFile = $dir . '/' . $outputId . '.output'; } diff --git a/core/CliMulti/Process.php b/core/CliMulti/Process.php index 261065917a..dec394af7b 100644 --- a/core/CliMulti/Process.php +++ b/core/CliMulti/Process.php @@ -32,7 +32,7 @@ class Process } $pidDir = CliMulti::getTmpPath(); - Filesystem::mkdir($pidDir, true); + Filesystem::mkdir($pidDir); $this->isSupported = self::isSupported(); $this->pidFile = $pidDir . '/' . $pid . '.pid'; diff --git a/core/Filesystem.php b/core/Filesystem.php index 97ce97a4b4..2a4062931e 100644 --- a/core/Filesystem.php +++ b/core/Filesystem.php @@ -74,11 +74,9 @@ class Filesystem * _Note: This function does **not** create directories recursively._ * * @param string $path The path of the directory to create. - * @param bool $denyAccess Whether to deny browser access to this new folder by - * creating an **.htaccess** file. * @api */ - public static function mkdir($path, $denyAccess = true) + public static function mkdir($path) { if (!is_dir($path)) { // the mode in mkdir is modified by the current umask @@ -93,10 +91,6 @@ class Filesystem // enough! we're not going to make the directory world-writeable } } - - if ($denyAccess) { - ServerFilesGenerator::createHtAccessDenyAll($path); - } } /** @@ -256,7 +250,7 @@ class Filesystem public static function copyRecursive($source, $target, $excludePhp = false) { if (is_dir($source)) { - self::mkdir($target, false); + self::mkdir($target); $d = dir($source); while (false !== ($entry = $d->read())) { if ($entry == '.' || $entry == '..') { diff --git a/plugins/CoreAdminHome/CustomLogo.php b/plugins/CoreAdminHome/CustomLogo.php index 7f543973c3..1483e83ec6 100644 --- a/plugins/CoreAdminHome/CustomLogo.php +++ b/plugins/CoreAdminHome/CustomLogo.php @@ -88,7 +88,7 @@ class CustomLogo $directoryWritingTo = PIWIK_DOCUMENT_ROOT . '/' . dirname($pathUserLogo); // Create directory if not already created - Filesystem::mkdir($directoryWritingTo, $denyAccess = false); + Filesystem::mkdir($directoryWritingTo); $directoryWritable = is_writable($directoryWritingTo); $logoFilesWriteable = is_writeable(PIWIK_DOCUMENT_ROOT . '/' . $pathUserLogo) diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php index 71d1ace3bc..8f56ca1243 100644 --- a/plugins/CoreConsole/Commands/GeneratePlugin.php +++ b/plugins/CoreConsole/Commands/GeneratePlugin.php @@ -110,7 +110,7 @@ class GeneratePlugin extends GeneratePluginBase protected function generatePluginFolder($pluginName) { $pluginPath = $this->getPluginPath($pluginName); - Filesystem::mkdir($pluginPath, true); + Filesystem::mkdir($pluginPath); } /** diff --git a/plugins/CoreConsole/Commands/GeneratePluginBase.php b/plugins/CoreConsole/Commands/GeneratePluginBase.php index bfc5cec350..402b8310a1 100644 --- a/plugins/CoreConsole/Commands/GeneratePluginBase.php +++ b/plugins/CoreConsole/Commands/GeneratePluginBase.php @@ -29,7 +29,7 @@ abstract class GeneratePluginBase extends ConsoleCommand $pluginPath = $this->getPluginPath($pluginName); if (!file_exists($pluginName . $folder)) { - Filesystem::mkdir($pluginPath . $folder, true); + Filesystem::mkdir($pluginPath . $folder); } } |