/** * Return true if a folder path is allowed according to settings. * * @param $path * @return bool */ protected function _is_allowed_folder_path($path) { $parts = explode('/', rtrim($path, '/')); // The folder or one of it's parent folders is no good. Throw it out. foreach ($parts as $path_part) { if (!Assets_helper::is_allowed_folder_name($path_part)) { // Continue the outer loop return FALSE; } } return TRUE; }