Browse Source

Fixed a couple of encoding-related issues in SSI.php and subscriptions.php - Thanks Daegaladh and darbula for the reports

Signed-off-by: emanuele <[email protected]>
emanuele 11 years ago
parent
commit
b1476c718b
2 changed files with 7 additions and 0 deletions
  1. 4 0
      SSI.php
  2. 3 0
      subscriptions.php

+ 4 - 0
SSI.php

@@ -147,6 +147,10 @@ loadPermissions();
 // Load the current or SSI theme. (just use $ssi_theme = id_theme;)
 loadTheme(isset($ssi_theme) ? (int) $ssi_theme : 0);
 
+// @todo: probably not the best place, but somewhere it should be set...
+if (!headers_sent())
+	header('Content-Type: text/html; charset=' . (empty($modSettings['global_character_set']) ? (empty($txt['lang_character_set']) ? 'ISO-8859-1' : $txt['lang_character_set']) : $modSettings['global_character_set']));
+
 // Take care of any banning that needs to be done.
 if (isset($_REQUEST['ssi_ban']) || (isset($ssi_ban) && $ssi_ban === true))
 	is_not_banned();

+ 3 - 0
subscriptions.php

@@ -29,7 +29,10 @@ loadLanguage('ManagePaid');
 
 // If there's literally nothing coming in, let's take flight!
 if (empty($_POST))
+{
+	header('Content-Type: text/html; charset=' . (empty($modSettings['global_character_set']) ? (empty($txt['lang_character_set']) ? 'ISO-8859-1' : $txt['lang_character_set']) : $modSettings['global_character_set']));
 	die($txt['paid_no_data']);
+}
 
 // I assume we're even active?
 if (empty($modSettings['paid_enabled']))