From 8892cc271a801d707ac34c194fb9d95a131cf359 Mon Sep 17 00:00:00 2001 From: Luiz Augusto Sallinas Date: Sun, 5 Jul 2015 17:59:45 -0300 Subject: [PATCH] Update wayfinder.class.php Added complexWhere parameter. A SQL expression of criteria to build any additional complex where clauses from (like CASE WHEN or stored functions return values) --- core/components/wayfinder/wayfinder.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/components/wayfinder/wayfinder.class.php b/core/components/wayfinder/wayfinder.class.php index de6c94f..7e85eea 100644 --- a/core/components/wayfinder/wayfinder.class.php +++ b/core/components/wayfinder/wayfinder.class.php @@ -531,6 +531,11 @@ public function getData() { $c->leftJoin('modResourceGroupResource','ResourceGroupResources'); $c->query['distinct'] = 'DISTINCT'; + /* add the complex SQL expression where clause from */ + if ( $this->_config['complexWhere'] ) { + $c->where( $this->_config['complexWhere'] ); + } + /* add the ignore hidden option to the where clause */ if (!$this->_config['ignoreHidden']) { $c->where(array('hidemenu:=' => 0));