- access most globals by their $_XYZ['varname'] name
- fix some code errors and typos (missing $ in front of variable names and so on) - fixed a lot of warnings that would have been thrown when error_reporting is set to show notices (if(isset($variable))) instead of if($variable) for example)
This commit is contained in:
@@ -11,7 +11,8 @@ require(BASE."include/"."category.php");
|
||||
|
||||
function admin_menu()
|
||||
{
|
||||
global $catId;
|
||||
if(isset($_REQUEST['catId'])) $catId=$_REQUEST['catId'];
|
||||
else $catId="";
|
||||
|
||||
$m = new htmlmenu("Admin");
|
||||
$m->add("Edit this Category", $apidb_root."admin/editCategory.php?catId=$catId");
|
||||
@@ -22,10 +23,8 @@ function admin_menu()
|
||||
$m->done();
|
||||
}
|
||||
|
||||
$catId = $_REQUEST['catId'];
|
||||
|
||||
if(!$catId)
|
||||
$catId = 0; // ROOT
|
||||
if(isset($_REQUEST['catId'])) $catId=$_REQUEST['catId'];
|
||||
else $catId=0; // ROOT
|
||||
|
||||
if( !is_numeric($catId) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user