From 3eb9d995edd4800c57f8db008442be8ae6cb2e71 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 11 Dec 2008 14:35:24 -0700 Subject: [PATCH] Better way of setting up anonymous IMP session. --- imp/attachment.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/imp/attachment.php b/imp/attachment.php index 06db768a5..847de49d4 100644 --- a/imp/attachment.php +++ b/imp/attachment.php @@ -11,19 +11,14 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ -// Set up initial includes. -// This does *not* include IMP's base.php because we do not need to be -// authenticated to get the file. Most users won't send linked -// attachments just to other IMP users. -if (!defined('HORDE_BASE')) { - @define('HORDE_BASE', dirname(__FILE__) . '/..'); -} -require_once HORDE_BASE . '/lib/core.php'; +// We do not need to be authenticated to get the file. Most users won't send +// linked attachments just to other IMP users. +@define('AUTH_HANDLER', true); +$authentication = 'none'; +$session_control = 'none'; +require_once dirname(__FILE__) . '/lib/base.php'; require_once 'VFS.php'; -$registry = &Registry::singleton(); -$registry->importConfig('imp'); - $self_url = Horde::selfUrl(false, true, true); // Lets see if we are even able to send the user an attachment. -- 2.11.0