Handle to val in a filter term
This commit is contained in:
parent
12d310a9cb
commit
3c55557c77
|
@ -1198,8 +1198,9 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) {
|
|||
// Need to specify a storage area, so need to look through other terms looking for a storage area, else we default to ZM_EVENTS_PATH
|
||||
if ( ! $StorageArea ) {
|
||||
for ( $j = 0; $j < count($terms); $j++ ) {
|
||||
if ( isset($terms[$j]['attr']) and $terms[$j]['attr'] == 'StorageId' ) {
|
||||
if ( isset($terms[$j]['attr']) and $terms[$j]['attr'] == 'StorageId' and isset($terms[$j]['val']) ) {
|
||||
$StorageArea = new Storage($terms[$j]['val']);
|
||||
break;
|
||||
}
|
||||
} // end foreach remaining term
|
||||
if ( ! $StorageArea ) $StorageArea = new Storage();
|
||||
|
@ -1211,7 +1212,7 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) {
|
|||
// Need to specify a storage area, so need to look through other terms looking for a storage area, else we default to ZM_EVENTS_PATH
|
||||
if ( ! $StorageArea ) {
|
||||
for ( $j = $i; $j < count($terms); $j++ ) {
|
||||
if ( isset($terms[$i]['attr']) and $terms[$i]['attr'] == 'StorageId' ) {
|
||||
if ( isset($terms[$i]['attr']) and $terms[$i]['attr'] == 'StorageId' and isset($terms[$j]['val']) ) {
|
||||
$StorageArea = new Storage($terms[$i]['val']);
|
||||
}
|
||||
} // end foreach remaining term
|
||||
|
@ -1298,8 +1299,10 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) {
|
|||
|
||||
$filter['query'] .= $querySep.urlencode("filter[Query][terms][$i][op]").'='.urlencode($terms[$i]['op']);
|
||||
$filter['fields'] .= "<input type=\"hidden\" name=\"filter[Query][terms][$i][op]\" value=\"".htmlspecialchars($terms[$i]['op'])."\"/>\n";
|
||||
if ( isset($terms[$i]['val']) ) {
|
||||
$filter['query'] .= $querySep.urlencode("filter[Query][terms][$i][val]").'='.urlencode($terms[$i]['val']);
|
||||
$filter['fields'] .= "<input type=\"hidden\" name=\"filter[Query][terms][$i][val]\" value=\"".htmlspecialchars($terms[$i]['val'])."\"/>\n";
|
||||
}
|
||||
} // end foreach term
|
||||
if ( isset($terms[$i]['cbr']) ) {
|
||||
$filter['query'] .= $querySep.urlencode("filter[Query][terms][$i][cbr]").'='.urlencode($terms[$i]['cbr']);
|
||||
|
|
Loading…
Reference in New Issue