[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
This commit is contained in:
Joas Schilling 2010-08-19 12:30:24 -04:00
parent 89b35f7ab9
commit 5e330044b8
2 changed files with 18 additions and 0 deletions

View file

@ -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.

View file

@ -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.