Browse code

search.php: Definitive fix for very old sorting order oversight - Noticed after looking at the original patch and the original line; can't believe it was that simple...

Clarissa Walker authored on 2026/11/07 00:20:20
Showing 1 changed files
... ...
@@ -252,7 +252,6 @@ if(isset($_POST['submit']) || isset($_GET['offset'])) {
252 252
 	if(count($otherresults) > 0) $tpl->assign("otherresults", "<div id='otherresults'><span class='label'>"._OTHERRESULTS.":</span> ".implode(", ", $otherresults)."</div>");
253 253
 }
254 254
 else {
255
-	$disablesorts = array( );
256 255
 	if($searchtype == "simple") {
257 256
 		$output .= "<div id=\"pagetitle\">"._SIMPLE."</div><div style='text-align: center;'><form method=\"post\" enctype=\"multipart/form-data\" action=\"search.php\">
258 257
 		<div class=\"tblborder\" style=\"width: 320px; padding: 5px; margin: 0 auto;\">
... ...
@@ -325,10 +324,8 @@ else {
325 324
   <option>1000</option>
326 325
   <option value='-500'>&lt; 500</option>
327 326
   </select><br /><br /><label for=\"searchterm\">"._SEARCHTERM.": </label><INPUT type=\"text\" class=\"textbox\" name=\"searchterm\" id=\"searchterm\" size=\"20\">
328
-  ";
329
-  
330
-  if(!in_array("sorts", $disablesorts)) $output .= "<label for=\"sortorder\">"._SORT.":</label> <select class=\"textbox\" name=\"sort\"><option value=\"alpha\"".(!$defaultsort ? " selected" : "").">"._ALPHA."</option><option value=\"update\"".($defaultsort == 1 ? " selected" : "").">"._MOSTRECENT."</option></select>";
331 327
   
328
+  <label for=\"sortorder\">"._SORT.":</label> <select name=\"sort\" id=\"sortorder\"><option value=\"alpha\">"._ALPHA."</option><option value=\"update\">"._MOSTRECENT."</option></select>";  
332 329
 	$codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'searchform'");
333 330
 	while($code = dbassoc($codequery)) {
334 331
 		eval($code['code_text']);