adding error checking in deliver_sendmail class.
[squirrelmail.git] / src / search.php
index 48d6ec32c022eb367aa42e42de1f6c1e02069f68..0409561bae646a9c47198e5ce6c6879bf8f6b01d 100644 (file)
@@ -79,7 +79,9 @@ function asearch_get_link(&$href, $text, $title = '')
  */
 function asearch_get_toggle_link($value, $action, $text_array, $title_array = array())
 {
-    return asearch_get_link(asearch_get_href($action . '=' . (int)$value), $text_array[$value], asearch_nz($title_array[$value]));
+    $asearch_nz=asearch_nz($title_array[$value]);
+    $asearch_get_href=asearch_get_href($action . '=' . (int)$value);
+    return asearch_get_link($asearch_get_href, $text_array[$value], $asearch_nz);
 }
 
 /**
@@ -726,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
@@ -748,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