From 3e2952ece18d7cda6a12fddba2f66eb0b40d6549 Mon Sep 17 00:00:00 2001 From: jengo Date: Thu, 11 Jan 2001 15:33:23 +0000 Subject: [PATCH] Fixed it not loading properly, due to last nights changes to how classes are loaded --- phpgwapi/inc/class.categories.inc.php | 12 ++++++++++-- phpgwapi/inc/class.phpgw.inc.php | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) 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); } }