isAdmin()) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } function createVersionigFiles($folder) { global $settings; $documents = $folder->getDocuments(); foreach ($documents as $document) if (!createVersionigFile($document)) return false; $subFolders = $folder->getSubFolders(); foreach ($subFolders as $folder) if (!createVersionigFiles($folder)) return false; return true; } if (!isset($_GET["targetidform1"]) || !is_numeric($_GET["targetidform1"]) || intval($_GET["targetidform1"])<1) { UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); } $folderid = $_GET["targetidform1"]; $folder = getFolder($folderid); if (!is_object($folder)) { UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); } if (!createVersionigFiles($folder)) { UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); } add_log_line(); header("Location:../out/out.BackupTools.php"); ?>