Make option dialog use ncat_id not cat_id

This commit is contained in:
Miles Lott 2001-03-27 21:50:37 +00:00
parent 7100c51a3a
commit 68df73e563
4 changed files with 6 additions and 6 deletions

View File

@ -151,7 +151,7 @@
$fields["access"] = 'public'; $fields["access"] = 'public';
} }
$fields["cat_id"] = $cat_id; $fields["cat_id"] = $ncat_id;
addressbook_add_entry($phpgw_info["user"]["account_id"],$fields,$fields["access"],$fields["cat_id"]); addressbook_add_entry($phpgw_info["user"]["account_id"],$fields,$fields["access"],$fields["cat_id"]);
$ab_id = addressbook_get_lastid(); $ab_id = addressbook_get_lastid();

View File

@ -158,7 +158,7 @@
$fields["access"] = 'public'; $fields["access"] = 'public';
} }
$fields["cat_id"] = $cat_id; $fields["cat_id"] = $ncat_id;
$userid = $phpgw_info["user"]["account_id"]; $userid = $phpgw_info["user"]["account_id"];

View File

@ -34,10 +34,10 @@
} }
// Return a select form element with the categories options in it // Return a select form element with the categories options in it
function cat_option($cat_id='',$notall=False) { function cat_option($cat_id='',$name='cat_id',$notall=False) {
global $phpgw_info; global $phpgw_info;
// Setup all and none first // Setup all and none first
$cats_link = "<select name=\"cat_id\">"; $cats_link = "<select name=\"".$name."\">";
if (!$notall) { if (!$notall) {
$cats_link .= "<option value =\"all\""; $cats_link .= "<option value =\"all\"";
if ($cat_id=="all") { if ($cat_id=="all") {
@ -258,7 +258,7 @@
$cat_id = $fields["cat_id"]; $cat_id = $fields["cat_id"];
} }
$cats_link = cat_option($cat_id,True); $cats_link = cat_option($cat_id,'ncat_id',True);
if ($access == 'private') { if ($access == 'private') {
$access_check = ' checked'; $access_check = ' checked';

View File

@ -186,7 +186,7 @@
$t->set_var(cats,lang('Category')); $t->set_var(cats,lang('Category'));
$t->set_var(cats_url,$phpgw->link("/addressbook/index.php", $t->set_var(cats_url,$phpgw->link("/addressbook/index.php",
"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id")); "sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
$t->set_var(cats_link,cat_option($cat_id)); $t->set_var(cats_link,cat_option($cat_id,'cat_id'));
$t->set_var(lang_cats,lang('Select')); $t->set_var(lang_cats,lang('Select'));
$t->set_var("lang_addressbook",lang("Address book")); $t->set_var("lang_addressbook",lang("Address book"));
$t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]); $t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);