Пример #1
0
function rest_delete()
{
    $response = array();
    $Project = get_project($response);
    if (!$Project) {
        echo json_encode($response);
        return;
    }
    remove_project_builds($Project);
    $Project->Delete();
    http_response_code(200);
}
Пример #2
0
 // end spam filter
 // If we should remove a spam filter
 @($RemoveSpamFilter = $_POST["RemoveSpamFilter"]);
 if ($RemoveSpamFilter) {
     @($removespam = $_POST["removespam"]);
     foreach ($removespam as $key => $value) {
         if ($value == 1) {
             pdo_query("DELETE FROM blockbuild WHERE id=" . qnum($key));
         }
     }
 }
 // end spam filter
 // If we should delete the project
 @($Delete = $_POST["Delete"]);
 if ($Delete) {
     remove_project_builds($projectid);
     $Project->Delete();
     echo "<script language=\"javascript\">window.location='user.php'</script>";
 }
 // end Delete project
 // If we should update the project
 @($Update = $_POST["Update"]);
 @($AddRepository = $_POST["AddRepository"]);
 if ($Update || $AddRepository) {
     $Project->Description = stripslashes_if_gpc_magic_quotes($_POST["description"]);
     $Project->HomeUrl = stripHTTP(stripslashes_if_gpc_magic_quotes($_POST["homeURL"]));
     $Project->CvsUrl = stripHTTP(stripslashes_if_gpc_magic_quotes($_POST["cvsURL"]));
     $Project->BugTrackerUrl = stripslashes_if_gpc_magic_quotes($_POST["bugURL"]);
     $Project->BugTrackerFileUrl = stripslashes_if_gpc_magic_quotes($_POST["bugFileURL"]);
     $Project->DocumentationUrl = stripHTTP(stripslashes_if_gpc_magic_quotes($_POST["docURL"]));
     $Project->TestingDataUrl = stripHTTP(stripslashes_if_gpc_magic_quotes($_POST["testingDataUrl"]));