From 582d06212a3b09db7fcda1a20c51e6c86d15eb39 Mon Sep 17 00:00:00 2001 From: kink Date: Mon, 21 Nov 2005 22:32:17 +0000 Subject: [PATCH] general cleanup git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10393 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_asearch.php | 45 ++------------------------------------ src/search.php | 11 +++------- 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/functions/imap_asearch.php b/functions/imap_asearch.php index dbea4d6a..0c5ce91c 100644 --- a/functions/imap_asearch.php +++ b/functions/imap_asearch.php @@ -121,23 +121,7 @@ function sqimap_asearch_error_box($response, $query, $message, $link = '') 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 = "\n" . $title . "
\n"; - if ($query != '') - $string .= _("Query:") . ' ' . htmlspecialchars($query) . '
'; - if ($message_title != '') - $string .= $message_title; - if ($message != '') - $string .= htmlspecialchars($message); - if ($link != '') - $string .= $link; - $string .= "

\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 '
';
-            echo htmlentities($var_name);
-            print_r($var_var);
-            echo '
'; - } - } -} - /** 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); } -?> \ No newline at end of file +?> diff --git a/src/search.php b/src/search.php index 25e1c31a..0409561b 100644 --- a/src/search.php +++ b/src/search.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) - : ''; + 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') - : ''; + 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) - : ''; + return addCheckBox('exclude['.$row_num.']', $exclude); } /** Print one advanced form row -- 2.25.1