function createDir($strDirName) { $strDirName = trim($strDirName); if (!$this->checkName($strDirName)) { return false; } $strPageName = $strDirName; $strDirName = $this->getUnixName($strPageName); if (getFileObjectAndFind($this->path . SLASH . $strDirName, 'dir') !== false) { return setError(sprintf(_('The directory %s exists.'), $strDirName)); } //on supprime le cache du menu if (!deleteMenuCache()) { return false; } if (!parent::createDir($strDirName)) { return false; } //set the virtual name if (!($oDir = getFileObject($this->path . SLASH . basename($strDirName)))) { return setError('internal error, pdircategory, createDir'); } if (!$oDir->setVirtualName($strPageName)) { return false; } return true; }