* @license GPLv2 http://files.syscp.org/misc/COPYING.txt * @package Functions * @version $Id: function.makeCorrectDir.php 2724 2009-06-07 14:18:02Z flo $ */ /** * 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) { if(substr($dir, -1, 1) != '/') { $dir.= '/'; } if(substr($dir, 0, 1) != '/') { $dir = '/' . $dir; } $dir = makeSecurePath($dir); return $dir; }