diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index 67701f88b7..a6c9782248 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -18,9 +18,17 @@ var $cats; var $db; - function categories($account_id,$app_name) + function categories($account_id = "",$app_name = "") { - global $phpgw; + global $phpgw, $phpgw_info; + + if (! $account_id) { + $account_id = $phpgw_info["user"]["account_id"]; + } + if (! $app_name) { + $app_name = $phpgw_info["flags"]["currentapp"]; + } + $this->account_id = $account_id; $this->app_name = $app_name; $this->db = $phpgw->db; diff --git a/phpgwapi/inc/class.phpgw.inc.php b/phpgwapi/inc/class.phpgw.inc.php index aae80f2718..95982a239c 100644 --- a/phpgwapi/inc/class.phpgw.inc.php +++ b/phpgwapi/inc/class.phpgw.inc.php @@ -128,7 +128,7 @@ $sep = filesystem_separator(); $template_root = $this->common->get_tpl_dir(); - if (is_dir($template_root)) { + if (is_dir($template_root)) { $this->template = CreateObject("phpgwapi.Template", $template_root); } }