projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
increment year in copyright notices
[squirrelmail.git]
/
src
/
view_html.php
diff --git
a/src/view_html.php
b/src/view_html.php
index b7ac88020ed68727861eb51ba6c70272ee084fd7..28aa5a78df9a5b31c0c381df79fc532546521c1e 100644
(file)
--- a/
src/view_html.php
+++ b/
src/view_html.php
@@
-10,26
+10,23
@@
* optional. User must be authenticated ($key in cookie. $username and
* $onetimepad in session).
*
* optional. User must be authenticated ($key in cookie. $username and
* $onetimepad in session).
*
- * @copyright © 1999-200
6
The SquirrelMail Project Team
+ * @copyright © 1999-200
7
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
*/
/**
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
*/
/**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
*/
*/
-
define('SM_PATH','../
');
+
require('../include/init.php
');
/** SquirrelMail required files. */
/** SquirrelMail required files. */
-include_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/date.php');
/** Get globals */
/** Get globals */
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('messages', $messages, SQ_SESSION);
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
sqgetGlobalVar('messages', $messages, SQ_SESSION);
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
@@
-38,16
+35,9
@@
if (sqgetGlobalVar('passed_id', $temp, SQ_GET)) {
$passed_id = (int) $temp;
}
$passed_id = (int) $temp;
}
-global $view_unsafe_images;
-if (sqgetGlobalVar('view_unsafe_images', $temp, SQ_GET)) {
- $view_unsafe_images = (bool) $temp;
-} else {
- $view_unsafe_images = false;
-}
-
// TODO: add required var checks here.
// TODO: add required var checks here.
-$imap_stream = sqimap_login($username,
$key
, $imapServerAddress, $imapPort, 0);
+$imap_stream = sqimap_login($username,
false
, $imapServerAddress, $imapPort, 0);
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
$message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
$message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];
@@
-66,6
+56,7
@@
$encoding = strtolower($header->encoding);
$body = mime_fetch_body($imap_stream, $passed_id, $ent_id);
$body = decodeBody($body, $encoding);
$body = mime_fetch_body($imap_stream, $passed_id, $ent_id);
$body = decodeBody($body, $encoding);
+do_hook('message_body', $body);
/**
* TODO: check if xtra_code is needed.
/**
* TODO: check if xtra_code is needed.
@@
-83,5
+74,4
@@
$body = MagicHTML( $body, $passed_id, $message, $mailbox);
/** TODO: charset might be part of html code. */
header('Content-Type: text/html; charset=' . $charset);
echo $body;
/** TODO: charset might be part of html code. */
header('Content-Type: text/html; charset=' . $charset);
echo $body;
-
?>
?>