Filtering should work now

This commit is contained in:
Miles Lott 2001-02-04 20:59:05 +00:00
parent d99a6501ed
commit 2daff5b792

View File

@ -44,14 +44,21 @@
if (! $start)
$start = 0;
// insert acl stuff here
$offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
// insert acl stuff here in lieu of old access perms
// 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"; }
$entries = $this->read($start,$offset,$columns_to_display,$query,$filter,$sort,$order);
$qfilter = $filter;
$filter = $savefilter;
$qcols = $columns_to_display + array("access");
// read the entry list
$entries = $this->read($start,$offset,$qcols,$query,$qfilter,$sort,$order);
$search_filter = $phpgw->nextmatchs->show_tpl("index.php",
$start, $this->total_records,
@ -98,6 +105,10 @@
// Show the entries
for ($i=0;$i<count($entries);$i++) { // each entry
if ( ($entries[$i]["access"] == $filter) ||
($entries[$i]["access"] == "," . $filter . ",") ||
($filter == "") ||
($filter == "none")) {
$t->set_var(columns,"");
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$t->set_var(row_tr_color,$tr_color);
@ -140,6 +151,7 @@
reset($columns_to_display); // If we don't reset it, our inside while won't loop
}
}
$t->pparse("out","addressbook_footer");
$phpgw->common->phpgw_footer();