From f6a2c159a140d4c05e0821ca019fe2b0c70dfc56 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 13 Apr 2010 10:29:05 +0000 Subject: [PATCH] accept global_cats param --- admin/inc/class.admin_categories.inc.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/admin/inc/class.admin_categories.inc.php b/admin/inc/class.admin_categories.inc.php index 1b78d66ab7..599a1e18de 100644 --- a/admin/inc/class.admin_categories.inc.php +++ b/admin/inc/class.admin_categories.inc.php @@ -235,10 +235,15 @@ class admin_categories { throw new egw_exception_assertion_failed(__METHOD__.'($query,...) $query[appname] NOT set!'); } + $globalcat = true; + if (isset($query['global_cats']) && $query['global_cats']===false) + { + $globalcat = false; + } egw_cache::setSession(__CLASS__,'nm',$query); $cats = new categories(categories::GLOBAL_ACCOUNT,$query['appname']); - $rows = $cats->return_sorted_array($query['start'],$query['num_rows'],$query['search'],$query['sort'],$query['order'],true,0,true); + $rows = $cats->return_sorted_array($query['start'],$query['num_rows'],$query['search'],$query['sort'],$query['order'],$globalcat,0,true); foreach($rows as &$row) { @@ -271,7 +276,7 @@ class admin_categories */ public function index(array $content=null,$msg='') { - //_debug_array($content); + //_debug_array($_GET); if(!isset($content)) { @@ -304,6 +309,10 @@ class admin_categories { $content['nm']['appname'] = $_GET['appname']; } + if (isset($_GET['global_cats']) && empty($_GET['global_cats'] )) + { + $content['nm']['global_cats'] = false; + } } else {