mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[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:
parent
89b35f7ab9
commit
5e330044b8
2 changed files with 18 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue