X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=a9bd6c8780f30a0ff77c06c1ec3ba94e13f410db;hp=0c649961679eaff2ae267e98bf62b70aca5414d4;hb=5df2efa257f7aa8ddcfa44ed517a8cef8c26b118;hpb=457e85930298524fc08003d262c71ab621470ab4
diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php
index 0c649961..a9bd6c87 100644
--- a/src/addrbook_search_html.php
+++ b/src/addrbook_search_html.php
@@ -6,7 +6,7 @@
*
* This file is included from compose.php
*
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright 1999-2012 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
@@ -20,6 +20,9 @@
* init.php.
*/
if (!isset($bInit)) {
+ /** This is the addrbook_search_html page */
+ define('PAGE_NAME', 'addrbook_search_html');
+
include('../include/init.php');
}
@@ -39,20 +42,27 @@ sqgetGlobalVar('backend', $backend, SQ_POST);
* Insert hidden data
*/
function addr_insert_hidden() {
- global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox,
- $identity, $session;
+ global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, $mailprio,
+ $request_mdn, $request_dr, $identity, $session, $composeMessage;
+//FIXME Do not echo HTML from the core. This file already uses templates mostly, so why are we echoing here at all?!?
if (substr($body, 0, 1) == "\r") {
echo addHidden('body', "\n".$body);
} else {
echo addHidden('body', $body);
}
+ if (is_object($composeMessage) && $composeMessage->entities)
+ echo addHidden('attachments', urlencode(serialize($composeMessage->entities)));
+
echo addHidden('session', $session).
addHidden('subject', $subject).
addHidden('send_to', $send_to).
addHidden('send_to_bcc', $send_to_bcc).
addHidden('send_to_cc', $send_to_cc).
+ addHidden('mailprio', $mailprio).
+ addHidden('request_mdn', $request_mdn).
+ addHidden('request_dr', $request_dr).
addHidden('identity', $identity).
addHidden('mailbox', $mailbox).
addHidden('from_htmladdr_search', 'true');
@@ -65,17 +75,15 @@ function addr_insert_hidden() {
* @param bool $includesource If true, adds backend column to address listing
*/
function addr_display_result($res, $includesource = true) {
- global $color, $PHP_SELF, $squirrelmail_language;
-
- global $oTemplate, $oErrorHandler;
+ global $PHP_SELF, $oTemplate, $oErrorHandler;
- if (sizeof($res) <= 0) return;
- echo addForm($PHP_SELF, 'post', 'addressbook').
+//FIXME: no HTML output from core
+ echo addForm($PHP_SELF, 'post', 'addressbook', '', '', array(), 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));
@@ -94,7 +102,6 @@ else {
}
/** set correct value of $default_charset */
-global $default_charset;
set_my_charset();
/* Initialize addressbook */
@@ -108,7 +115,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');
@@ -150,7 +157,7 @@ if ($addrquery == '' || ! empty($listall)) {
}
if (!is_array($res)) {
- plain_error_message(_("Your search failed with the following error(s)") .':
'. nl2br(htmlspecialchars($abook->error)));
+ plain_error_message(_("Your search failed with the following error(s)") .':
'. nl2br(sm_encode_html_special_chars($abook->error)));
} elseif (sizeof($res) == 0) {
$oTemplate->assign('note', _("No persons matching your search were found"));
$oTemplate->display('note.tpl');
@@ -164,8 +171,9 @@ if ($addrquery == '' || ! empty($listall)) {
}
if ($addrquery == '' || sizeof($res) == 0) {
+//FIXME don't echo HTML from core -- especially convoluted given that there is template code immediately above AND below this block
echo '