Made dir handling private to prevent abuse

h5p/h5p-moodle-plugin#48
HFJ-1845
pull/22/head
Frode Petterson 2016-04-25 14:30:12 +02:00
parent db6f18c984
commit 7b38c3571e
1 changed files with 1 additions and 4 deletions

View File

@ -297,13 +297,10 @@ class H5PDefaultStorage implements \H5PFileStorage {
* Recursive function that makes sure the specified directory exists and * Recursive function that makes sure the specified directory exists and
* is writable. * is writable.
* *
* TODO: Will be made private when the editor file handling is done by this
* class!
*
* @param string $path * @param string $path
* @return bool * @return bool
*/ */
public static function dirReady($path) { private static function dirReady($path) {
if (!file_exists($path)) { if (!file_exists($path)) {
$parent = preg_replace("/\/[^\/]+\/?$/", '', $path); $parent = preg_replace("/\/[^\/]+\/?$/", '', $path);
if (!self::dirReady($parent)) { if (!self::dirReady($parent)) {