Better way of setting up anonymous IMP session.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Dec 2008 21:35:24 +0000 (14:35 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Dec 2008 21:56:24 +0000 (14:56 -0700)
imp/attachment.php

index 06db768..847de49 100644 (file)
  * 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.