Remove unused code from deleteAny.php

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-09-19 11:42:20 +02:00
committed by Chris Morgan
parent e82dc74162
commit 1a91a5cdf2

View File

@@ -19,40 +19,18 @@ if($aClean['sConfirmed'] != "yes")
// could do some Real Damage if someone accidently hits the delete button on the main category :) // could do some Real Damage if someone accidently hits the delete button on the main category :)
// //
// perhaps we can do this with some javascript, popup // perhaps we can do this with some javascript, popup
util_show_error_page_and_exit("Not confirmed"); util_show_error_page_and_exit("Not confirmed");
} }
if($aClean['sWhat']) if(isset($aClean['sWhat']) && $aClean['sWhat'] == "category")
{ {
switch($aClean['sWhat'])
{
case "category":
// delete category and the apps in it // delete category and the apps in it
$oCategory = new Category($aClean['iCatId']); $oCategory = new Category($aClean['iCatId']);
if(!$oCategory->delete()) if(!$oCategory->delete())
util_show_error_page_and_exit(); util_show_error_page_and_exit();
else else
util_redirect_and_exit(BASE."appbrowse.php"); util_redirect_and_exit(BASE."appbrowse.php");
break;
case "appFamily":
// delete app family & all its versions
$oApp = new Application($aClean['iAppId']);
if(!$oApp->delete())
util_show_error_page_and_exit();
else
util_redirect_and_exit(BASE."appbrowse.php");
break;
case "appVersion":
$oVersion = new Version($aClean['iVersionId']);
if(!$oVersion->delete())
util_show_error_page_and_exit();
else
{
$oApp = new application($aClean['iAppId']);
util_redirect_and_exit($oApp->objectMakeUrl());
}
break;
}
} }
?> ?>