mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-22 19:01:43 +02:00
Filtering should work now - see index.php for example
This commit is contained in:
parent
ffaa602338
commit
d99a6501ed
@ -158,7 +158,7 @@
|
|||||||
// and whatever fields you want to see
|
// and whatever fields you want to see
|
||||||
{
|
{
|
||||||
global $phpgw,$phpgw_info;
|
global $phpgw,$phpgw_info;
|
||||||
$DEBUG = 1;
|
//$DEBUG = 1;
|
||||||
|
|
||||||
list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields);
|
list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields);
|
||||||
if (count($stock_fieldnames)) {
|
if (count($stock_fieldnames)) {
|
||||||
@ -168,7 +168,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the following filter section is not working yet
|
|
||||||
if ($filter) {
|
if ($filter) {
|
||||||
if ($DEBUG) { echo "DEBUG - Inbound filter is: #".$filter."#"; }
|
if ($DEBUG) { echo "DEBUG - Inbound filter is: #".$filter."#"; }
|
||||||
$filterarray = split(',',$filter);
|
$filterarray = split(',',$filter);
|
||||||
@ -198,14 +197,17 @@
|
|||||||
|
|
||||||
if ($extra) {
|
if ($extra) {
|
||||||
while (list($name,$value) = each($extra)) {
|
while (list($name,$value) = each($extra)) {
|
||||||
$filterextra .= " AND contact_name='".$name."' AND contact_value='".$value."',";
|
if ($name == "access" && $value != "private") {
|
||||||
|
$value = "%," . $value . ",%";
|
||||||
|
}
|
||||||
|
$filterextra .= " AND contact_name='".$name."' AND contact_value like '".$value."',";
|
||||||
}
|
}
|
||||||
$filterextra = substr($filterextra,0,-1);
|
$filterextra = substr($filterextra,0,-1);
|
||||||
} else {
|
} else {
|
||||||
$filterstock = " AND ($filterlist) ";
|
$filterstock = " AND ($filterlist) ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($DEBUG) {
|
if ($DEBUG && ($filterextra || $filterstock)) {
|
||||||
if ($filterextra) {
|
if ($filterextra) {
|
||||||
echo "<br>DEBUG - Filtering on extra fields with: #" . $filterextra . "#";
|
echo "<br>DEBUG - Filtering on extra fields with: #" . $filterextra . "#";
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user