Fixed JSON parser error in installer (caused by magic_quotes_gpc, wouldn't you know) and re-enabled server-side l10n debugging
authorDan
Tue, 29 Jan 2008 17:29:08 -0500
changeset 390 9bcc185dc151
parent 389 da3bb3e99323
child 391 85f91037cd4f
Fixed JSON parser error in installer (caused by magic_quotes_gpc, wouldn't you know) and re-enabled server-side l10n debugging
includes/lang.php
install/includes/common.php
install/includes/stages/database_mysql.php
--- a/includes/lang.php	Tue Jan 29 16:21:52 2008 -0500
+++ b/includes/lang.php	Tue Jan 29 17:29:08 2008 -0500
@@ -554,7 +554,7 @@
       $subs[$key] = strval($value);
       $string = str_replace("%{$key}%", "{$subs[$key]}", $string);
     }
-    return $string;
+    return "$string*";
   }
   
 } // class Language
--- a/install/includes/common.php	Tue Jan 29 16:21:52 2008 -0500
+++ b/install/includes/common.php	Tue Jan 29 17:29:08 2008 -0500
@@ -105,6 +105,8 @@
   require(ENANO_ROOT . '/includes/json2.php');
 }
 
+strip_magic_quotes_gpc();
+
 // Build a list of available languages
 $dir = @opendir( ENANO_ROOT . '/language' );
 if ( !$dir )
--- a/install/includes/stages/database_mysql.php	Tue Jan 29 16:21:52 2008 -0500
+++ b/install/includes/stages/database_mysql.php	Tue Jan 29 17:29:08 2008 -0500
@@ -322,6 +322,10 @@
             return false;
           }
           response = parseJSON(response);
+          if ( response.mode == 'error' )
+          {
+            return false;
+          }
           document.getElementById('e_db_host').innerHTML = '';
           document.getElementById('e_db_name').innerHTML = '';
           document.getElementById('e_db_auth').innerHTML = '';