nlopess Sun Mar 21 15:10:48 2004 EDT
Modified files:
/livedocs common.php
Log:
fixing default language/DB
http://cvs.php.net/diff.php/livedocs/common.php?r1=1.10&r2=1.11&ty=u
Index: livedocs/common.php
diff -u livedocs/common.php:1.10 livedocs/common.php:1.11
--- livedocs/common.php:1.10 Sun Mar 21 15:02:40 2004
+++ livedocs/common.php Sun Mar 21 15:10:47 2004
@@ -18,7 +18,7 @@
// | Common PHP header, with some basic settings |
// +----------------------------------------------------------------------+
//
-// $Id: common.php,v 1.10 2004/03/21 20:02:40 nlopess Exp $
+// $Id: common.php,v 1.11 2004/03/21 20:10:47 nlopess Exp $
set_magic_quotes_runtime(0);
/*$compare = version_compare(phpversion(), '5.0.0RC1');
@@ -66,7 +66,10 @@
define('FALLBACK_BASE', PHPDOC . "/" . FALLBACK_LANG . "/");
$fb_idx = @sqlite_open(FALLBACK_INDEX);
-if ($lang == FALLBACK_LANG || !($idx = @sqlite_open(INDEX))) {
+
+if (file_exists(INDEX) && $lang != FALLBACK_LANG) {
+ $idx = @sqlite_open(INDEX);
+} else {
$idx = $fb_idx;
$lang = FALLBACK_LANG;
}