general cleanup
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Nov 2005 22:32:17 +0000 (22:32 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Nov 2005 22:32:17 +0000 (22:32 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10393 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_asearch.php
src/search.php

index dbea4d6a92a5b09d931ff05ed4e61474ddb6b3da..0c5ce91ceecabb1a1899cbea59f5ed67e73e8c9a 100644 (file)
@@ -121,23 +121,7 @@ function sqimap_asearch_error_box($response, $query, $message, $link = '')
     else
         $message_title = _("Possible reason:");
     $message_title .= ' ';
     else
         $message_title = _("Possible reason:");
     $message_title .= ' ';
-    if (function_exists('sqimap_error_box'))
-        sqimap_error_box($title, $query, $message_title, $message, $link);
-    else {    //Straight copy of 1.5 imap_general.php:sqimap_error_box(). Can be removed at a later time
-        global $color;
-    require_once(SM_PATH . 'functions/display_messages.php');
-    $string = "<font color=\"$color[2]\"><b>\n" . $title . "</b><br />\n";
-    if ($query != '')
-        $string .= _("Query:") . ' ' . htmlspecialchars($query) . '<br />';
-    if ($message_title != '')
-        $string .= $message_title;
-    if ($message != '')
-        $string .= htmlspecialchars($message);
-    if ($link != '')
-        $string .= $link;
-    $string .= "</font><br />\n";
-    error_box($string,$color);
-    }
+    sqimap_error_box($title, $query, $message_title, $message, $link);
 }
 
 /**
 }
 
 /**
@@ -170,31 +154,6 @@ function asearch_unhtmlentities($string) {
  */
 }
 
  */
 }
 
-/**
- * Provide an easy way to dump the IMAP dialogue if $imap_asearch_debug_dump is TRUE
- * @global bool imap_asearch_debug_dump
- * @param string $var_name
- * @param string $var_var
- * @deprecated contains workarounds for 1.4.0 and older code.
- *   code without workarounds uses regular sm 1.4.2+ functions.
- *   it is not compatible with 1.4.1
- * @todo remove debugging function
- */
-function s_debug_dump($var_name, $var_var)
-{
-    global $imap_asearch_debug_dump;
-    if ($imap_asearch_debug_dump) {
-        if (function_exists('sm_print_r'))      //Only exists since 1.4.2
-            sm_print_r($var_name, $var_var);    //Better be the 'varargs' version ;)
-        else {
-            echo '<pre>';
-            echo htmlentities($var_name);
-            print_r($var_var);
-            echo '</pre>';
-        }
-    }
-}
-
 /** Encode a string to quoted or literal as defined in rfc 3501
  *
  * -  4.3 String:
 /** Encode a string to quoted or literal as defined in rfc 3501
  *
  * -  4.3 String:
@@ -529,4 +488,4 @@ function sqimap_asearch($imapConnection, &$mailbox_array, &$biop_array, &$unop_a
     return ($mbox_search);
 }
 
     return ($mbox_search);
 }
 
-?>
\ No newline at end of file
+?>
index 25e1c31abda65a1a736b4007144c871f65c70371..0409561bae646a9c47198e5ce6c6879bf8f6b01d 100644 (file)
@@ -728,12 +728,10 @@ function asearch_get_form_mailbox($imapConnection, &$boxes, $mailbox, $row_num =
 }
 
 /** Build the Include subfolders checkbox
 }
 
 /** Build the Include subfolders checkbox
- * @todo if(function_exists('addCheckBox')) ?
  */
 function asearch_get_form_sub($sub, $row_num = 0)
 {
  */
 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
 }
 
 /** 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)
 {
  */
 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
 }
 
 /** Build the Exclude criteria checkbox
- * @todo if(function_exists('addCheckBox')) ?
  */
 function asearch_get_form_exclude($exclude, $row_num = 0)
 {
  */
 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
 }
 
 /** Print one advanced form row