diff --git a/addressbook/index.php b/addressbook/index.php index 35b14abf78..b6fd81cca1 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -17,8 +17,6 @@ "enable_nextmatchs_class" => True); include("../header.inc.php"); - //echo "
Time track = " . $phpgw_info["apps"]["timetrack"]["enabled"]; - $t = new Template($phpgw_info["server"]["app_tpl"]); $t->set_file(array( "addressbook_header" => "header.tpl", "column" => "column.tpl", @@ -27,12 +25,12 @@ $this = CreateObject("phpgwapi.contacts"); - while ($column = each($this->stock_addressbook_fields)) { - if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) && - $phpgw_info["user"]["preferences"]["addressbook"][$column[0]]) { + while ($column = each($this->stock_contact_fields)) { + if (isset($phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) && + $phpgw_info["user"]["preferences"]["addressbook"][$column[1]]) { $cols .= " \n"; $cols .= ' '; - $cols .= $phpgw->nextmatchs->show_sort_order($sort,"ab_" . $column[0],$order,"index.php",lang($column[1])); + $cols .= $phpgw->nextmatchs->show_sort_order($sort, $column[0],$order,"index.php",lang($column[1])); $cols .= "\n "; $cols .= "\n"; @@ -48,7 +46,7 @@ $offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]; - $entries = $this->read($start,$offset,$access,$columns_to_display,$query,$filter,$sort,$order); + $entries = $this->read($start,$offset,$columns_to_display,$query,$sort,$order); $search_filter = $phpgw->nextmatchs->show_tpl("index.php", $start, $this->total_records, @@ -99,7 +97,7 @@ $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); $t->set_var(row_tr_color,$tr_color); $myid = $entries[$i]["id"]; - $myowner = $entries[$i]["owner"]; + $myowner = $entries[$i]["uid"]; while ($column = each($columns_to_display)) { // each entry column $ref=$data=""; diff --git a/addressbook/preferences.php b/addressbook/preferences.php index b525f03a36..846d2f5ff8 100644 --- a/addressbook/preferences.php +++ b/addressbook/preferences.php @@ -18,13 +18,15 @@ include("../header.inc.php"); + $this = CreateObject("phpgwapi.contacts"); + if ($submit) { $totalerrors = 0; if (! count($ab_selected)) { $errors[$totalerrors++] = lang("You must select at least 1 column to display"); } if (! $totalerrors) { - while (list($pref[0]) = each($abc)) { + while (list($pref[0]) = each($this->stock_contact_fields)) { if ($ab_selected["$pref[0]"]) { $phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]); } else { @@ -61,7 +63,7 @@ $i = 0; $j = 0; $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); echo ''; - while (list($col, $descr) = each($abc)) { + while (list($col, $descr) = each($this->stock_contact_fields)) { // echo "
test: $col - $i $j - " . count($abc); $i++; $j++; @@ -77,7 +79,7 @@ $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); echo ''; } - if ($j == count($abc)) { + if ($j == count($this->stock_contact_fields)) { if ($i == 1) { echo "  "; }