/** * Prefixes with DATA_PATH and slashify */ function NormalizeWebFileName($file) { static $finder; if (!isset($finder)) { $finder = new FileFinder(); } if (defined("DATA_PATH")) { $wikipath = DATA_PATH; $wikipath = $finder->_strip_last_pathchar($wikipath); if (!$file) { return $finder->forcePathSlashes($wikipath); } else { return $finder->forcePathSlashes($wikipath . '/' . $file); } } else { return $finder->forcePathSlashes($file); } }