From 0885e0d76c0d617e978400c4da830eeb70d80b5e Mon Sep 17 00:00:00 2001 From: jangliss Date: Sun, 17 May 2009 00:38:30 +0000 Subject: [PATCH] - Cleanup variable name in address search for compose to clearup confusion. - Remove Javascript from address search page when JavaScript is disabled. - Add "Check All" function to address book when using "in-page" addressbook. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13713 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- doc/ChangeLog | 3 +++ src/addrbook_search.php | 4 +-- src/addrbook_search_html.php | 4 +-- templates/default/addrbook_search_list.tpl | 29 ++++++++++++++++++---- templates/default/addressbook_popup.tpl | 2 +- templates/util_addressbook.php | 10 ++++++++ 6 files changed, 42 insertions(+), 10 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 4bb711e8..9e7eb797 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -310,6 +310,9 @@ Version 1.5.2 - SVN base URI is now uniformly generated, extraneous cookies are cleaned up and session IDs are regenerated upon every login (Thanks to Tomas Hoger). [CVE-2009-1580] + - Cleanup variable name in address search for compose to clearup confusion. + - Remove Javascript from address search page when JavaScript is disabled. + - Add "Check All" function to address book when using "in-page" addressbook. Version 1.5.1 (branched on 2006-02-12) -------------------------------------- diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 25a11eae..7e267200 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -38,7 +38,7 @@ function display_result($res, $includesource = true) { if(sizeof($res) <= 0) return; - $oTemplate->assign('use_js', true); + $oTemplate->assign('compose_addr_pop', true); $oTemplate->assign('include_abook_name', $includesource); $oTemplate->assign('addresses', formatAddressList($res)); @@ -83,7 +83,7 @@ $abook = addressbook_init($showerr); if ($show == 'form' && ! isset($listall)) { echo "
\n"; - $oTemplate->assign('use_js', true); + $oTemplate->assign('compose_addr_pop', true); $oTemplate->assign('backends', getBackends()); $oTemplate->display('addressbook_search_form.tpl'); diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 5ae70c56..c9beedde 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -82,7 +82,7 @@ function addr_display_result($res, $includesource = true) { addHidden('html_addr_search_done', 'true'); addr_insert_hidden(); - $oTemplate->assign('use_js', false); + $oTemplate->assign('compose_addr_pop', false); $oTemplate->assign('include_abook_name', $includesource); $oTemplate->assign('addresses', formatAddressList($res)); @@ -114,7 +114,7 @@ if (isset($session)) { echo addHidden('session', $session); } -$oTemplate->assign('use_js', false); +$oTemplate->assign('compose_addr_pop', false); $oTemplate->assign('backends', getBackends()); $oTemplate->display('addressbook_search_form.tpl'); diff --git a/templates/default/addrbook_search_list.tpl b/templates/default/addrbook_search_list.tpl index b6bf63d3..f9d39eb5 100644 --- a/templates/default/addrbook_search_list.tpl +++ b/templates/default/addrbook_search_list.tpl @@ -39,14 +39,24 @@ extract($t); $colspan = $include_abook_name ? 5 : 4; ?>
- + @@ -60,12 +70,19 @@ if ($use_js) { if (count($addresses) == 0) { echo ''."\n"; } + + if ($compose_addr_pop) { + $addr_str = '%1$s'; + } else { + $addr_str = '%1$s'; + } + foreach ($addresses as $index=>$contact) { ?> > - +
+ +   +   + + +
'._("Address book is empty").'
| | @@ -81,7 +98,7 @@ if ($use_js) { ?>
'."\n"; echo ''."\n"; +} else { + echo ''. "\n"; } ?>
diff --git a/templates/default/addressbook_popup.tpl b/templates/default/addressbook_popup.tpl index 118ec47a..37e1973d 100644 --- a/templates/default/addressbook_popup.tpl +++ b/templates/default/addressbook_popup.tpl @@ -20,7 +20,7 @@ extract($t); /** Begin template **/ ?> - +