mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Fix selection and display of extra fields in prefs and index
This commit is contained in:
parent
9bf3a84693
commit
74d54f6c6e
@ -81,7 +81,7 @@
|
|||||||
"d_email_work" => "", //yn
|
"d_email_work" => "", //yn
|
||||||
"d_email_home" => "", //yn
|
"d_email_home" => "", //yn
|
||||||
"bday" => "birthday",
|
"bday" => "birthday",
|
||||||
"url" => "URL",
|
"url" => "url",
|
||||||
//"access" => "access"
|
//"access" => "access"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -28,9 +28,19 @@
|
|||||||
"addressbook_footer" => "footer.tpl" ));
|
"addressbook_footer" => "footer.tpl" ));
|
||||||
|
|
||||||
$this = CreateObject("phpgwapi.contacts");
|
$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
|
// 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]]) &&
|
if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) &&
|
||||||
$phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) {
|
$phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) {
|
||||||
$showcol = display_name($column[0]);
|
$showcol = display_name($column[0]);
|
||||||
@ -57,7 +67,9 @@
|
|||||||
// following sets up the filter for read, then restores the filter string for later checking
|
// following sets up the filter for read, then restores the filter string for later checking
|
||||||
if ($filter == "none") { $filter = ""; }
|
if ($filter == "none") { $filter = ""; }
|
||||||
$savefilter = $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;
|
$qfilter = $filter;
|
||||||
$filter = $savefilter;
|
$filter = $savefilter;
|
||||||
|
@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
$this = CreateObject("phpgwapi.contacts");
|
$this = CreateObject("phpgwapi.contacts");
|
||||||
$extrafields = array(
|
$extrafields = array(
|
||||||
"pager" => "pager",
|
"pager" => "pager",
|
||||||
"mphone" => "mphone",
|
"mphone" => "mphone",
|
||||||
"ophone" => "ophone",
|
"ophone" => "ophone",
|
||||||
"address2" => "address2",
|
"address2" => "address2",
|
||||||
"bday" => "bday",
|
"bday" => "bday",
|
||||||
"url" => "url",
|
"url" => "url",
|
||||||
"notes" => "notes"
|
"notes" => "notes"
|
||||||
);
|
);
|
||||||
$qfields = $this->stock_contact_fields + $extrafields;
|
$qfields = $this->stock_contact_fields + $extrafields;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@
|
|||||||
}
|
}
|
||||||
if (! $totalerrors) {
|
if (! $totalerrors) {
|
||||||
$phpgw->preferences->read_repository();
|
$phpgw->preferences->read_repository();
|
||||||
while (list($pref[0]) = each($this->stock_contact_fields)) {
|
while (list($pref[0]) = each($qfields)) {
|
||||||
if ($ab_selected["$pref[0]"]) {
|
if ($ab_selected["$pref[0]"]) {
|
||||||
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
|
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user