From: Alexander M. <key...@us...> - 2004-04-23 07:52:55
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2004-04-23 07:52:48 UTC Modified files: docs/CHANGELOG lib/db.inc.php Log message: Author: Alexander Maassen <out...@ke...> Log message: Use english if session language is not set for some reason. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.37 publicdnsadmin/docs/CHANGELOG:1.38 --- publicdnsadmin/docs/CHANGELOG:1.37 Sat Sep 20 07:39:12 2003 +++ publicdnsadmin/docs/CHANGELOG Fri Apr 23 00:52:38 2004 @@ -1,4 +1,6 @@ $Id: +OUTsider <out...@ke...> - 23/04/2004 - Fixed an issue in language handler, we shall use english by default + if no session is set. SiRVulcaN <sir...@si...> - 21/09/2003 - Fixed a issue with 2 lines around the wrong way, caused ip addresses not to display with PTR records. Index: publicdnsadmin/lib/db.inc.php diff -u publicdnsadmin/lib/db.inc.php:1.4 publicdnsadmin/lib/db.inc.php:1.5 --- publicdnsadmin/lib/db.inc.php:1.4 Wed Aug 13 05:14:14 2003 +++ publicdnsadmin/lib/db.inc.php Fri Apr 23 00:52:38 2004 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: db.inc.php,v 1.4 2003/08/13 12:14:14 sirvulcan Exp $ + $Id: db.inc.php,v 1.5 2004/04/23 07:52:38 key2peace Exp $ */ function db_connect() { @@ -17,7 +17,11 @@ $connection_string = "$database_type://$database_user:$database_pass@$database_host/$database_name"; $dbh =& DB::connect($connection_string); if (DB::isError($dbh)) { - require("language/lang-". $_SESSION["_LANGUAGE"] .".php"); + if (!empty($_SESSION["_LANGUAGE"])) { + require("language/lang-". $_SESSION["_LANGUAGE"] .".php"); + } else { + require("language/lang-english.php"); + } echo "<p>"._DBUNAVAIL."<br><b>".$dbh->getMessage()."</b></p>\n"; exit; } ----------------------- End of diff ----------------------- |