Menu

#23 2 bug fixes and 1 suggestion

open
nobody
None
5
2006-07-13
2006-07-13
Ben Morse
No

fm.php: Line 368
Filename is spelled filenme

fm.php Line 1249
line should return 1 not ""

Suggestion, allow hiding extension types:
in header:
$HiddenFilesExt = array("php", "html", "css", "js");
//ad loop for caps for all

for($i = 0; $i < sizeof($HiddenFilesExt); $i++)
$HiddenFilesExt[$i] = strtoupper($HiddenFilesExt[$i]);

-------------------------
function hidecheck ($ckfilename) {
global $HiddenFiles;
global $HiddenFilesExt;
$okay=1;

$dotpos = strrpos($ckfilename, ".");
if ($dotpos < 1) {
return "";
}
else {
$ckfileext =
strtoupper(substr($ckfilename,$dotpos+1));
}

foreach($HiddenFiles as $name) {
// check the name is not the same as the hidden
file name
if($ckfilename == $name) {
$okay = ""; // unset if not okay
//(not unset, but empty)
}
}
if( in_array($ckfileext, $HiddenFilesExt ) )
$okay = "";

return $okay;
}

Discussion

  • Ben Morse

    Ben Morse - 2006-07-13
    • summary: 2 bugs and 1 suggestion --> 2 bug fixes and 1 suggestion
     
  • Ben Morse

    Ben Morse - 2006-07-13

    Logged In: YES
    user_id=902218

    1 more bug, this line needs to be added in the reg_globals
    section
    if (isset($_REQUEST['filename'] )) { $filename =
    $_REQUEST['filename']; }
    else { $filename = ""; }

     

Log in to post a comment.

MongoDB Logo MongoDB