appdb/. appbrowse.php
WineHQ
wineowner at wine.codeweavers.com
Fri Jul 7 11:23:42 CDT 2006
ChangeSet ID: 26322
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2006/07/07 11:23:42
Modified files:
. : appbrowse.php
Log message:
Jonathan Ernst <jonathan at ernstfamily.ch>
Enable filtering in appbrowse.php
Patch: http://cvs.winehq.org/patch.py?id=26322
Old revision New revision Changes Path
1.19 1.20 +5 -17 appdb/appbrowse.php
Index: appdb/appbrowse.php
diff -u -p appdb/appbrowse.php:1.19 appdb/appbrowse.php:1.20
--- appdb/appbrowse.php:1.19 7 Jul 2006 16:23:42 -0000
+++ appdb/appbrowse.php 7 Jul 2006 16:23:42 -0000
@@ -9,36 +9,24 @@
// application environment
include("path.php");
require(BASE."include/"."incl.php");
+require(BASE."include/filter.php");
require(BASE."include/"."appdb.php");
require(BASE."include/"."category.php");
-$aClean = array(); //array of filtered user input
-
-$aClean['iCatId'] = makeSafe($_REQUEST['iCatId']);
-
function admin_menu()
{
- if(isset($_REQUEST['iCatId'])) $iCatId=$_REQUEST['iCatId'];
- else $iCatId="";
+ global $aClean;
$m = new htmlmenu("Admin");
- $m->add("Edit this Category", BASE."admin/addCategory.php?iCatId=$iCatId");
- $url = BASE."admin/deleteAny.php?sWhat=category&iCatId=$iCatId&confirmed=yes";
+ $m->add("Edit this Category", BASE."admin/addCategory.php?iCatId=".$aClean['iCatId']);
+ $url = BASE."admin/deleteAny.php?sWhat=category&iCatId=".$aClean['iCatId']."&sConfirmed=yes";
$m->add("Delete this Category", "javascript:deleteURL(\"Are you sure?\", \"".$url."\")");
$m->done();
}
-if( empty( $aClean['iCatId'] ) )
-{
- $aClean['iCatId'] = 0; // ROOT
-}
-
-if(!is_numeric($aClean['iCatId']))
- util_show_error_page_and_exit("Something went wrong with the category ID");
-
// list sub categories
-$cat = new Category($aClean['iCatId']);
+$cat = new Category($aClean['iCatId']?$aClean['iCatId']:"0");
$catFullPath = make_cat_path($cat->getCategoryPath());
$subs = $cat->aSubcatsIds;
More information about the wine-cvs
mailing list