blob: ff55371cc513877538cf1b73822af1882fe4b55d [file] [log] [blame]
<?php
/**
* Copyright (c) 2020 Eclipse Foundation and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
# Grabs the POSTed paths_to_archive from the 404 file browser
# and shims them into the account_requests table for actioning
if($_SERVER['REQUEST_METHOD'] == "POST") {
if(!empty($_POST['paths_to_archive'][0])) {
$dir = dirname($_SERVER['DOCUMENT_ROOT'] . $_POST['paths_to_archive'][0]);
# Validate that paths_to_archive contains valid data
if(is_dir($dir)) {
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/downloads/downloadDirectory.class.php");
$DownloadDirectory = new DownloadDirectory();
$dir_html = $DownloadDirectory->getFormOutput("", "", $dir);
header("Location: " . dirname($_POST['paths_to_archive'][0]));
exit;
}
}
}
header("Location: https://www.eclipse.org/");
?>