From 4c95ed0eeb497d3febe3169614e9385cefa648d2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 10 Aug 2010 16:11:39 +0200 Subject: [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable(). acm_memory.php is untested. install/install_convert.php and includes/functions_convert.php are going to be tested and committed afterwards. PHPBB3-9519 --- phpBB/includes/acm/acm_file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/acm/acm_file.php') diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 5a758aa2bb..add065ead1 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -79,7 +79,7 @@ class acm if (!$this->_write('data_global')) { // Now, this occurred how often? ... phew, just tell the user then... - if (!@is_writable($this->cache_dir)) + if (!phpbb_is_writable($this->cache_dir)) { // We need to use die() here, because else we may encounter an infinite loop (the message handler calls $cache->unload()) die($this->cache_dir . ' is NOT writable.'); @@ -707,7 +707,7 @@ class acm */ function remove_file($filename, $check = false) { - if ($check && !@is_writable($this->cache_dir)) + if ($check && !phpbb_is_writable($this->cache_dir)) { // E_USER_ERROR - not using language entry - intended. trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR); -- cgit v1.2.1 From 5e330044b87190dcdb66aa3c83932a4c16627692 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 19 Aug 2010 12:30:24 -0400 Subject: [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 --- phpBB/includes/acm/acm_file.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'phpBB/includes/acm/acm_file.php') 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. -- cgit v1.2.1