From fe6cb1489c4517de0f9902dabdad9bb870a67521 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 31 Aug 2009 11:25:28 +0000 Subject: [PATCH] Fix wrong error message for non-writable template file in acp_styles.php - Bug #50045 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10074 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_styles.php | 3 ++- phpBB/language/en/acp/styles.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 166ad11d3e..fbf3eadcb2 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -747,7 +747,8 @@ parse_css_file = {PARSE_CSS_FILE} { if (!($fp = @fopen($file, 'wb'))) { - trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING); + // File exists and is writeable, but still not able to be written to + trigger_error(sprintf($user->lang['TEMPLATE_FILE_NOT_WRITABLE'], htmlspecialchars($template_file)) . adm_back_link($this->u_action), E_USER_WARNING); } fwrite($fp, $template_data); fclose($fp); diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index eb742fd140..247d8a4140 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -392,6 +392,7 @@ $lang = array_merge($lang, array( 'TEMPLATE_LOCATION' => 'Store templates in', 'TEMPLATE_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.', 'TEMPLATE_NAME' => 'Template name', + 'TEMPLATE_FILE_NOT_WRITABLE'=> 'Unable to write to template file %s. Please check the permissions for the directory and the files.', 'TEMPLATE_REFRESHED' => 'Template refreshed successfully.', 'THEME_ADDED' => 'New theme added on filesystem.',