Commit 7ac05d33 authored by lphuberdeau's avatar lphuberdeau

[MOD] Allow multiple categories in the filter

parent 5861e246
favicon.png

184 Bytes | W: | H:

favicon.png

785 Bytes | W: | H:

favicon.png
favicon.png
favicon.png
favicon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -3837,8 +3837,8 @@ class TikiLib extends TikiDB {
$tmp_mid = array();
foreach ($filter as $type=>$val) {
if ($type == 'categId') {
$join_tables .= " inner join `tiki_objects` as tob on (tob.`itemId`= tp.`pageName` and tob.`type`= ?) inner join `tiki_category_objects` as tc on (tc.`catObjectId`=tob.`objectId` and tc.`categId`=?) ";
$join_bindvars = array('wiki page', $val);
$join_tables .= " inner join `tiki_objects` as tob on (tob.`itemId`= tp.`pageName` and tob.`type`= ?) inner join `tiki_category_objects` as tc on (tc.`catObjectId`=tob.`objectId` and tc.`categId` IN(" . implode(', ', array_fill(0, count( (array) $val ), '?')) . ")) ";
$join_bindvars = array_merge(array('wiki page'), (array) $val);
} elseif ($type == 'lang') {
$tmp_mid[] = 'tp.`lang`=?';
$bindvars[] = $val;
......
......@@ -2,11 +2,11 @@
$inputConfiguration = array(
array( 'staticKeyFilters' => array(
'categId' => 'digits',
'list' => 'alpha',
) ),
array( 'staticKeyFiltersForArrays' => array(
'languages' => 'alpha',
'categId' => 'digits',
) ),
array( 'catchAllUnset' => null ),
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment