--- inc/search.php 2001/09/03 15:52:16 1.5 +++ inc/search.php 2001/09/25 15:38:04 1.6 @@ -1,8 +1,5 @@ MyEscape($v["caption"]) )); } - usort($flds, "MySort"); $tp->assign("fields", $flds); global $PHP_SELF, $section, $section_menu; $tp->assign("section", $section); $tp->assign("section_menu", $section_menu); $tp->assign("FORM_ACTION", $PHP_SELF.HTMLSpecialChars("?section=$section§ion_menu={$section_menu}&stype=$stype")); $form = $tp->fetch("search.tpl"); - global $onload; - $onload .= "document.forms[0].elements[".($stype?2:1)."].focus();"; + if ($form) { + global $onload; + $onload .= "document.forms[1].elements[".($stype?2:1)."].focus();"; + } return array($form, $qry_1, $qry_2); } ?>