make it possible again to disable thread sort and server sort.
[squirrelmail.git] / src / search.php
index 25e1c31abda65a1a736b4007144c871f65c70371..aa7ff0b367f70d0ca978f17c09f2384c9c117a6e 100644 (file)
@@ -8,7 +8,7 @@
  * Subfolder search idea from Patch #806075 by Thomas Pohl xraven at users.sourceforge.net. Thanks Thomas!
  *
  * @author Alex Lemaresquier - Brainstorm <alex at brainstorm.fr>
- * @copyright &copy; 1999-2005 The SquirrelMail Project Team
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -24,7 +24,7 @@ define('SM_PATH','../');
 
 /** SquirrelMail required files.
  */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
 include_once(SM_PATH . 'functions/strings.php');
 include_once(SM_PATH . 'functions/imap_asearch.php');
 include_once(SM_PATH . 'functions/imap_mailbox.php');
@@ -728,12 +728,10 @@ function asearch_get_form_mailbox($imapConnection, &$boxes, $mailbox, $row_num =
 }
 
 /** Build the Include subfolders checkbox
- * @todo if(function_exists('addCheckBox')) ?
  */
 function asearch_get_form_sub($sub, $row_num = 0)
 {
-    return function_exists('addCheckBox') ? addCheckBox('sub[' . $row_num .']', $sub)
-    : '<input type="checkbox" name="sub[' . $row_num .']"' . ($sub ? ' checked="checked"' : '') . ' />';
+    return addCheckBox('sub[' . $row_num .']', $sub);
 }
 
 /** Build the 2 unop and where selects
@@ -750,17 +748,14 @@ function asearch_get_form_location($unop, $where, $row_num = 0)
  */
 function asearch_get_form_what($what, $row_num = 0)
 {
-    return function_exists('addInput') ? addInput('what[' . $row_num . ']', $what, '35')
-    : '<input type="text" size="35" name="what[' . $row_num . ']" value="' . htmlspecialchars($what) . '" />';
+    return addInput('what[' . $row_num . ']', $what, '35');
 }
 
 /** Build the Exclude criteria checkbox
- * @todo if(function_exists('addCheckBox')) ?
  */
 function asearch_get_form_exclude($exclude, $row_num = 0)
 {
-    return function_exists('addCheckBox') ? addCheckBox('exclude['.$row_num.']', $exclude)
-    : '<input type="checkbox" name="exclude[' . $row_num .']"' . ($exclude ? ' checked="checked"' : '') . ' />';
+    return addCheckBox('exclude['.$row_num.']', $exclude);
 }
 
 /** Print one advanced form row
@@ -1646,7 +1641,7 @@ if ($submit == $search_button_text) {
 
 do_hook('search_bottom');
 sqimap_logout($imapConnection);
-echo '</body></html>';
+$oTemplate->display('footer.tpl');
 sqsession_register($mailbox_cache,'mailbox_cache');
 
 ?>