Alexander Nicolaysen Sørnes : Remove unused code from deleteAny.php
Chris Morgan
cmorgan at winehq.org
Wed Sep 19 19:41:14 CDT 2007
Module: appdb
Branch: master
Commit: 1a91a5cdf2f629e195445e03512a2422a82b8a3b
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=1a91a5cdf2f629e195445e03512a2422a82b8a3b
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Wed Sep 19 11:42:20 2007 +0200
Remove unused code from deleteAny.php
---
admin/deleteAny.php | 28 +++-------------------------
1 files changed, 3 insertions(+), 25 deletions(-)
diff --git a/admin/deleteAny.php b/admin/deleteAny.php
index 7679675..2f146be 100644
--- a/admin/deleteAny.php
+++ b/admin/deleteAny.php
@@ -19,40 +19,18 @@ if($aClean['sConfirmed'] != "yes")
// 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
-
+
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
$oCategory = new Category($aClean['iCatId']);
if(!$oCategory->delete())
util_show_error_page_and_exit();
else
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;
- }
}
+
?>
More information about the wine-cvs
mailing list