From 1dec6453fdb249789125c3dc3b36dc3f30e3baae Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 24 Feb 2017 09:47:44 +0100 Subject: [PATCH] Check write access of H5P folder HFP-502 --- h5p-default-storage.class.php | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/h5p-default-storage.class.php b/h5p-default-storage.class.php index 19cb2fe..3ea2ba9 100644 --- a/h5p-default-storage.class.php +++ b/h5p-default-storage.class.php @@ -390,25 +390,10 @@ class H5PDefaultStorage implements \H5PFileStorage { * Check if server setup has write permission to * the required folders * - * @return bool True if server has the proper write access + * @return bool True if site can write to the H5P files folder */ public function hasWriteAccess() { - $dirs = array( - '/content', - '/libraries', - '/cachedassets', - '/temp', - '/editor', - '/exports' - ); - - // Check that directories are writable - $has_write_access = TRUE; - foreach ($dirs as $dir) { - $has_write_access = $has_write_access && self::dirReady($this->path . $dir); - } - - return $has_write_access; + return self::dirReady($this->path); } /**