--- docman.php 2002/09/06 17:34:06 1.33
+++ docman.php 2003/04/09 16:50:02 1.36
@@ -74,14 +74,16 @@
//////////////////////////////////////////////////////////////////
$gblTitle = "Document Manager";
- $gblVersion = "2.0-pre1";
+ $gblVersion = "2.0-pre2";
$secHash = "";
// location of html files
$html = $gblIncDir."/html";
- LoadLanguage($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]);
+ if (isset($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"])) {
+ LoadLanguage($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]);
+ }
// for security and configuration
$realm=$HTTP_SERVER_VARS["HTTP_HOST"];
@@ -147,8 +149,8 @@
}
include("$html/footer.html");
- global $debug;
- if ($debug) print $debug;
+# global $debug;
+# if ($debug) print $debug;
} // end function EndHTML
//////////////////////////////////////////////////////////////////
@@ -707,6 +709,8 @@
$note_html=$dirNote[$key];
}
+ $dir_html = isBlank($dir,"directory");
+
include("$html/Navigate-dirEntry.html");
} // iterate over dirs
@@ -717,6 +721,14 @@
$uurl = self_args(array($D,"fsort=".$fsort_arr[$fsort][2]));
$surl = self_args(array($D,"fsort=".$fsort_arr[$fsort][3]));
+ $html_uri = $webRoot;
+
+ if (substr($relDir,0,1) == "/") {
+ $html_uri .= substr($relDir,1,strlen($relDir)-1);
+ } else {
+ $html_uri .= $relDir;
+ }
+
include("$html/Navigate-fileHeader.html");
if (sizeof($fileList) > 0) {
@@ -782,9 +794,9 @@
$file_url_html.="\" TITLE=\"View file\">" ;
if (substr($file,0,5) != ".del/") {
- $file_url_html .= $file . "" . $a ;
+ $file_url_html .= isBlank($file) . "" . $a ;
} else {
- $file_url_html .= substr($file,5,strlen($file)-5) . " deleted";
+ $file_url_html .= isBlank(substr($file,5,strlen($file)-5)) . " deleted";
}
if (check_perm($relDir.$file,$gblPermNote)) {
@@ -1277,7 +1289,7 @@
$l = trim(fgets($fp_conf,4096));
if (substr($l,0,1) == "+") { // no comment
$arr=explode(":",$l);
- $groups_arr[$arr[0]] = $arr[1] ;
+ $groups_arr[$arr[0]] = str_replace(" ","",$arr[1]) ;
} elseif (substr($l,0,1) != "#") {
$arr=explode(":",$l);
$path=array_shift($arr);
@@ -1539,6 +1551,14 @@
}
//////////////////////////////////////////////////////////////////
+
+function isBlank($file,$what = "filename") {
+ if (trim($file) == "") return "whitespace $what";
+ if ($file == "") return "no $what";
+ return $file;
+}
+
+//////////////////////////////////////////////////////////////////
// MAIN PROGRAM
$gblFilePerms = 0640 ; // default for new files