Remove deleteAny.php
This commit is contained in:
committed by
Chris Morgan
parent
6ebd4cfa34
commit
30dc3d2b2c
@@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
/****************************************************/
|
|
||||||
/* code to delete versions, families and categories */
|
|
||||||
/****************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* application environment
|
|
||||||
*/
|
|
||||||
require("path.php");
|
|
||||||
require(BASE."include/incl.php");
|
|
||||||
require_once(BASE."include/category.php");
|
|
||||||
require_once(BASE."include/application.php");
|
|
||||||
require_once(BASE."include/monitor.php");
|
|
||||||
require_once(BASE."include/testData.php");
|
|
||||||
|
|
||||||
if($aClean['sConfirmed'] != "yes")
|
|
||||||
{
|
|
||||||
// ask for confirmation
|
|
||||||
// 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(isset($aClean['sWhat']) && $aClean['sWhat'] == "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");
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -18,7 +18,6 @@ function admin_menu()
|
|||||||
|
|
||||||
$m = new htmlmenu("Admin");
|
$m = new htmlmenu("Admin");
|
||||||
$m->add('Edit this Category', BASE."objectManager.php?iId=${aClean[iCatId]}&sClass=category&sAction=edit");
|
$m->add('Edit this Category', BASE."objectManager.php?iId=${aClean[iCatId]}&sClass=category&sAction=edit");
|
||||||
$url = BASE."admin/deleteAny.php?sWhat=category&iCatId=".$aClean['iCatId']."&sConfirmed=yes";
|
|
||||||
|
|
||||||
/* We only allow deletion of the category if it is empty */
|
/* We only allow deletion of the category if it is empty */
|
||||||
$oCat = new category($aClean['iCatId']);
|
$oCat = new category($aClean['iCatId']);
|
||||||
|
|||||||
Reference in New Issue
Block a user