/**
* Create new directories.
* If in safe_mode, nothing happens.
* @return boolean true if created, false otherwise.
*/
function processNewDir()
{
if ($this->config['safe_mode'] == true) {
return false;
}
if (isset($_GET['newDir']) && isset($_GET['dir'])) {
$newDir = rawurldecode($_GET['newDir']);
$dir = rawurldecode($_GET['dir']);
$path = Files::makePath($this->getImagesDir(), $dir);
$fullpath = Files::makePath($path, Files::escape($newDir));
if (is_dir($fullpath)) {
return false;
}
return Files::createFolder($fullpath);
}
}