From: <mo...@us...> - 2006-05-04 02:01:55
|
Update of /cvsroot/tikiwiki/tiki/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9023/db Modified Files: Tag: BRANCH-1-9 tiki-db.php Log Message: adapted so you can use preset vars in multitiki switch Index: tiki-db.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/db/tiki-db.php,v retrieving revision 1.46.2.4 retrieving revision 1.46.2.5 diff -u -d -r1.46.2.4 -r1.46.2.5 --- tiki-db.php 13 Mar 2005 09:18:48 -0000 1.46.2.4 +++ tiki-db.php 4 May 2006 02:01:48 -0000 1.46.2.5 @@ -54,14 +54,16 @@ */ -$local_php = 'db/local.php'; +if (!isset($local_php)) $local_php = 'db/local.php'; if (is_file('db/virtuals.inc')) { - if (isset($_SERVER['TIKI_VIRTUAL']) and is_file('db/'.$_SERVER['TIKI_VIRTUAL'].'/local.php')) { - $multi = $_SERVER['TIKI_VIRTUAL']; - } elseif (isset($_SERVER['SERVER_NAME']) and is_file('db/'.$_SERVER['SERVER_NAME'].'/local.php')) { - $multi = $_SERVER['SERVER_NAME']; - } elseif (isset($_SERVER['HTTP_HOST']) and is_file('db/'.$_SERVER['HTTP_HOST'].'/local.php')) { - $multi = $_SERVER['HTTP_HOST']; + if (!isset($multi)) { + if (isset($_SERVER['TIKI_VIRTUAL']) and is_file('db/'.$_SERVER['TIKI_VIRTUAL'].'/local.php')) { + $multi = $_SERVER['TIKI_VIRTUAL']; + } elseif (isset($_SERVER['SERVER_NAME']) and is_file('db/'.$_SERVER['SERVER_NAME'].'/local.php')) { + $multi = $_SERVER['SERVER_NAME']; + } elseif (isset($_SERVER['HTTP_HOST']) and is_file('db/'.$_SERVER['HTTP_HOST'].'/local.php')) { + $multi = $_SERVER['HTTP_HOST']; + } } if (isset($multi)) { $local_php = "db/$multi/local.php"; |