From: Rene R. <ren...@us...> - 2003-05-26 13:38:35
|
Update of /cvsroot/bobs/bobs In directory sc8-pr-cvs1:/tmp/cvs-serv25541 Modified Files: tree.php Log Message: Added a check for being in the http root Index: tree.php =================================================================== RCS file: /cvsroot/bobs/bobs/tree.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- tree.php 26 Oct 2002 02:01:35 -0000 1.5 +++ tree.php 26 May 2003 13:38:31 -0000 1.6 @@ -24,8 +24,14 @@ $config["where"] = $_GET['where']; } -$treehref = dirname($_SERVER['PHP_SELF']) . "/tree.php"; -$filehref = dirname($_SERVER['PHP_SELF']) . "/files.php"; +// Make sure we don't get "//" in the start of the path +$location = dirname($_SERVER['PHP_SELF']); +if ( $location == '/' ) { + $location = ""; +} +$treehref = $location . "/tree.php"; +$filehref = $location . "/files.php"; + // target frame $target = "files"; |