Fix selection and display of extra fields in prefs and index

This commit is contained in:
Miles Lott 2001-02-19 13:16:07 +00:00
parent 9bf3a84693
commit 74d54f6c6e
3 changed files with 22 additions and 10 deletions

View File

@ -81,7 +81,7 @@
"d_email_work" => "", //yn
"d_email_home" => "", //yn
"bday" => "birthday",
"url" => "URL",
"url" => "url",
//"access" => "access"
);

View File

@ -28,9 +28,19 @@
"addressbook_footer" => "footer.tpl" ));
$this = CreateObject("phpgwapi.contacts");
$extrafields = array(
"pager" => "pager",
"mphone" => "mphone",
"ophone" => "ophone",
"address2" => "address2",
"bday" => "bday",
"url" => "url",
"notes" => "notes"
);
$qfields = $this->stock_contact_fields + $extrafields;
// create column list and the top row of the table based on user prefs
while ($column = each($this->stock_contact_fields)) {
while ($column = each($qfields)) {
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) &&
$phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) {
$showcol = display_name($column[0]);
@ -57,7 +67,9 @@
// following sets up the filter for read, then restores the filter string for later checking
if ($filter == "none") { $filter = ""; }
$savefilter = $filter;
if ($filter != "" ) { $filter = "access=$filter"; }
// Set filter to display entries where tid is blank, else they may be accounts, etc.
if ($filter != "" ) { $filter = "tid="; }
//if ($filter != "" ) { $filter = "access=$filter"; }
$qfilter = $filter;
$filter = $savefilter;

View File

@ -23,13 +23,13 @@
$this = CreateObject("phpgwapi.contacts");
$extrafields = array(
"pager" => "pager",
"mphone" => "mphone",
"ophone" => "ophone",
"pager" => "pager",
"mphone" => "mphone",
"ophone" => "ophone",
"address2" => "address2",
"bday" => "bday",
"url" => "url",
"notes" => "notes"
"bday" => "bday",
"url" => "url",
"notes" => "notes"
);
$qfields = $this->stock_contact_fields + $extrafields;
@ -40,7 +40,7 @@
}
if (! $totalerrors) {
$phpgw->preferences->read_repository();
while (list($pref[0]) = each($this->stock_contact_fields)) {
while (list($pref[0]) = each($qfields)) {
if ($ab_selected["$pref[0]"]) {
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
} else {