Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r8428 -r8535 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 8428) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 8535) @@ -384,27 +384,40 @@ return $o; } + /** + * Used for search sidebox on front-end only + * + * @param Array $params + * @return string + * @author Alex + */ function GetFormHiddens($params) { - $sid = $this->Application->GetSID(); $t = $this->SelectParam($params, 'template,t'); unset($params['template']); - $env = $this->Application->BuildEnv($t, $params, 'm', null, false); - $o = ''; - if ( $this->Application->RewriteURLs() ) - { + + $form_fields = Array (); + if ($this->Application->RewriteURLs()) { $session =& $this->Application->recallObject('Session'); if ($session->NeedQueryString()) { - $o .= "\n"; + $form_fields['sid'] = $this->Application->GetSID(); } } else { - $o .= "\n"; + $form_fields['env'] = $this->Application->BuildEnv($t, $params, 'm', null, false); } + if ($this->Application->GetVar('admin') == 1) { - $o .= "\n"; + $form_fields['admin'] = 1; } - return $o; + + $ret = ''; + $field_tpl = ''."\n"; + foreach ($form_fields as $form_field => $field_value) { + $ret .= sprintf($field_tpl, $form_field, $field_value); + } + + return $ret; } function Odd_Even($params)