- use superglobals instead of registered parameter vars

- move functions to include/category.php, include/application.php
This commit is contained in:
Jonathan Ernst
2004-12-25 20:03:34 +00:00
committed by WineHQ
parent 65dad05ed7
commit 5cea0f68f3
3 changed files with 58 additions and 58 deletions

View File

@@ -207,4 +207,22 @@ function make_cat_path($path)
return $str;
}
function deleteCategory($catId)
{
$r = mysql_query("SELECT appId FROM appFamily WHERE catId = $catId");
if($r)
{
while($ob = mysql_fetch_object($r))
deleteAppFamily($ob->appId);
$r = mysql_query("DELETE FROM appCategory WHERE catId = $catId");
if($r)
addmsg("Category $catId deleted", "green");
else
addmsg("Failed to delete category $catId:".mysql_error(), "red");
} else
{
addmsg("Failed to delete category $catId: ".mysql_error(), "red");
}
}
?>