* 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 © 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
/** 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');
*/
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);
}
/**
$cur_mailbox = 'INBOX';
$biop = asearch_nz($biop_array[$crit_num]);
if (($query_display == '') || ($cur_mailbox != $last_mailbox)) {
- $mailbox_display = ' <b>' . asearch_get_mailbox_display($cur_mailbox) . '</b>';
+ $mailbox_display = ' <b>' . htmlspecialchars(asearch_get_mailbox_display($cur_mailbox)) . '</b>';
if ($query_display == '')
$biop_display = _("In");
else
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');
}
}
function asearch_get_form_mailbox($imapConnection, &$boxes, $mailbox, $row_num = 0)
{
if (($mailbox != 'All Folders') && (!asearch_mailbox_exists($mailbox, $boxes))) {
- $missing = asearch_opt($mailbox, $mailbox, '[' . _("Missing") . '] ' . asearch_get_mailbox_display($mailbox));
+ $missing = asearch_opt($mailbox, $mailbox, '[' . _("Missing") . '] ' . htmlspecialchars(asearch_get_mailbox_display($mailbox)));
} else {
$missing = '';
}
}
/** 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
*/
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
* 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
);
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);
$mailbox_display = imap_utf7_decode_local($mbx);
}
- echo '<br /><b><big>' . _("Folder:") . ' '. $mailbox_display . ' </big></b>';
+ echo '<br /><b><big>' . _("Folder:") . ' '. htmlspecialchars($mailbox_display) . ' </big></b>';
$oTemplate->display('message_list.tpl');
}
do_hook('search_bottom');
sqimap_logout($imapConnection);
-echo '</body></html>';
+$oTemplate->display('footer.tpl');
sqsession_register($mailbox_cache,'mailbox_cache');
-?>
\ No newline at end of file
+?>