if ($this->viewAsAttachment()) {
$html .= Util::bufferOutput('require', $registry->get('templates', 'horde') . '/common-header.inc');
}
- if ($_SESSION['imp']['viewmode'] == 'imp') {
+ if ($_SESSION['imp']['view'] == 'imp') {
$html .= '<form method="post" name="iCal" action="' . Horde::selfUrl(true) . '">';
}
}
// Need to work out if we are inline and actually need this.
- if ($_SESSION['imp']['viewmode'] == 'imp') {
+ if ($_SESSION['imp']['view'] == 'imp') {
$html .= '</form>';
}
if ($this->viewAsAttachment()) {
}
}
- if ($_SESSION['imp']['viewmode'] != 'imp') {
+ if ($_SESSION['imp']['view'] != 'imp') {
return $html;
}
$html .= '</tbody></table>';
}
- if ($_SESSION['imp']['viewmode'] != 'imp') {
+ if ($_SESSION['imp']['view'] != 'imp') {
return $html;
}
$html .= '</tbody></table>';
}
- if ($_SESSION['imp']['viewmode'] != 'imp') {
+ if ($_SESSION['imp']['view'] != 'imp') {
return $html;
}
/* Check if this a symmetrically encrypted message. */
$symmetric = $this->_imppgp->encryptedSymmetrically($encrypted_data);
if ($symmetric && !$this->_imppgp->getSymmetricPassphrase()) {
- if (isset($_SESSION['imp']['viewmode']) &&
- ($_SESSION['imp']['viewmode'] == 'imp')) {
+ if ($_SESSION['imp']['view'] == 'imp') {
// TODO: Fix to work with DIMP
/* Ask for the correct passphrase if this is encrypted
* symmetrically. */
$status[] = _("The message below has been encrypted with PGP, however, no personal private key exists so the message cannot be decrypted.");
return null;
} elseif (!$this->_imppgp->getPassphrase() &&
- ($_SESSION['imp']['viewmode']) &&
- ($_SESSION['imp']['viewmode'] == 'imp')) {
+ ($_SESSION['imp']['view'] == 'imp')) {
// TODO: Fix to work with DIMP
/* Ask for the private key's passphrase if this is encrypted
* asymmetrically. */
Text_Filter::filter($sig_result, 'text2html', array('parselevel' => TEXT_HTML_NOHTML))
)
);
- } elseif (isset($_SESSION['imp']['viewmode']) &&
- ($_SESSION['imp']['viewmode'] == 'imp')) {
+ } elseif ($_SESSION['imp']['view'] == 'imp') {
// TODO: Fix to work with DIMP
$status[] = Horde::link(Util::addParameter(Horde::selfUrl(true), array('pgp_verify_msg' => 1))) . _("Click HERE to verify the message.") . '</a>';
}
'status' => array(
array(
'icon' => Horde::img('mime/encryption.png', 'S/MIME'),
- 'text' => array()
+ 'text' => array(_("This message has been encrypted via S/MIME."))
)
),
'type' => 'text/html; charset=' . NLS::getCharset()
/* Make sure we have a passphrase. */
$passphrase = $this->_impsmime->getPassphrase();
if ($passphrase === false) {
- if (isset($_SESSION['imp']['viewmode']) &&
- ($_SESSION['imp']['viewmode'] == 'imp')) {
+ if ($_SESSION['imp']['view'] == 'imp') {
// TODO: Fix to work with DIMP
$status[] = Horde::link('#', _("You must enter the passphrase for your S/MIME private key to view this message"), null, null, $this->_impsmime->getJSOpenWinCode('open_passphrase_dialog') . 'return false;') . _("You must enter the passphrase for your S/MIME private key to view this message.") . '</a>';
}
if ($GLOBALS['prefs']->getValue('smime_verify') ||
Util::getFormData('smime_verify_msg')) {
$sig_result = $this->_impsmime->verifySignature($raw_text);
- } elseif (isset($_SESSION['imp']['viewmode']) &&
- ($_SESSION['imp']['viewmode'] == 'imp')) {
+ } elseif ($_SESSION['imp']['view'] == 'imp') {
// TODO: Fix to work with DIMP
$status[] = Horde::link(Util::addParameter(Horde::selfUrl(true), 'smime_verify_msg', 1)) . _("Click HERE to verify the message.") . '</a>';
return $ret;
*/
function _imp_batchCompose($args = array(), $extra = array())
{
- if (isset($_SESSION['imp']['viewmode']) &&
- $_SESSION['imp']['viewmode'] != 'imp') {
- return $GLOBALS['registry']->callByPackage($_SESSION['imp']['viewmode'], 'batchCompose', array($args, $extra));
+ // TODO: Fix
+ if (isset($_SESSION['imp']['view']) &&
+ $_SESSION['imp']['view'] != 'imp') {
+ return $GLOBALS['registry']->callByPackage($_SESSION['imp']['view'], 'batchCompose', array($args, $extra));
}
$GLOBALS['authentication'] = 'none';
* 'none' - Do not authenticate
* Default - Authenticate to IMAP/POP server
* $compose_page - If true, we are on IMP's compose page
+ * $login_page - If true, we are on IMP's login page
* $mimp_debug - If true, output text/plain version of page.
* $no_compress - Controls whether the page should be compressed
* $session_control - Sets special session control limitations
// Notification system.
$notification = &Notification::singleton();
-if ($_SESSION['imp']['view'] == 'mimp') {
+if ((Util::nonInputVar('login_page') && $GLOBALS['browser']->isMobile()) ||
+ (isset($_SESSION['imp']['view']) && ($_SESSION['imp']['view'] == 'mimp'))) {
require_once 'Horde/Notification/Listener/mobile.php';
$GLOBALS['mimp_notify'] = &$notification->attach('status', null, 'Notification_Listener_mobile');
} else {
IMP_Session::loginTasks();
}
-if ($_SESSION['imp']['view'] == 'mimp') {
+if (isset($_SESSION['imp']['view']) && ($_SESSION['imp']['view'] == 'mimp')) {
// Need to explicitly load MIMP.php
require_once IMP_BASE . '/lib/MIMP.php';
@define('AUTH_HANDLER', true);
$authentication = 'none';
+$login_page = true;
require_once dirname(__FILE__) . '/lib/base.php';
/* Set the 'preferred' server. */
/* Mobile login page. */
if ($browser->isMobile()) {
require_once 'Horde/Mobile.php';
- require_once 'Horde/Notification/Listener/mobile.php';
/* Build the <select> widget for the servers list. */
if ($show_list) {
$c = &$m->add(new Horde_Mobile_card());
-$notification = &new Notification();
-$l = &$notification->attach('status', null, 'Notification_Listener_mobile');
-$l->setMobileObject($c);
+$mimp_notify->setMobileObject($c);
$c->add(new Horde_Mobile_text(sprintf(_("Welcome to %s"), ($imp_auth) ? $registry->get('name',' horde') : $registry->get('name'))));