diff --git a/htdocs/index.php b/htdocs/index.php index d6456b03c91410c80adc0dbb67196debf57af6de..9ee2aad5d3c0f8b199bab5afcfb5f4be0ba8b6cc 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -14,7 +14,6 @@ if (@$displaytime) { Settings -------------------------------------------------------- */ -$dbuser="apache"; // Temporary bodge by dez - should be in settings.php include("settings.php"); if (!(isset($base) && isset($preferred_hostname) && isset($dbname))) { echo "Website unconfigured"; @@ -93,9 +92,15 @@ if (($n=strpos($ssl_path,"?"))!==FALSE) $ssl_path=substr($ssl_path,0,$n); $ssl_url = "https://".$preferred_hostname.$ssl_path; $smarty->assign("ssl_url", $ssl_url); +// Need to use ORIG_PATH_INFO in user homedirs +if (isset($_SERVER['PATH_INFO'])) { + $pathinfo = $_SERVER['PATH_INFO']; +} else { + $pathinfo = @$_SERVER['ORIG_PATH_INFO']; +} // Determine which component to run -$pathlist = explode('/', parse_url(@$_SERVER['PATH_INFO'],PHP_URL_PATH)); +$pathlist = explode('/', parse_url($pathinfo,PHP_URL_PATH)); while (end($pathlist) === "") array_pop($pathlist); $smarty->assign_by_ref("pathlist", $pathlist); $path = ''; @@ -131,6 +136,7 @@ $smarty->assign("title", "Set Me"); $smarty->assign("body", "Empty Body"); include($base."components/menu.php"); +//include($base."components/search.php"); // Load the component $comppath = $base."components/".$component['component'].".php"; @@ -174,7 +180,7 @@ if (@$displaytime) { $smarty->assign("totaltime", $totaltime); } -$smarty->display("foot".$language['file'].".tpl"); + $smarty->display("foot".$language['file'].".tpl"); } else { echo $compoutput; }