mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Merge branch 'ticket/nickvergessen/9519' into develop-olympus
* ticket/nickvergessen/9519: [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable(). [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable(). [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable(). [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable().
This commit is contained in:
@@ -748,7 +748,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$additional = '';
|
||||
|
||||
// If the template is stored on the filesystem try to write the file else store it in the database
|
||||
if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && @is_writable($file))
|
||||
if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && phpbb_is_writable($file))
|
||||
{
|
||||
if (!($fp = @fopen($file, 'wb')))
|
||||
{
|
||||
@@ -1155,7 +1155,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$message = $user->lang['THEME_UPDATED'];
|
||||
|
||||
// If the theme is stored on the filesystem try to write the file else store it in the database
|
||||
if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($file) && @is_writable($file))
|
||||
if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($file) && phpbb_is_writable($file))
|
||||
{
|
||||
if (!($fp = @fopen($file, 'wb')))
|
||||
{
|
||||
@@ -2246,7 +2246,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
{
|
||||
// a rather elaborate check we have to do here once to avoid trouble later
|
||||
$check = "{$phpbb_root_path}styles/" . $style_row["{$mode}_path"] . (($mode === 'theme') ? '/theme/stylesheet.css' : '/template');
|
||||
if (($style_row["{$mode}_storedb"] != $store_db) && !$store_db && ($safe_mode || !@is_writable($check)))
|
||||
if (($style_row["{$mode}_storedb"] != $store_db) && !$store_db && ($safe_mode || !phpbb_is_writable($check)))
|
||||
{
|
||||
$error[] = $user->lang['EDIT_' . strtoupper($mode) . '_STORED_DB'];
|
||||
$store_db = 1;
|
||||
@@ -2326,7 +2326,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
{
|
||||
$theme_data = $this->db_theme_data($style_row);
|
||||
}
|
||||
else if (!$store_db && !$safe_mode && @is_writable("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css"))
|
||||
else if (!$store_db && !$safe_mode && phpbb_is_writable("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css"))
|
||||
{
|
||||
$store_db = 1;
|
||||
$theme_data = $style_row['theme_data'];
|
||||
@@ -2357,7 +2357,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$store_db && !$safe_mode && @is_writable("{$phpbb_root_path}styles/{$style_row['template_path']}/template"))
|
||||
if (!$store_db && !$safe_mode && phpbb_is_writable("{$phpbb_root_path}styles/{$style_row['template_path']}/template"))
|
||||
{
|
||||
$err = $this->store_in_fs('template', $style_row['template_id']);
|
||||
if ($err)
|
||||
@@ -3736,7 +3736,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
|
||||
$store_db = 0;
|
||||
$error = array();
|
||||
if (!$safe_mode && @is_writable("{$phpbb_root_path}styles/{$path}/template"))
|
||||
if (!$safe_mode && phpbb_is_writable("{$phpbb_root_path}styles/{$path}/template"))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
|
||||
|
Reference in New Issue
Block a user