diff --git a/modules/mod_finder/helper.php b/modules/mod_finder/helper.php index dad6287c4653d..993220b2b65d3 100644 --- a/modules/mod_finder/helper.php +++ b/modules/mod_finder/helper.php @@ -31,31 +31,17 @@ class ModFinderHelper */ public static function getGetFields($route = null, $paramItem = 0) { - $fields = null; + $fields = array(); $uri = JUri::getInstance(JRoute::_($route)); $uri->delVar('q'); - $elements = $uri->getQuery(true); // Create hidden input elements for each part of the URI. - // Add the current menu id if it doesn't have one - foreach ($elements as $n => $v) + foreach ($uri->getQuery(true) as $n => $v) { - if ($n == 'Itemid') - { - continue; - } - - $fields .= ''; + $fields[] = ''; } - /* - * Figure out the Itemid value - * First, check if the param is set. If not, fall back to the Itemid from the JInput object - */ - $Itemid = $paramItem > 0 ? $paramItem : JFactory::getApplication()->input->getInt('Itemid'); - $fields .= ''; - - return $fields; + return implode('', $fields); } /**