diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2010-08-19 12:30:24 -0400 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2010-08-19 12:30:24 -0400 |
commit | 5e330044b87190dcdb66aa3c83932a4c16627692 (patch) | |
tree | 3b06013f87bbfeb4b70bcb0a2a142c8320307200 /phpBB | |
parent | 89b35f7ab9e9dc425d7fcac9cca3ea71da24b8d3 (diff) | |
download | forums-5e330044b87190dcdb66aa3c83932a4c16627692.tar forums-5e330044b87190dcdb66aa3c83932a4c16627692.tar.gz forums-5e330044b87190dcdb66aa3c83932a4c16627692.tar.bz2 forums-5e330044b87190dcdb66aa3c83932a4c16627692.tar.xz forums-5e330044b87190dcdb66aa3c83932a4c16627692.zip |
[ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable().
In the ACM-Modules we need to check whether the function is loaded, before we
use it, as this is not the case from download/file.php in avatar-mode.
PHPBB3-9519
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 12 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_memory.php | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index add065ead1..5c1876d006 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -78,6 +78,12 @@ class acm if (!$this->_write('data_global')) { + if (!function_exists('phpbb_is_writable')) + { + global $phpbb_root_path; + include($phpbb_root_path . 'includes/functions.' . $phpEx); + } + // Now, this occurred how often? ... phew, just tell the user then... if (!phpbb_is_writable($this->cache_dir)) { @@ -707,6 +713,12 @@ class acm */ function remove_file($filename, $check = false) { + if (!function_exists('phpbb_is_writable')) + { + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/functions.' . $phpEx); + } + if ($check && !phpbb_is_writable($this->cache_dir)) { // E_USER_ERROR - not using language entry - intended. diff --git a/phpBB/includes/acm/acm_memory.php b/phpBB/includes/acm/acm_memory.php index 4e0f35f157..2936ea0bae 100644 --- a/phpBB/includes/acm/acm_memory.php +++ b/phpBB/includes/acm/acm_memory.php @@ -407,6 +407,12 @@ class acm_memory */ function remove_file($filename, $check = false) { + if (!function_exists('phpbb_is_writable')) + { + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/functions.' . $phpEx); + } + if ($check && !phpbb_is_writable($this->cache_dir)) { // E_USER_ERROR - not using language entry - intended. |