- fix version deletion
- redirect in the correct page when something is deleted
This commit is contained in:
@@ -32,24 +32,24 @@ if($_REQUEST['what'])
|
||||
switch($_REQUEST['what'])
|
||||
{
|
||||
case "comment":
|
||||
// delete a comment
|
||||
//TODO
|
||||
// TODO: delete a comment
|
||||
redirect(BASE."appview.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']);
|
||||
break;
|
||||
case "category":
|
||||
// delete category and the apps in it
|
||||
deleteCategory($_REQUEST['catId']);
|
||||
redirect(BASE."appbrowse.php");
|
||||
break;
|
||||
case "appFamily":
|
||||
// delete app family & all its versions
|
||||
deleteAppFamily($_REQUEST['appId']);
|
||||
redirect(BASE."appbrowse.php");
|
||||
break;
|
||||
case "appVersion":
|
||||
// delete a version
|
||||
deleteAppVersion($_REQUEST['versionId']);
|
||||
redirect(BASE."appview.php?appId=".$_REQUEST['appId']);
|
||||
break;
|
||||
}
|
||||
|
||||
//FIXME need to redirect to the page before the confirmation page
|
||||
redirect(BASE."appbrowse.php");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -446,8 +446,8 @@ else if($appId && $versionId)
|
||||
echo '<form method=post name=message action=admin/editAppVersion.php?appId='.$appId.'&versionId='.$versionId.'>';
|
||||
echo '<input type=submit value="Edit Version Info" class=button>';
|
||||
echo '</form>';
|
||||
$url = BASE."admin/deleteAny.php?what=appVersion&versionId=".$_REQUEST['versionId']."&confirmed=yes";
|
||||
echo "<form method=\"post\" name=\"delete\" action=\"javascript:deleteURL(\"Are you sure?\", \"".$url."\")\">";
|
||||
$url = BASE."admin/deleteAny.php?what=appVersion&appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']."&confirmed=yes";
|
||||
echo "<form method=\"post\" name=\"delete\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\">";
|
||||
echo '<input type=submit value="Delete Version" class="button">';
|
||||
echo '</form>';
|
||||
echo '<form method=post name=message action=admin/addAppNote.php?appId='.$appId.'&versionId='.$versionId.'>';
|
||||
|
||||
Reference in New Issue
Block a user