diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index aa5ef570d1..f86c725232 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -40,11 +40,12 @@ return $s; } - function return_array($type = "all") + function return_array($type = "all", $id = "") { $filter = $this->filter($type); - if (gettype($type) == "integer") { - $filter = " and cat_id='$type'"; + + if ($type == "single") { + $filter = " and cat_id='$id'"; } $this->db->query("select * from phpgw_categories where cat_owner='" @@ -115,7 +116,7 @@ . $this->account_id . "'",__LINE__,__FILE__); } - function edit($cat_id,$cat_parent,$cat_name,$cat_description,$cat_data) + function edit($cat_id,$cat_parent,$cat_name,$cat_description = "",$cat_data = "") { $this->db->query("update phpgw_categories set cat_name='" . addslashes($cat_name) . "', " . "cat_description='" . addslashes($cat_description) . "', cat_data='" diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index 3cce9d133f..e561cfa473 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -79,7 +79,7 @@ $value = $$var; } - $this->data["$app_name"]["$var"] = $value; + $this->data[$app_name][$var] = $value; reset($this->data); return $this->data; } @@ -87,9 +87,9 @@ function delete($app_name, $var = "") { if ($var == "") { - $this->data["$app_name"] = array(); + $this->data[$app_name] = array(); } else { - unset($this->data["$app_name"]["$var"]); + unset($this->data[$app_name][$var]); } reset ($this->data); return $this->data;