(2003-2009) * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions * */ /** * Function which returns a correct dirname, means to add slashes at the beginning and at the end if there weren't some * * @param string The dirname * @return string The corrected dirname * @author Florian Lippert */ function makeCorrectDir($dir) { $dir = trim($dir); if (substr($dir, -1, 1) != '/') { $dir.= '/'; } if (substr($dir, 0, 1) != '/') { $dir = '/' . $dir; } $dir = makeSecurePath($dir); return $dir; }