X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fsearch.php;h=8e08124e4a9bed06558af31a0e63c2f817457e73;hp=4e108cfae4d44d21868e8bb59a805e000239e8bd;hb=2999753577cd5fb23d7a88e2978c60d8bade44a6;hpb=fa62b05482596e12cfcb4d7b624c2d01b29edd2f diff --git a/src/search.php b/src/search.php index 4e108cfa..8e08124e 100644 --- a/src/search.php +++ b/src/search.php @@ -8,7 +8,7 @@ * Subfolder search idea from Patch #806075 by Thomas Pohl xraven at users.sourceforge.net. Thanks Thomas! * * @author Alex Lemaresquier - Brainstorm - * @copyright © 1999-2005 The SquirrelMail Project Team + * @copyright © 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'); @@ -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); } /** @@ -656,7 +658,7 @@ function asearch_print_saved(&$boxes) if (isset($saved_array[$saved_prefkeys[0]])) { $saved_count = count($saved_array[$saved_prefkeys[0]]); if ($saved_count > 0) { - $saved_actions = array('edit_saved' => _("edit"), 'search_saved' => _("search"), 'delete_saved' => _("delete")); + $saved_actions = array('edit_saved' => _("Edit"), 'search_saved' => _("Search"), 'delete_saved' => _("Delete")); asearch_print_query_array($boxes, $saved_array, $saved_prefkeys, $saved_actions, _("Saved Searches"), 'search_show_saved'); } } @@ -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) - : ''; + 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') - : ''; + 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 @@ -1016,8 +1013,8 @@ $aMailboxGlobalPref = array( * system wide admin settings and incoming vars. */ $aConfig = array( - 'allow_thread_sort' => $allow_thread_sort, - 'allow_server_sort' => $allow_server_sort, +// 'allow_thread_sort' => $allow_thread_sort, +// 'allow_server_sort' => $allow_server_sort, 'user' => $username, 'setindex' => 1 ); @@ -1605,13 +1602,13 @@ if ($submit == $search_button_text) { foreach ($aTemplate as $k => $v) { $oTemplate->assign($k, $v); } + $oTemplate->assign('page_selector', $page_selector); $oTemplate->assign('page_selector_max', $page_selector_max); $oTemplate->assign('compact_paginator', $compact_paginator); $oTemplate->assign('javascript_on', $javascript_on); $oTemplate->assign('enablesort', (isset($aProps['config']['enablesort'])) ? $aProps['config']['enablesort'] : false); - // Aaaaaahhhhhhh FIX ME DO NOT USE the string "none" for a var when you mean the boolean false or null - $oTemplate->assign('icon_theme', (isset($icon_theme) && $icon_theme !== 'none') ? $icon_theme : false); + $oTemplate->assign('icon_theme_path', $icon_theme_path); $oTemplate->assign('use_icons', (isset($use_icons)) ? $use_icons : false); $oTemplate->assign('aOrder', array_keys($aColumns)); $oTemplate->assign('alt_index_colors', isset($alt_index_colors) ? $alt_index_colors: false); @@ -1644,7 +1641,7 @@ if ($submit == $search_button_text) { do_hook('search_bottom'); sqimap_logout($imapConnection); -echo ''; +$oTemplate->display('footer.tpl'); sqsession_register($mailbox_cache,'mailbox_cache'); ?>