mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-12 00:10:37 +01:00
Categories class is now somewhat working
This commit is contained in:
parent
e396d52301
commit
ed0135f488
@ -25,7 +25,7 @@
|
|||||||
$this->app_name = $app_name;
|
$this->app_name = $app_name;
|
||||||
$this->db = $phpgw->db;
|
$this->db = $phpgw->db;
|
||||||
|
|
||||||
$this->db->query("select * from phpgw_categories where cat_owner='$account_id' and app_name='"
|
$this->db->query("select * from phpgw_categories where cat_owner='$account_id' and cat_appname='"
|
||||||
. "$app_name'",__LINE__,__FILE__);
|
. "$app_name'",__LINE__,__FILE__);
|
||||||
while ($this->db->next_record()) {
|
while ($this->db->next_record()) {
|
||||||
$this->cats[]["id"] = $this->db->f("cat_id");
|
$this->cats[]["id"] = $this->db->f("cat_id");
|
||||||
@ -37,17 +37,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return into a select box, list or other formats
|
// Return into a select box, list or other formats
|
||||||
function list()
|
function lista()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function add($app_name,$cat_name,$cat_parent,$cat_description = "", $cat_data = "")
|
function add($cat_name,$cat_parent,$cat_description = "", $cat_data = "")
|
||||||
{
|
{
|
||||||
$this->db->query("insert into phpgw_categories (cat_parent,cat_owner,cat_appname,cat_name,"
|
$this->db->query("insert into phpgw_categories (cat_parent,cat_owner,cat_appname,cat_name,"
|
||||||
. "cat_description,cat_data) values ('$cat_parent','" . $this->account_id . "','"
|
. "cat_description,cat_data) values ('$cat_parent','" . $this->account_id . "','"
|
||||||
. "$app_name','" . addslashes($cat_name) . "','" . addslashes($cat_description)
|
. $this->app_name . "','" . addslashes($cat_name) . "','" . addslashes($cat_description)
|
||||||
. "','$cat_data'",__LINE__,__FILE__);
|
. "','$cat_data')",__LINE__,__FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete($cat_id)
|
function delete($cat_id)
|
||||||
|
@ -42,7 +42,8 @@
|
|||||||
//echo "Account ID (After Initializing) = ".$this->account_id."<br>\n";
|
//echo "Account ID (After Initializing) = ".$this->account_id."<br>\n";
|
||||||
|
|
||||||
if ($load_pref) {
|
if ($load_pref) {
|
||||||
$db2->query("SELECT preference_value FROM preferences WHERE preference_owner=".$this->account_id,__LINE__,__FILE__);
|
$db2->query("SELECT preference_value FROM preferences WHERE preference_owner='"
|
||||||
|
. $this->account_id . "'",__LINE__,__FILE__);
|
||||||
$db2->next_record();
|
$db2->next_record();
|
||||||
$pref_info = $db2->f("preference_value");
|
$pref_info = $db2->f("preference_value");
|
||||||
$this->preference = unserialize($pref_info);
|
$this->preference = unserialize($pref_info);
|
||||||
|
Loading…
Reference in New Issue
Block a user