diff --git a/phpBB/admin/admin_smilies.php b/phpBB/admin/admin_smilies.php index cadd71654d..97b1c8727d 100644 --- a/phpBB/admin/admin_smilies.php +++ b/phpBB/admin/admin_smilies.php @@ -405,7 +405,7 @@ else if ( $mode != "" ) $smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']); // If no code was entered complain ... - if ($smile_code == '' || $smile_url = '') + if ($smile_code == '' || $smile_url == '') { message_die(MESSAGE, $lang['Fields_empty']); } @@ -422,8 +422,7 @@ else if ( $mode != "" ) $sql = "UPDATE " . SMILIES_TABLE . " SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "' WHERE smilies_id = $smile_id"; - $result = $db->sql_query($sql); - if( !$result ) + if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql); } diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index c754ff3ac4..7e69f5b1da 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -168,6 +168,8 @@ p,ul,td {font-size:10pt;}
  • Added check for invalid (non-compliant) email addresses to upgrade script
  • Further redirect workarounds for broken servers, please direct further issues to the vendors
  • Added GMT + 13 to English lang_main, all translators are encouraged to do likewise
  • +
  • Added switch to default_lang email template if user lang template no longer exists
  • +
  • Fixed javascript error when selecting smiley containing a single quote
  • diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php index 84da9bf87a..0a592aa85a 100755 --- a/phpBB/includes/emailer.php +++ b/phpBB/includes/emailer.php @@ -92,7 +92,12 @@ class emailer if ( !file_exists(phpbb_realpath($this->tpl_file)) ) { - message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__); + $this->tpl_file = @phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/email/' . $template_file . '.tpl'); + + if ( !file_exists(phpbb_realpath($this->tpl_file)) ) + { + message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__); + } } if ( !$this->load_msg() ) diff --git a/phpBB/includes/functions_post.php b/phpBB/includes/functions_post.php index 8834d52e5a..40548632fd 100644 --- a/phpBB/includes/functions_post.php +++ b/phpBB/includes/functions_post.php @@ -776,7 +776,7 @@ function generate_smilies($mode, $page_id) { if (empty($rowset[$row['smile_url']])) { - $rowset[$row['smile_url']]['code'] = str_replace('\\', '\\\\', str_replace("'", "\\'", $row['code'])); + $rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code'])); $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; $num_smilies++; }