diff --git a/imp/docs/CHANGES b/imp/docs/CHANGES
index 328b7fca9ea..2e9503aeb0d 100644
--- a/imp/docs/CHANGES
+++ b/imp/docs/CHANGES
@@ -2,6 +2,7 @@
v6.3.0-git
----------
+[mms] Removed minimal view.
[mms] Allow auto-completed e-mail groups to be expanded on the dynamic compose
page.
[mms] Add class of message part rendering display errors that aren't show to
diff --git a/imp/docs/UPGRADING b/imp/docs/UPGRADING
index e8442ed9cf4..49b9797e599 100644
--- a/imp/docs/UPGRADING
+++ b/imp/docs/UPGRADING
@@ -42,9 +42,12 @@ Administration => Configuration and update anything that's highlighted as
outdated.
-Upgrading IMP From 6.2.x To x.x
+Upgrading IMP From 6.2.x To 7.x
===============================
+The minimal view has been removed.
+
+
Configuration Options (conf.php)
--------------------------------
diff --git a/imp/lib/Ajax/Application.php b/imp/lib/Ajax/Application.php
index 8be438f9da3..900c7ae9ed8 100644
--- a/imp/lib/Ajax/Application.php
+++ b/imp/lib/Ajax/Application.php
@@ -78,6 +78,7 @@ protected function _init()
}
break;
+ case $registry::VIEW_MINIMAL:
case $registry::VIEW_SMARTMOBILE:
$this->addHandler('IMP_Ajax_Application_Handler_Common');
$this->addHandler('IMP_Ajax_Application_Handler_ComposeAttach');
diff --git a/imp/lib/Ajax/Application/ShowMessage.php b/imp/lib/Ajax/Application/ShowMessage.php
index d586204fc79..47b8bc2dff4 100644
--- a/imp/lib/Ajax/Application/ShowMessage.php
+++ b/imp/lib/Ajax/Application/ShowMessage.php
@@ -256,6 +256,7 @@ public function showMessage($args)
$show_parts = $prefs->getValue('parts_display');
switch ($registry->getView()) {
+ case $registry::VIEW_MINIMAL:
case $registry::VIEW_SMARTMOBILE:
$contents_mask = 0;
break;
diff --git a/imp/lib/Ajax/Queue.php b/imp/lib/Ajax/Queue.php
index 45971ce6d1c..cd873462049 100644
--- a/imp/lib/Ajax/Queue.php
+++ b/imp/lib/Ajax/Queue.php
@@ -220,6 +220,7 @@ public function add(IMP_Ajax_Application $ajax)
/* Add flag configuration. */
switch ($this->_flagconfig) {
case Horde_Registry::VIEW_DYNAMIC:
+ case Horde_Registry::VIEW_MINIMAL:
case Horde_Registry::VIEW_SMARTMOBILE:
$flags = array();
foreach ($injector->getInstance('IMP_Flags')->getList() as $val) {
diff --git a/imp/lib/Application.php b/imp/lib/Application.php
index ef177551172..3ba956be2bc 100644
--- a/imp/lib/Application.php
+++ b/imp/lib/Application.php
@@ -44,7 +44,6 @@
*/
class IMP_Application extends Horde_Registry_Application
{
-
/**
*/
public $auth = array(
@@ -59,7 +58,6 @@ class IMP_Application extends Horde_Registry_Application
*/
public $features = array(
'dynamicView' => true,
- 'minimalView' => true,
'notificationHandler' => true,
'smartmobileView' => true
);
diff --git a/imp/lib/Basic/Compose.php b/imp/lib/Basic/Compose.php
index 06fc8b73cad..311767ea3f0 100644
--- a/imp/lib/Basic/Compose.php
+++ b/imp/lib/Basic/Compose.php
@@ -40,10 +40,6 @@ protected function _init()
case Horde_Registry::VIEW_DYNAMIC:
IMP_Dynamic_Compose::url()->add($_GET)->redirect();
exit;
-
- case Horde_Registry::VIEW_MINIMAL:
- IMP_Minimal_Compose::url()->add($_GET)->redirect();
- exit;
}
}
diff --git a/imp/lib/Compose/Link.php b/imp/lib/Compose/Link.php
index b0871b91880..71c9998d54f 100644
--- a/imp/lib/Compose/Link.php
+++ b/imp/lib/Compose/Link.php
@@ -98,15 +98,12 @@ public function link($simplejs = false)
: IMP_Basic_Compose::url();
$raw = true;
$callback = array($this, 'composeLinkSimpleCallback');
- } elseif (($view != Horde_Registry::VIEW_MINIMAL) &&
- $prefs->getValue('compose_popup') &&
+ } elseif ($prefs->getValue('compose_popup') &&
$browser->hasFeature('javascript')) {
$url = IMP_Basic_Compose::url();
$callback = array($this, 'composeLinkJsCallback');
} else {
- $url = ($view == Horde_Registry::VIEW_MINIMAL)
- ? IMP_Minimal_Compose::url()
- : IMP_Basic_Compose::url();
+ $url = IMP_Basic_Compose::url();
}
if (isset($args['mailbox'])) {
diff --git a/imp/lib/Factory/PrefsSort.php b/imp/lib/Factory/PrefsSort.php
index 5b1d683964b..551ed22cafb 100644
--- a/imp/lib/Factory/PrefsSort.php
+++ b/imp/lib/Factory/PrefsSort.php
@@ -30,7 +30,6 @@ class IMP_Factory_PrefsSort extends Horde_Core_Factory_Injector
public function create(Horde_Injector $injector)
{
switch ($GLOBALS['registry']->getView()) {
- case Horde_Registry::VIEW_MINIMAL:
case Horde_Registry::VIEW_SMARTMOBILE:
return new IMP_Prefs_Sort_FixedDate();
diff --git a/imp/lib/Flag/Base.php b/imp/lib/Flag/Base.php
index 1046e082370..f7cf93c2965 100644
--- a/imp/lib/Flag/Base.php
+++ b/imp/lib/Flag/Base.php
@@ -20,8 +20,6 @@
* @license http://www.horde.org/licenses/gpl GPL
* @package IMP
*
- * @property-read string $abbreviation The abbreviation to use in the minimal
- * view.
* @property string $bgcolor The background color.
* @property-read boolean $bgdefault Is the background color the default?
* @property-read boolean $canset Can this flag be set by the user?
@@ -42,13 +40,6 @@ abstract class IMP_Flag_Base implements Serializable
/* Default background color. */
const DEFAULT_BG = '#fff';
- /**
- * The abbreviation.
- *
- * @var string
- */
- protected $_abbreviation = '';
-
/**
* The background color.
*
@@ -89,9 +80,6 @@ abstract class IMP_Flag_Base implements Serializable
public function __get($name)
{
switch ($name) {
- case 'abbreviation':
- return $this->_abbreviation;
-
case 'bgcolor':
return $this->_bgcolor
? $this->_bgcolor
diff --git a/imp/lib/Flag/Imap/Deleted.php b/imp/lib/Flag/Imap/Deleted.php
index 72212df262a..09cf4793907 100644
--- a/imp/lib/Flag/Imap/Deleted.php
+++ b/imp/lib/Flag/Imap/Deleted.php
@@ -22,10 +22,6 @@
*/
class IMP_Flag_Imap_Deleted extends IMP_Flag_Imap
{
- /**
- */
- protected $_abbreviation = 'D';
-
/**
*/
protected $_bgcolor = '#999';
diff --git a/imp/lib/Flag/Imap/Draft.php b/imp/lib/Flag/Imap/Draft.php
index 7b8737f5414..5592f8e5276 100644
--- a/imp/lib/Flag/Imap/Draft.php
+++ b/imp/lib/Flag/Imap/Draft.php
@@ -22,10 +22,6 @@
*/
class IMP_Flag_Imap_Draft extends IMP_Flag_Imap
{
- /**
- */
- protected $_abbreviation = 'd';
-
/**
*/
protected $_bgcolor = '#9fff25';
diff --git a/imp/lib/Flag/Imap/Junk.php b/imp/lib/Flag/Imap/Junk.php
index 6ce8c9d7bf2..52a824cf551 100644
--- a/imp/lib/Flag/Imap/Junk.php
+++ b/imp/lib/Flag/Imap/Junk.php
@@ -23,10 +23,6 @@
*/
class IMP_Flag_Imap_Junk extends IMP_Flag_Imap
{
- /**
- */
- protected $_abbreviation = 'J';
-
/**
*/
protected $_css = 'flagJunk';
diff --git a/imp/lib/Flag/System/HighPriority.php b/imp/lib/Flag/System/HighPriority.php
index e607f5179d1..9e2d5e6f21d 100644
--- a/imp/lib/Flag/System/HighPriority.php
+++ b/imp/lib/Flag/System/HighPriority.php
@@ -22,10 +22,6 @@
*/
class IMP_Flag_System_HighPriority extends IMP_Flag_System_Match_Header
{
- /**
- */
- protected $_abbreviation = '!';
-
/**
*/
protected $_bgcolor = '#fcc';
diff --git a/imp/lib/Flag/System/Unseen.php b/imp/lib/Flag/System/Unseen.php
index 7f1810e1464..b0e81980097 100644
--- a/imp/lib/Flag/System/Unseen.php
+++ b/imp/lib/Flag/System/Unseen.php
@@ -24,10 +24,6 @@
*/
class IMP_Flag_System_Unseen extends IMP_Flag_System_Match_Flag
{
- /**
- */
- protected $_abbreviation = 'U';
-
/**
*/
protected $_bgcolor = '#eef';
diff --git a/imp/lib/Ftree.php b/imp/lib/Ftree.php
index 0c8d19f5a9d..d795f16833d 100644
--- a/imp/lib/Ftree.php
+++ b/imp/lib/Ftree.php
@@ -1020,19 +1020,6 @@ public function createTree($name, array $opts = array())
$elt_parent = $this[self::BASE_ELT];
break;
- case 'IMP_Tree_Simplehtml':
- $is_open = $val->open;
- if ($tree->shouldToggle($mbox_ob->form_to)) {
- if ($is_open) {
- $this->collapse($val);
- } else {
- $this->expand($val);
- }
- $is_open = !$is_open;
- }
- $label = htmlspecialchars(Horde_String::abbreviate($mbox_ob->abbrev_label, 30 - ($val->level * 2)));
- break;
-
case 'Javascript':
$is_open = $val->open;
$label = empty($opts['basename'])
@@ -1064,10 +1051,6 @@ public function createTree($name, array $opts = array())
$params['container'] = true;
} else {
switch ($view) {
- case $registry::VIEW_MINIMAL:
- $params['url'] = IMP_Minimal_Mailbox::url(array('mailbox' => $mbox_ob));
- break;
-
case $registry::VIEW_SMARTMOBILE:
$url = new Horde_Core_Smartmobile_Url();
$url->add('mbox', $mbox_ob->form_to);
diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php
index a07f5b512f9..27b7f05b08e 100644
--- a/imp/lib/IMP.php
+++ b/imp/lib/IMP.php
@@ -177,11 +177,6 @@ public static function getInitialPage()
break;
case Horde_Registry::VIEW_MINIMAL:
- $result->url = is_null($mbox)
- ? IMP_Minimal_Folders::url()
- : IMP_Minimal_Mailbox::url(array('mailbox' => $mbox));
- break;
-
case Horde_Registry::VIEW_SMARTMOBILE:
$result->url = is_null($mbox)
? Horde::url('smartmobile.php', true)
diff --git a/imp/lib/Mailbox.php b/imp/lib/Mailbox.php
index e7a85b0079f..3cff85a9044 100644
--- a/imp/lib/Mailbox.php
+++ b/imp/lib/Mailbox.php
@@ -1179,20 +1179,6 @@ public function url($page, $buid = null, $encode = true)
return Horde::url('index.php')->setAnchor($anchor);
case Horde_Registry::VIEW_MINIMAL:
- switch ($page) {
- case 'message':
- return IMP_Minimal_Message::url(array(
- 'buid' => $buid,
- 'mailbox' => $this->_mbox
- ))->setRaw(!$encode);
-
- case 'mailbox':
- return IMP_Minimal_Mailbox::url(array(
- 'mailbox' => $this->_mbox
- ))->setRaw(!$encode);
- }
- break;
-
case Horde_Registry::VIEW_SMARTMOBILE:
$url = Horde::url('smartmobile.php');
$anchor = is_null($buid)
diff --git a/imp/lib/Message/Ui.php b/imp/lib/Message/Ui.php
index 6d268f821c5..3628fe15b9e 100644
--- a/imp/lib/Message/Ui.php
+++ b/imp/lib/Message/Ui.php
@@ -191,7 +191,6 @@ public function buildAddressLinks(Horde_Mail_Rfc822_List $addrlist,
$add_link = null;
$addr_array = array();
- $minimal = ($registry->getView() == Horde_Registry::VIEW_MINIMAL);
/* Set up the add address icon link if contact manager is
* available. */
@@ -208,13 +207,11 @@ public function buildAddressLinks(Horde_Mail_Rfc822_List $addrlist,
if ($ob instanceof Horde_Mail_Rfc822_Group) {
$group_array = array();
foreach ($ob->addresses as $ad) {
- $ret = $minimal
- ? strval($ad)
- : htmlspecialchars(strval($ad));
+ $ret = htmlspecialchars(strval($ad));
if ($link) {
$clink = new IMP_Compose_Link(array('to' => strval($ad)));
- $ret = Horde::link($clink->link(), sprintf(_("New Message to %s"), strval($ad))) . htmlspecialchars(strval($ad)) . '';
+ $ret = Horde::link($clink->link(), sprintf(_("New Message to %s"), strval($ad))) . $ret . '';
}
/* Append the add address icon to every address if contact
@@ -231,19 +228,15 @@ public function buildAddressLinks(Horde_Mail_Rfc822_List $addrlist,
$group_array[] = $ret;
}
- $groupname = $minimal
- ? $ob->groupname
- : htmlspecialchars($ob->groupname);
-
- $addr_array[] = $groupname . ':' . (count($group_array) ? ' ' . implode(', ', $group_array) : '');
+ $addr_array[] = htmlspecialchars($ob->groupname) . ':' .
+ (count($group_array) ? ' ' .
+ implode(', ', $group_array) : '');
} else {
- $ret = $minimal
- ? strval($ob)
- : htmlspecialchars(strval($ob));
+ $ret = htmlspecialchars(strval($ob));
if ($link) {
$clink = new IMP_Compose_Link(array('to' => strval($ob)));
- $ret = Horde::link($clink->link(), sprintf(_("New Message to %s"), strval($ob))) . htmlspecialchars(strval($ob)) . '';
+ $ret = Horde::link($clink->link(), sprintf(_("New Message to %s"), strval($ob))) . $ret . '';
}
/* Append the add address icon to every address if contact
@@ -261,10 +254,6 @@ public function buildAddressLinks(Horde_Mail_Rfc822_List $addrlist,
}
}
- if ($minimal) {
- return implode(', ', $addr_array);
- }
-
/* If left with an empty address list ($ret), inform the user that the
* recipient list is purposely "undisclosed". */
if (empty($addr_array)) {
diff --git a/imp/lib/Mime/Status.php b/imp/lib/Mime/Status.php
index de1a50fc08e..02add209bf3 100644
--- a/imp/lib/Mime/Status.php
+++ b/imp/lib/Mime/Status.php
@@ -35,8 +35,7 @@ class IMP_Mime_Status
*/
public $views = array(
Horde_Registry::VIEW_BASIC,
- Horde_Registry::VIEW_DYNAMIC,
- Horde_Registry::VIEW_MINIMAL
+ Horde_Registry::VIEW_DYNAMIC
);
/**
diff --git a/imp/lib/Mime/Viewer/Alternative.php b/imp/lib/Mime/Viewer/Alternative.php
index 71f44741cb8..1aeebfdd42d 100644
--- a/imp/lib/Mime/Viewer/Alternative.php
+++ b/imp/lib/Mime/Viewer/Alternative.php
@@ -68,8 +68,7 @@ protected function _IMPrender($inline)
$display_ids = $ret = array();
- $prefer_plain = (($GLOBALS['registry']->getView() == Horde_Registry::VIEW_MINIMAL) ||
- ($GLOBALS['prefs']->getValue('alternative_display') == 'text'));
+ $prefer_plain = ($GLOBALS['prefs']->getValue('alternative_display') == 'text');
/* Look for a displayable part. RFC: show the LAST choice that can be
* displayed inline. If an alternative is itself a multipart, the user
diff --git a/imp/lib/Mime/Viewer/Html.php b/imp/lib/Mime/Viewer/Html.php
index 8e65028f9bd..1a44b08dfa0 100644
--- a/imp/lib/Mime/Viewer/Html.php
+++ b/imp/lib/Mime/Viewer/Html.php
@@ -70,28 +70,16 @@ protected function _render()
*/
protected function _renderInline()
{
- global $page_output, $registry;
+ global $page_output;
$data = $this->_IMPrender(true);
+ $uid = strval(new Horde_Support_Randomid());
- switch ($view = $registry->getView()) {
- case $registry::VIEW_MINIMAL:
- $data['status'] = new IMP_Mime_Status(array(
- _("This message part contains HTML data, but this data can not be displayed inline."),
- $this->getConfigParam('imp_contents')->linkView($this->_mimepart, 'view_attach', _("View HTML data in new window."))
- ));
- break;
-
- default:
- $uid = strval(new Horde_Support_Randomid());
+ $page_output->addScriptPackage('IMP_Script_Package_Imp');
- $page_output->addScriptPackage('IMP_Script_Package_Imp');
-
- $data['metadata'] = array(array('html', $uid, $data['data']));
- $data['data'] = '
' . _("Loading...") . '
';
- $data['type'] = 'text/html; charset=UTF-8';
- break;
- }
+ $data['metadata'] = array(array('html', $uid, $data['data']));
+ $data['data'] = '' . _("Loading...") . '
';
+ $data['type'] = 'text/html; charset=UTF-8';
return array(
$this->_mimepart->getMimeId() => $data
@@ -141,11 +129,9 @@ protected function _IMPrender($inline)
$view = $registry->getView();
$contents = $this->getConfigParam('imp_contents');
- $convert_text = ($view == $registry::VIEW_MINIMAL) ||
- $injector->getInstance('Horde_Variables')->convert_text;
+ $convert_text = $injector->getInstance('Horde_Variables')->convert_text;
- /* Don't do IMP DOM processing if in mimp mode or converting to
- * text. */
+ /* Don't do IMP DOM processing if converting to text. */
$this->_imptmp = array();
if ($inline && !$convert_text) {
$this->_imptmp += array(
@@ -168,7 +154,7 @@ protected function _IMPrender($inline)
/* Sanitize the HTML. */
$data = $this->_cleanHTML($data, array(
- 'noprefetch' => ($inline && ($view != Horde_Registry::VIEW_MINIMAL)),
+ 'noprefetch' => $inline,
'phishing' => $inline
));
@@ -196,8 +182,7 @@ protected function _IMPrender($inline)
));
}
- /* We are done processing if in mimp mode, or we are converting to
- * text. */
+ /* We are done processing if converting to text. */
if ($convert_text) {
$data = $this->_textFilter($data, 'Html2text', array(
'wrap' => false
diff --git a/imp/lib/Mime/Viewer/Images.php b/imp/lib/Mime/Viewer/Images.php
index 86028d1c857..73e1612900b 100644
--- a/imp/lib/Mime/Viewer/Images.php
+++ b/imp/lib/Mime/Viewer/Images.php
@@ -38,7 +38,7 @@ class IMP_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
*/
public function canRender($mode)
{
- global $browser, $registry;
+ global $browser;
switch ($mode) {
case 'full':
@@ -49,14 +49,6 @@ public function canRender($mode)
return true;
}
break;
-
- case 'inline':
- /* For minimal view: allow rendering of attachments inline (on the
- * view parts page). */
- if ($registry->getView() == $registry::VIEW_MINIMAL) {
- return true;
- }
- break;
}
return parent::canRender($mode);
@@ -109,9 +101,7 @@ protected function _renderInline()
($this->_mimepart->getBytes() < $this->_conf['inlinesize'])) {
$showimg = $GLOBALS['injector']->getInstance('IMP_Images')->showInlineImage($this->getConfigParam('imp_contents'));
} else {
- /* For minimal view - allow rendering of attachments inline
- * (on the view parts page). */
- $showimg = ($GLOBALS['registry']->getView() == Horde_Registry::VIEW_MINIMAL);
+ $showimg = false;
}
if (!$showimg) {
@@ -133,19 +123,11 @@ protected function _renderInline()
$status = new IMP_Mime_Status(_("Your browser does not support inline display of this image type."));
/* See if we can convert to an inline browser viewable form. */
- switch ($GLOBALS['registry']->getView()) {
- case Horde_Registry::VIEW_MINIMAL:
- // Do nothing.
- break;
-
- default:
- $img = $this->_getHordeImageOb(false);
- if ($img &&
- $GLOBALS['browser']->isViewable($img->getContentType())) {
- $convert_link = $this->getConfigParam('imp_contents')->linkViewJS($this->_mimepart, 'view_attach', _("HERE"), array('params' => array('imp_img_view' => 'view_convert')));
- $status->addText(sprintf(_("Click %s to convert the image file into a format your browser can attempt to view."), $convert_link));
- }
- break;
+ $img = $this->_getHordeImageOb(false);
+ if ($img &&
+ $GLOBALS['browser']->isViewable($img->getContentType())) {
+ $convert_link = $this->getConfigParam('imp_contents')->linkViewJS($this->_mimepart, 'view_attach', _("HERE"), array('params' => array('imp_img_view' => 'view_convert')));
+ $status->addText(sprintf(_("Click %s to convert the image file into a format your browser can attempt to view."), $convert_link));
}
return array(
@@ -171,15 +153,7 @@ protected function _renderInfo()
$status = new IMP_Mime_Status(_("This is a thumbnail of an image attachment."));
$status->icon('mime/image.png');
-
- switch ($GLOBALS['registry']->getView()) {
- case Horde_Registry::VIEW_MINIMAL:
- $status->addText(Horde::link($this->getConfigParam('imp_contents')->urlView($this->_mimepart, 'view_attach')) . $this->_outputImgTag('view_thumbnail', _("View Attachment")) . '');
- break;
-
- default:
- $status->addText($this->getConfigParam('imp_contents')->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag('view_thumbnail', _("View Attachment")), null, null, null));
- }
+ $status->addText($this->getConfigParam('imp_contents')->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag('view_thumbnail', _("View Attachment")), null, null, null));
return array(
$this->_mimepart->getMimeId() => array(
diff --git a/imp/lib/Mime/Viewer/Pdf.php b/imp/lib/Mime/Viewer/Pdf.php
index 8a936e2b70a..7bf92e10e4b 100644
--- a/imp/lib/Mime/Viewer/Pdf.php
+++ b/imp/lib/Mime/Viewer/Pdf.php
@@ -85,16 +85,7 @@ protected function _renderInfo()
$status = new IMP_Mime_Status(_("This is a thumbnail of a PDF file attachment."));
$status->icon('mime/image.png');
-
- switch ($GLOBALS['registry']->getView()) {
- case Horde_Registry::VIEW_MINIMAL:
- $status->addText(Horde::link($this->getConfigParam('imp_contents')->urlView($this->_mimepart, 'view_attach')) . $this->_outputImgTag() . '');
- break;
-
- default:
- $status->addText($this->getConfigParam('imp_contents')->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag(), null, null, null));
- break;
- }
+ $status->addText($this->getConfigParam('imp_contents')->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag(), null, null, null));
return array(
$this->_mimepart->getMimeId() => array(
diff --git a/imp/lib/Mime/Viewer/Plain.php b/imp/lib/Mime/Viewer/Plain.php
index 892c0b14d46..9ce364b644c 100644
--- a/imp/lib/Mime/Viewer/Plain.php
+++ b/imp/lib/Mime/Viewer/Plain.php
@@ -100,25 +100,6 @@ protected function _impRender($inline)
$text = IMP::filterText($text);
- /* Done processing if in minimal mode. */
- if ($registry->getView() == Horde_Registry::VIEW_MINIMAL) {
- $filters = array(
- 'text2html' => array(
- 'charset' => $charset,
- 'parselevel' => Horde_Text_Filter_Text2html::NOHTML_NOBREAK
- )
- );
-
- $text = $this->_textFilter($text, array_keys($filters), array_values($filters));
-
- return array(
- $mime_id => array(
- 'data' => $text,
- 'type' => $type
- )
- );
- }
-
// Build filter stack. Starts with HTML markup and tab expansion.
$filters = array(
'text2html' => array(
diff --git a/imp/lib/Mime/Viewer/Video.php b/imp/lib/Mime/Viewer/Video.php
index 421b7aac8fe..1691b5e7363 100644
--- a/imp/lib/Mime/Viewer/Video.php
+++ b/imp/lib/Mime/Viewer/Video.php
@@ -65,12 +65,6 @@ protected function _render()
*/
protected function _renderInfo()
{
- global $registry;
-
- if ($registry->getView() == $registry::VIEW_MINIMAL) {
- return array();
- }
-
$status = array();
$mime_id = $this->_mimepart->getMimeId();
diff --git a/imp/lib/Minimal/Base.php b/imp/lib/Minimal/Base.php
deleted file mode 100644
index 6dca3a6d28e..00000000000
--- a/imp/lib/Minimal/Base.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-abstract class IMP_Minimal_Base
-{
- /**
- * @var IMP_Indices_Mailbox
- */
- public $indices;
-
- /**
- * @var string
- */
- public $title;
-
- /**
- * @var Horde_Variables
- */
- public $vars;
-
- /**
- * @var Horde_View
- */
- public $view;
-
- /**
- * @var array
- */
- protected $_pages = array(
- 'header'
- );
-
- /**
- */
- public function __construct(Horde_Variables $vars)
- {
- $this->vars = $vars;
-
- $this->indices = new IMP_Indices_Mailbox($vars);
-
- $this->view = new Horde_View(array(
- 'templatePath' => IMP_TEMPLATES . '/minimal'
- ));
- $this->view->addHelper('Text');
-
- $this->_init();
- }
-
- /**
- */
- public function render()
- {
- foreach ($this->_pages as $val) {
- echo $this->view->render($val);
- }
- }
-
- /**
- * Output the menu.
- *
- * @param string $page The current page ('compose', 'folders', 'mailbox',
- * 'message', 'search').
- * @param array $items Additional menu items to add to the menu. First
- * element is label, second is URL to link to.
- *
- * @return string The menu.
- */
- public function getMenu($page, $items = array())
- {
- if (!in_array($page, array('mailbox', 'message')) ||
- !$this->indices->mailbox->inbox) {
- $items[] = array(_("Inbox"), IMP_Minimal_Mailbox::url(array('mailbox' => 'INBOX')));
- }
-
- if (!in_array($page, array('compose', 'search')) &&
- IMP_Compose::canCompose()) {
- $items[] = array(_("New Message"), IMP_Minimal_Compose::url());
- }
-
- if (!in_array($page, array('folders', 'search')) &&
- $GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS)) {
- $items[] = array(_("Folders"), IMP_Minimal_Folders::url());
- }
-
- $items[] = array(_("Log out"), $GLOBALS['registry']->getServiceLink('logout', 'imp')->setRaw(false));
-
- $menu = new Horde_Menu();
- foreach ($menu->getSiteLinks() as $menuitem) {
- if ($menuitem != 'separator') {
- $items[] = array($menuitem['text'], $menuitem['url']);
- }
- }
-
- return $items;
- }
-
- /**
- */
- abstract protected function _init();
-
- /**
- */
- public static function url(array $opts = array())
- {
- }
-
-}
diff --git a/imp/lib/Minimal/Compose.php b/imp/lib/Minimal/Compose.php
deleted file mode 100644
index 60c1d95a171..00000000000
--- a/imp/lib/Minimal/Compose.php
+++ /dev/null
@@ -1,558 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Minimal_Compose extends IMP_Minimal_Base
-{
- /**
- * URL Parameters:
- * - a: (string) The action ID.
- * - action: (string) The action ID (used on redirect page).
- * - bcc: (string) BCC address(es).
- * - bcc_expand_[1-5]: (string) Expand matches for BCC addresses.
- * - cc: (string) CC address(es).
- * - cc_expand_[1-5]: (string) Expand matches for BCC addresses.
- * - composeCache: (string) Compose object cache ID.
- * - from: (string) From address to use.
- * - identity: (integer) The identity to use for composing.
- * - message: (string) Message text.
- * - subject: (string) Message subject.
- * - to: (string) To address(es).
- * - to_expand_[1-5]: (string) Expand matches for To addresses.
- * - u: (string) Unique ID (cache buster).
- */
- protected function _init()
- {
- global $injector, $notification, $prefs, $registry;
-
- /* The message text and headers. */
- $expand = array();
- $header = array(
- 'to' => '',
- 'cc' => '',
- 'bcc' => ''
- );
- $msg = '';
- $this->title = _("Compose Message");
-
- /* Get the list of headers to display. */
- $display_hdrs = array(
- 'to' => _("To: "),
- 'cc' => _("Cc: "),
- 'bcc' => ("Bcc: ")
- );
-
- /* Set the current identity. */
- $identity = $injector->getInstance('IMP_Identity');
- if (!$prefs->isLocked('default_identity') &&
- isset($this->vars->identity)) {
- $identity->setDefault($this->vars->identity);
- }
-
- /* Determine if mailboxes are readonly. */
- $drafts = IMP_Mailbox::getPref(IMP_Mailbox::MBOX_DRAFTS);
- $readonly_drafts = $drafts && $drafts->readonly;
- $sent_mail = $identity->getValue(IMP_Mailbox::MBOX_SENT);
- $save_sent_mail = (!$sent_mail || $sent_mail->readonly)
- ? false
- : $prefs->getValue('save_sent_mail');
-
- /* Determine if compose mode is disabled. */
- $compose_disable = !IMP_Compose::canCompose();
-
- /* Initialize objects. */
- $imp_compose = $injector->getInstance('IMP_Factory_Compose')->create($this->vars->composeCache);
-
- /* Are attachments allowed? */
- $attach_upload = $imp_compose->canUploadAttachment();
-
- foreach (array_keys($display_hdrs) as $val) {
- $header[$val] = $this->vars->$val;
-
- /* If we are reloading the screen, check for expand matches. */
- if ($this->vars->composeCache) {
- $expanded = array();
- for ($i = 0; $i < 5; ++$i) {
- if ($tmp = $this->vars->get($val . '_expand_' . $i)) {
- $expanded[] = $tmp;
- }
- }
- if (!empty($expanded)) {
- $header['to'] = strlen($header['to'])
- ? implode(', ', $expanded) . ', ' . $header['to']
- : implode(', ', $expanded);
- }
- }
- }
-
- /* Add attachment. */
- if ($attach_upload &&
- isset($_FILES['upload_1']) &&
- strlen($_FILES['upload_1']['name'])) {
- try {
- $atc_ob = $imp_compose->addAttachmentFromUpload('upload_1');
- if ($atc_ob[0] instanceof IMP_Compose_Exception) {
- throw $atc_ob[0];
- }
- if ($this->vars->a == _("Expand Names")) {
- $notification->push(sprintf(_("Added \"%s\" as an attachment."), $atc_ob[0]->getPart()->getName()), 'horde.success');
- }
- } catch (IMP_Compose_Exception $e) {
- $this->vars->a = null;
- $notification->push($e, 'horde.error');
- }
- }
-
- /* Run through the action handlers. */
- switch ($this->vars->a) {
- // 'd' = draft
- // 'en' = edit as new
- // 't' = template
- case 'd':
- case 'en':
- case 't':
- try {
- switch ($this->vars->a) {
- case 'd':
- $result = $imp_compose->resumeDraft($this->indices, array(
- 'format' => 'text'
- ));
- $this->view->resume = true;
- break;
-
- case 'en':
- $result = $imp_compose->editAsNew($this->indices, array(
- 'format' => 'text'
- ));
- break;
-
- case 't':
- $result = $imp_compose->useTemplate($this->indices, array(
- 'format' => 'text'
- ));
- break;
- }
-
- $msg = $result['body'];
- $header = array_merge(
- $header,
- $this->_convertToHeader($result)
- );
- if (!is_null($result['identity']) &&
- ($result['identity'] != $identity->getDefault()) &&
- !$prefs->isLocked('default_identity')) {
- $identity->setDefault($result['identity']);
- $sent_mail = $identity->getValue(IMP_Mailbox::MBOX_SENT);
- }
- } catch (IMP_Compose_Exception $e) {
- $notification->push($e);
- }
- break;
-
- case _("Expand Names"):
- foreach (array_keys($display_hdrs) as $val) {
- if (($val == 'to') || ($this->vars->action != 'rc')) {
- $res = $this->_expandAddresses($header[$val]);
- if (is_string($res)) {
- $header[$val] = $res;
- } else {
- $header[$val] = $res[0];
- $expand[$val] = array_slice($res, 1);
- }
- }
- }
-
- if (isset($this->vars->action)) {
- $this->vars->a = $this->vars->action;
- }
- break;
-
- // 'r' = reply
- // 'rl' = reply to list
- // 'ra' = reply to all
- case 'r':
- case 'ra':
- case 'rl':
- $actions = array(
- 'r' => IMP_Compose::REPLY_SENDER,
- 'ra' => IMP_Compose::REPLY_ALL,
- 'rl' => IMP_Compose::REPLY_LIST
- );
-
- try {
- $reply_msg = $imp_compose->replyMessage(
- $actions[$this->vars->a],
- $this->_getContents(),
- array(
- 'format' => 'text',
- 'to' => $header['to']
- )
- );
- } catch (IMP_Exception $e) {
- $notification->push($e, 'horde.error');
- break;
- }
-
- $header = $this->_convertToHeader($reply_msg);
-
- $notification->push(_("Reply text will be automatically appended to your outgoing message."), 'horde.message');
- $this->title = _("Reply");
- break;
-
- // 'f' = forward
- case 'f':
- try {
- $fwd_msg = $imp_compose->forwardMessage(
- IMP_Compose::FORWARD_ATTACH,
- $this->_getContents(),
- false
- );
- } catch (IMP_Exception $e) {
- $notification->push($e, 'horde.error');
- break;
- }
-
- $header = $this->_convertToHeader($fwd_msg);
-
- $notification->push(_("Forwarded message will be automatically added to your outgoing message."), 'horde.message');
- $this->title = _("Forward");
- break;
-
- // 'rc' = redirect compose
- case 'rc':
- $imp_compose->redirectMessage($this->indices);
- $this->title = _("Redirect");
- break;
-
- case _("Redirect"):
- try {
- $num_msgs = $imp_compose->sendRedirectMessage($header['to']);
- $imp_compose->destroy('send');
-
- $notification->push(ngettext("Message redirected successfully.", "Messages redirected successfully.", count($num_msgs)), 'horde.success');
- IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();
- } catch (Horde_Exception $e) {
- $this->vars->a = 'rc';
- $notification->push($e);
- }
- break;
-
- case _("Save Draft"):
- case _("Send"):
- switch ($this->vars->a) {
- case _("Save Draft"):
- if ($readonly_drafts) {
- break 2;
- }
- break;
-
- case _("Send"):
- if ($compose_disable) {
- break 2;
- }
- break;
- }
-
- $message = strval($this->vars->message);
- $f_to = $header['to'];
- $old_header = $header;
- $header = array();
-
- switch ($imp_compose->replyType(true)) {
- case IMP_Compose::REPLY:
- try {
- $reply_msg = $imp_compose->replyMessage(IMP_Compose::REPLY_SENDER, $imp_compose->getContentsOb(), array(
- 'to' => $f_to
- ));
- $msg = $reply_msg['body'];
- } catch (IMP_Exception $e) {
- $notification->push($e, 'horde.error');
- $msg = '';
- }
- $message .= "\n" . $msg;
- break;
-
- case IMP_Compose::FORWARD:
- try {
- $fwd_msg = $imp_compose->forwardMessage(IMP_Compose::FORWARD_ATTACH, $imp_compose->getContentsOb());
- $msg = $fwd_msg['body'];
- } catch (IMP_Exception $e) {
- $notification->push($e, 'horde.error');
- }
- $message .= "\n" . $msg;
- break;
- }
-
- try {
- $header['from'] = strval($identity->getFromLine(null, $this->vars->from));
- } catch (Horde_Exception $e) {
- $header['from'] = '';
- }
- $header['replyto'] = $identity->getValue('replyto_addr');
- $header['subject'] = strval($this->vars->subject);
-
- foreach (array_keys($display_hdrs) as $val) {
- $header[$val] = $old_header[$val];
- }
-
- switch ($this->vars->a) {
- case _("Save Draft"):
- try {
- $notification->push($imp_compose->saveDraft($header, $message), 'horde.success');
- if ($prefs->getValue('close_draft')) {
- $imp_compose->destroy('save_draft');
- IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();
- }
- } catch (IMP_Compose_Exception $e) {
- $notification->push($e);
- }
- break;
-
- case _("Send"):
- try {
- $imp_compose->buildAndSendMessage(
- $message,
- $header,
- $identity,
- array(
- 'readreceipt' => ($prefs->getValue('request_mdn') == 'always'),
- 'save_sent' => $save_sent_mail,
- 'sent_mail' => $sent_mail
- )
- );
- $imp_compose->destroy('send');
-
- $notification->push(_("Message sent successfully."), 'horde.success');
- IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();
- } catch (IMP_Compose_Exception $e) {
- $notification->push($e);
-
- /* Switch to tied identity. */
- if (!is_null($e->tied_identity)) {
- $identity->setDefault($e->tied_identity);
- $notification->push(_("Your identity has been switched to the identity associated with the current recipient address. The identity will not be checked again during this compose action."));
- }
- }
- break;
- }
- break;
-
- case _("Cancel"):
- $imp_compose->destroy('cancel');
- IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();
- exit;
-
- case _("Discard Draft"):
- $imp_compose->destroy('discard');
- IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();
- exit;
- }
-
- /* Grab any data that we were supplied with. */
- if (empty($msg)) {
- $msg = strval($this->vars->message);
- }
- if (empty($header['subject'])) {
- $header['subject'] = strval($this->vars->subject);
- }
-
- $this->view->cacheid = $imp_compose->getCacheId();
- $this->view->hmac = $imp_compose->getHmac();
- $this->view->menu = $this->getMenu('compose');
- $this->view->url = self::url();
- $this->view->user = $registry->getAuth();
-
- switch ($this->vars->a) {
- case 'rc':
- $this->_pages[] = 'redirect';
- $this->_pages[] = 'menu';
- unset($display_hdrs['cc'], $display_hdrs['bcc']);
- break;
-
- default:
- $this->_pages[] = 'compose';
- $this->_pages[] = 'menu';
-
- $this->view->compose_enable = !$compose_disable;
- $this->view->msg = $msg;
- $this->view->save_draft = ($injector->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_DRAFTS) && !$readonly_drafts);
- $this->view->subject = $header['subject'];
-
- $select_list = $identity->getSelectList();
- $default_identity = $identity->getDefault();
-
- if ($prefs->isLocked('default_identity')) {
- $select_list = array(
- $default_identity => $select_list[$default_identity]
- );
- }
-
- $tmp = array();
- foreach ($select_list as $key => $val) {
- $tmp[] = array(
- 'key' => $key,
- 'sel' => ($key == $default_identity),
- 'val' => $val
- );
- }
- $this->view->identities = $tmp;
-
- if ($attach_upload) {
- $this->view->attach = true;
- if (count($imp_compose)) {
- $atc_part = $imp_compose[0]->getPart();
- $this->view->attach_name = $atc_part->getName();
- $this->view->attach_size = IMP::sizeFormat($atc_part->getBytes());
- $this->view->attach_type = $atc_part->getType();
- }
- }
-
- $this->title = _("Message Composition");
- }
-
- $hdrs = array();
- foreach ($display_hdrs as $key => $val) {
- $tmp = array(
- 'key' => $key,
- 'label' => $val,
- 'val' => $header[$key]
- );
-
- if (isset($expand[$key])) {
- $tmp['matchlabel'] = (count($expand[$key][1]) > 5)
- ? sprintf(_("Ambiguous matches for \"%s\" (first 5 matches displayed):"), $expand[$key][0])
- : sprintf(_("Ambiguous matches for \"%s\":"), $expand[$key][0]);
-
- $tmp['match'] = array();
- foreach ($expand[$key][1] as $key2 => $val2) {
- if ($key2 == 5) {
- break;
- }
- $tmp['match'][] = array(
- 'id' => $key . '_expand_' . $key2,
- 'val' => $val2
- );
- }
- }
-
- $hdrs[] = $tmp;
- }
-
- $this->view->hdrs = $hdrs;
- $this->view->title = $this->title;
- }
-
- /**
- */
- public static function url(array $opts = array())
- {
- return Horde::url('minimal.php')->add('page', 'compose')->unique();
- }
-
- /**
- * Expand addresses in a string. Only the last address in the string will
- * be expanded.
- *
- * @param string $input The input string.
- *
- * @return mixed If a string, this value should be used as the new
- * input string. If an array, the first value is the
- * input string without the search string; the second
- * value is the search string; and the third value is
- * the list of matching addresses.
- */
- protected function _expandAddresses($input)
- {
- $addr_list = IMP::parseAddressList($input, array(
- 'default_domain' => null
- ));
-
- if (!($size = count($addr_list))) {
- return '';
- }
-
- $search = $addr_list[$size - 1];
-
- /* Don't search if the search string looks like an e-mail address. */
- if (!is_null($search->mailbox) && !is_null($search->host)) {
- return strval($search);
- }
-
- /* "Search" string will be in mailbox element. */
- $imple = new IMP_Ajax_Imple_ContactAutoCompleter();
- $res = $imple->getAddressList($search->mailbox);
-
- switch (count($res)) {
- case 0:
- $GLOBALS['notification']->push(sprintf(_("Search for \"%s\" failed: no address found."), $search->mailbox), 'horde.warning');
- return strval($addr_list);
- case 1:
- $addr_list[$size] = $res[0];
- return strval($addr_list);
-
- default:
- $GLOBALS['notification']->push(_("Ambiguous address found."), 'horde.warning');
- unset($addr_list[$size]);
- return array(
- strval($addr_list),
- $search->mailbox,
- $res
- );
- }
- }
-
- /**
- * Create the IMP_Contents objects needed to create a message.
- *
- * @param Horde_Variables $vars The variables object.
- *
- * @return IMP_Contents The IMP_Contents object.
- * @throws IMP_Exception
- */
- protected function _getContents()
- {
- try {
- return $GLOBALS['injector']->getInstance('IMP_Factory_Contents')->create($this->indices);
- } catch (Horde_Exception $e) {}
-
- $this->vars->buid = null;
- $this->vars->type = 'new';
-
- throw new IMP_Exception(_("Could not retrieve message data from the mail server."));
- }
-
- /**
- * Convert a compose response object to header values.
- *
- * @param array $in Compose response object.
- *
- * @return array Header entry.
- */
- protected function _convertToHeader($in)
- {
- $out = array();
-
- if (isset($in['addr'])) {
- $out['to'] = strval($in['addr']['to']);
- $out['cc'] = strval($in['addr']['cc']);
- $out['bcc'] = strval($in['addr']['bcc']);
- }
-
- if (isset($in['subject'])) {
- $out['subject'] = $in['subject'];
- }
-
- return $out;
- }
-
-}
diff --git a/imp/lib/Minimal/Error.php b/imp/lib/Minimal/Error.php
deleted file mode 100644
index c528e691f80..00000000000
--- a/imp/lib/Minimal/Error.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- * @category Horde
- * @copyright 2013-2014 Horde LLC
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Minimal_Error extends IMP_Minimal_Base
-{
- /**
- */
- protected function _init()
- {
- $this->view->menu = $this->getMenu('');
- $this->_pages[] = 'menu';
- }
-
-}
diff --git a/imp/lib/Minimal/Folders.php b/imp/lib/Minimal/Folders.php
deleted file mode 100644
index dc76b5d1c77..00000000000
--- a/imp/lib/Minimal/Folders.php
+++ /dev/null
@@ -1,83 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Minimal_Folders extends IMP_Minimal_Base
-{
- /**
- * URL Parameters:
- * - ts: (integer) Toggle subscribe view.
- */
- protected function _init()
- {
- global $injector, $notification, $prefs, $session;
-
- $imp_imap = $injector->getInstance('IMP_Factory_Imap')->create();
-
- /* Redirect back to the mailbox if folder use is not allowed. */
- if (!$imp_imap->access(IMP_Imap::ACCESS_FOLDERS)) {
- $notification->push(_("The folder view is not enabled."), 'horde.error');
- IMP_Minimal_Mailbox::url()->redirect();
- }
-
- /* Decide whether or not to show all the unsubscribed mailboxes. */
- $subscribe = $prefs->getValue('subscribe');
- $showAll = (!$subscribe || $session->get('imp', 'showunsub'));
-
- /* Toggle subscribed view, if necessary. */
- if ($subscribe && $this->vars->ts) {
- $showAll = !$showAll;
- $session->set('imp', 'showunsub', $showAll);
- }
-
- /* Initialize the IMP_Ftree object. */
- $ftree = $injector->getInstance('IMP_Ftree');
- $iterator = new IMP_Ftree_IteratorFilter($ftree);
- $iterator->add($iterator::REMOTE);
- if ($showAll) {
- $ftree->loadUnsubscribed();
- $iterator->remove($iterator::UNSUB);
- }
- $tree = $ftree->createTree('mimp_folders', array(
- 'iterator' => $iterator,
- 'poll_info' => true,
- 'render_type' => 'IMP_Tree_Simplehtml'
- ));
-
- $selfurl = self::url();
- $menu = array(array(_("Refresh"), $selfurl));
- if ($subscribe) {
- $menu[] = array(
- ($showAll ? _("Show Subscribed Mailboxes") : _("Show All Mailboxes")),
- $selfurl->copy()->add('ts', 1)
- );
- }
-
- $this->title = _("Folders");
-
- $this->view->menu = $this->getMenu('folders', $menu);
- $this->view->title = $this->title;
- $this->view->tree = $tree->getTree(true);
-
- $this->_pages[] = 'folders';
- $this->_pages[] = 'menu';
- }
-
- /**
- */
- public static function url(array $opts = array())
- {
- return Horde::url('minimal.php')->add('page', 'folders');
- }
-
-}
diff --git a/imp/lib/Minimal/Mailbox.php b/imp/lib/Minimal/Mailbox.php
deleted file mode 100644
index 6653d5c2652..00000000000
--- a/imp/lib/Minimal/Mailbox.php
+++ /dev/null
@@ -1,233 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Minimal_Mailbox extends IMP_Minimal_Base
-{
- /**
- * URL Parameters:
- * - a: (string) Action ID.
- * - checkbox: TODO
- * - p: (integer) Page.
- * - search: (sring) The search string
- * - start: (integer) Start.
- * - t: (string) Token.
- */
- protected function _init()
- {
- global $injector, $notification, $prefs, $session;
-
- $imp_imap = $this->indices->mailbox->imp_imap;
- $imp_search = $injector->getInstance('IMP_Search');
-
- /* Determine if mailbox is readonly. */
- $readonly = $this->indices->mailbox->readonly;
-
- /* Get the base URL for this page. */
- $mailbox_url = self::url(array('mailbox' => $this->indices->mailbox));
-
- /* Perform message actions (via advanced UI). */
- switch ($this->vars->checkbox) {
- // 'd' = delete message
- // 'u' = undelete message
- case 'd':
- case 'u':
- $imp_message = $injector->getInstance('IMP_Message');
-
- if ($this->vars->checkbox == 'd') {
- try {
- $session->checkToken($this->vars->t);
- $imp_message->delete($this->indices);
- } catch (Horde_Exception $e) {
- $notification->push($e);
- }
- } else {
- $imp_message->undelete($this->indices);
- }
- break;
-
- // 'rs' = report spam
- // 'ri' = report innocent
- case 'rs':
- case 'ri':
- $injector->getInstance('IMP_Factory_Spam')->create($this->vars->checkbox == 'rs' ? IMP_Spam::SPAM : IMP_Spam::INNOCENT)->report($this->indices);
- break;
- }
-
- /* Run through the action handlers. */
- switch ($this->vars->a) {
- // 'm' = message missing
- case 'm':
- $notification->push(_("There was an error viewing the requested message."), 'horde.error');
- break;
-
- // 'e' = expunge mailbox
- case 'e':
- $injector->getInstance('IMP_Message')->expungeMailbox(array(strval($this->indices->mailbox) => 1));
- break;
-
- // 'ds' = do search
- case 'ds':
- if (!empty($this->vars->search) &&
- $this->indices->mailbox->access_search) {
- /* Create the search query and reset the global mailbox
- * variable. */
- $q_ob = $imp_search->createQuery(array(new IMP_Search_Element_Text($this->vars->search, false)), array(
- 'mboxes' => array($this->indices->mailbox)
- ));
-
- /* Need to re-calculate these values. */
- $this->indices->mailbox = IMP_Mailbox::get($q_ob);
- $readonly = $this->indices->mailbox->readonly;
- $mailbox_url = self::url(array('mailbox' => $this->indices->mailbox));
- }
- break;
- }
-
- /* Build the list of messages in the mailbox. */
- $imp_mailbox = $this->indices->mailbox->list_ob;
- $pageOb = $imp_mailbox->buildMailboxPage($this->vars->p, $this->vars->start);
-
- /* Generate page title. */
- $this->title = $this->indices->mailbox->display;
-
- /* Modify title for display on page. */
- if ($pageOb['msgcount']) {
- $this->title .= ' (';
- if ($imp_imap->access(IMP_Imap::ACCESS_UNSEEN)) {
- $unseen = $imp_mailbox->unseenMessages(Horde_Imap_Client::SEARCH_RESULTS_COUNT);
- $this->title .= sprintf(_("%d unseen"), $unseen) . '/';
- }
- $this->title .= sprintf(_("%d total"), $pageOb['msgcount']) . ')';
- }
- if ($pageOb['pagecount'] > 1) {
- $this->title .= ' - ' . sprintf(_("%d of %d"), $pageOb['page'], $pageOb['pagecount']);
- }
- if ($readonly) {
- $this->title .= ' [' . _("Read-Only") . ']';
- }
- $this->view->title = $this->title;
-
- /* Build the array of message information. */
- $imp_ui = new IMP_Mailbox_Ui($this->indices->mailbox);
- $mbox_info = $imp_mailbox->getMailboxArray(range($pageOb['begin'], $pageOb['end']), array('headers' => true));
- $msgs = array();
-
- while (list(,$ob) = each($mbox_info['overview'])) {
- /* Initialize the header fields. */
- $msg = array(
- 'buid' => $imp_mailbox->getBuid($ob['mailbox'], $ob['uid']),
- 'status' => '',
- 'subject' => trim($imp_ui->getSubject($ob['envelope']->subject))
- );
-
- /* Format the from header. */
- $getfrom = $imp_ui->getFrom($ob['envelope']);
- $msg['from'] = $getfrom['from'];
-
- /* Get flag information. */
- $flag_parse = $injector->getInstance('IMP_Flags')->parse(array(
- 'flags' => $ob['flags'],
- 'headers' => $ob['headers'],
- 'personal' => $ob['envelope']->to
- ));
-
- foreach ($flag_parse as $val) {
- if ($abbrev = $val->abbreviation) {
- $msg['status'] .= $abbrev;
- } elseif ($val instanceof IMP_Flag_User) {
- $msg['subject'] = '*' . Horde_String::truncate($val->label, 8) . '* ' . $msg['subject'];
- }
- }
-
- /* Generate the target link. */
- if ($this->indices->mailbox->templates) {
- $compose = 't';
- } elseif ($this->indices->mailbox->draft ||
- in_array(Horde_Imap_Client::FLAG_DRAFT, $ob['flags'])) {
- $compose = 'd';
- } else {
- $msg['target'] = IMP_Minimal_Message::url(array(
- 'buid' => $msg['buid'],
- 'mailbox' => $this->indices->mailbox
- ));
- }
-
- if (!isset($msg['target'])) {
- $clink = new IMP_Compose_Link();
- $msg['target'] = $clink->link()->add(array(
- 'a' => $compose,
- 'buid' => $msg['buid'],
- 'bodypart' => 1,
- 'mailbox' => $this->indices->mailbox
- ));
- }
-
- $msgs[] = $msg;
- }
- $this->view->msgs = $msgs;
-
- $mailbox = $mailbox_url->copy()->add('p', $pageOb['page']);
- $menu = array(array(_("Refresh"), $mailbox));
- $search_mbox = $this->indices->mailbox->search;
-
- /* Determine if we are going to show the Purge Deleted link. */
- if (!$prefs->getValue('use_trash') &&
- !$this->indices->mailbox->vinbox &&
- $this->indices->mailbox->access_expunge) {
- $menu[] = array(_("Purge Deleted"), $mailbox->copy()->add('a', 'e'));
- }
-
- /* Add search link. */
- if ($this->indices->mailbox->access_search) {
- if ($search_mbox) {
- $mboxes = $imp_search[strval($this->indices->mailbox)]->mboxes;
- $orig_mbox = IMP_Mailbox::get(reset($mboxes));
- $menu[] = array(sprintf(_("New Search in %s"), $orig_mbox->label), IMP_Minimal_Search::url(array('mailbox' => $orig_mbox)));
- } else {
- $menu[] = array(_("Search"), IMP_Minimal_Search::url(array('mailbox' => $this->indices->mailbox)));
- }
- }
-
- /* Generate page links. */
- if ($pageOb['page'] != 1) {
- $menu[] = array(_("First Page"), $mailbox_url->copy()->add('p', 1));
- $menu[] = array(_("Previous Page"), $mailbox_url->copy()->add('p', $pageOb['page'] - 1));
- }
- if ($pageOb['page'] != $pageOb['pagecount']) {
- $menu[] = array(_("Next Page"), $mailbox_url->copy()->add('p', $pageOb['page'] + 1));
- $menu[] = array(_("Last Page"), $mailbox_url->copy()->add('p', $pageOb['pagecount']));
- }
-
- $this->view->menu = $this->getMenu('mailbox', $menu);
-
- $this->view->checkbox = $mailbox_url->copy()->add('p', $pageOb['page']);
- $this->view->delete = $this->indices->mailbox->access_deletemsgs;
- $this->view->t = $session->getToken();
-
- $this->_pages[] = 'mailbox';
- $this->_pages[] = 'menu';
- }
-
- /**
- * @param array $opts Options:
- * - mailbox: (string) The mailbox to link to.
- */
- public static function url(array $opts = array())
- {
- $opts = array_merge(array('mailbox' => 'INBOX'), $opts);
-
- return IMP_Mailbox::get($opts['mailbox'])->url('minimal')->add('page', 'mailbox');
- }
-
-}
diff --git a/imp/lib/Minimal/Message.php b/imp/lib/Minimal/Message.php
deleted file mode 100644
index 48e4c2de399..00000000000
--- a/imp/lib/Minimal/Message.php
+++ /dev/null
@@ -1,340 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Minimal_Message extends IMP_Minimal_Base
-{
- /**
- * URL Parameters:
- * a: (string) Action ID.
- * allto: (boolean) View all To addresses?
- * buid: (string) Browser UID.
- * t: (string) Token.
- */
- protected function _init()
- {
- global $injector, $notification, $page_output, $prefs, $session;
-
- $imp_mailbox = $this->indices->mailbox->list_ob;
- $imp_mailbox->setIndex($this->indices);
-
- $mailbox_url = IMP_Minimal_Mailbox::url(array(
- 'mailbox' => $this->indices->mailbox
- ));
-
- /* Make sure we have a valid index. */
- if (!$imp_mailbox->isValidIndex()) {
- $mailbox_url->add('a', 'm')->redirect();
- }
-
- $imp_ui = $injector->getInstance('IMP_Message_Ui');
-
- /* Run through action handlers */
- $msg_delete = false;
- switch ($this->vars->a) {
- // 'd' = delete message
- case 'd':
- $old_index = $imp_mailbox->getIndex();
- try {
- $session->checkToken($this->vars->t);
- $msg_delete = (bool)$injector->getInstance('IMP_Message')->delete(
- $this->indices,
- array('mailboxob' => $imp_mailbox)
- );
- } catch (Horde_Exception $e) {
- $notification->push($e);
- }
- break;
-
- // 'u' = undelete message
- case 'u':
- $old_index = $imp_mailbox->getIndex();
- $injector->getInstance('IMP_Message')->undelete($this->indices);
- break;
-
- // 'rs' = report spam
- // 'ri' = report innocent
- case 'rs':
- case 'ri':
- $old_index = $imp_mailbox->getIndex();
- $msg_delete = ($injector->getInstance('IMP_Factory_Spam')->create($this->vars->a == 'rs' ? IMP_Spam::SPAM : IMP_Spam::INNOCENT)->report($this->indices, array('mailboxob' => $imp_mailbox)) === 1);
- break;
- }
-
- if ($msg_delete && $imp_ui->moveAfterAction($this->indices->mailbox)) {
- $imp_mailbox->setIndex(1);
- }
-
- /* We may have done processing that has taken us past the end of the
- * message array, so we will return to the mailbox. */
- if (!$imp_mailbox->isValidIndex() ||
- ($msg_delete && $prefs->getValue('mailbox_return'))) {
- $mailbox_url->add('s', $old_index)->redirect();
- }
-
- /* Now that we are done processing, get the index and array index of
- * the current message. */
- $msg_index = $imp_mailbox[$imp_mailbox->getIndex()];
- $mailbox = $msg_index['m'];
- $uid = $msg_index['u'];
- $buid = $imp_mailbox->getBuid($mailbox, $uid);
-
- /* Get envelope/flag/header information. */
- try {
- $imp_imap = $mailbox->imp_imap;
-
- /* Need to fetch flags before HEADERTEXT, because SEEN flag might
- * be set before we can grab it. */
- $query = new Horde_Imap_Client_Fetch_Query();
- $query->flags();
- $flags_ret = $imp_imap->fetch($mailbox, $query, array(
- 'ids' => $imp_imap->getIdsOb($uid)
- ));
-
- $query = new Horde_Imap_Client_Fetch_Query();
- $query->envelope();
- $fetch_ret = $imp_imap->fetch($mailbox, $query, array(
- 'ids' => $imp_imap->getIdsOb($uid)
- ));
- } catch (IMP_Imap_Exception $e) {
- $mailbox_url->add('a', 'm')->redirect();
- }
-
- $envelope = $fetch_ret->first()->getEnvelope();
- $flags = $flags_ret->first()->getFlags();
-
- /* Parse the message. */
- try {
- $imp_contents = $injector->getInstance('IMP_Factory_Contents')->create(new IMP_Indices($imp_mailbox));
- $mime_headers = $imp_contents->getHeaderAndMarkAsSeen();
- } catch (IMP_Exception $e) {
- $mailbox_url->add('a', 'm')->redirect();
- }
-
- /* Get the starting index for the current message and the message
- * count. */
- $msgindex = $imp_mailbox->getIndex();
- $msgcount = count($imp_mailbox);
-
- /* Generate the mailbox link. */
- $mailbox_link = $mailbox_url->add('s', $msgindex);
- $self_link = self::url(array(
- 'buid' => $buid,
- 'mailbox' => $this->indices->mailbox
- ));
-
- /* Create the Identity object. */
- $user_identity = $injector->getInstance('IMP_Identity');
-
- /* Develop the list of headers to display. */
- $basic_headers = $imp_ui->basicHeaders();
- $display_headers = $msgAddresses = array();
-
- if (($subject = $mime_headers->getValue('subject'))) {
- /* Filter the subject text, if requested. */
- $subject = Horde_String::truncate(IMP::filterText($subject), 50);
- } else {
- $subject = _("[No Subject]");
- }
- $display_headers['subject'] = $subject;
-
- $date_ob = new IMP_Message_Date($envelope->date);
- if ($format_date = $date_ob->format($date_ob::DATE_LOCAL)) {
- $display_headers['date'] = $format_date;
- }
-
- /* Build From address links. */
- $display_headers['from'] = $imp_ui->buildAddressLinks($envelope->from, null, false);
-
- /* Build To/Cc/Bcc links. */
- foreach (array('to', 'cc', 'bcc') as $val) {
- $msgAddresses[] = $mime_headers->getValue($val);
- $addr_val = $imp_ui->buildAddressLinks($envelope->$val, null, false);
- if (!empty($addr_val)) {
- $display_headers[$val] = $addr_val;
- }
- }
-
- /* Check for the presence of mailing list information. */
- $list_info = $imp_ui->getListInformation($mime_headers);
-
- /* See if the priority has been set. */
- switch($priority = $injector->getInstance('IMP_Mime_Headers')->getPriority($mime_headers)) {
- case 'high':
- case 'low':
- $basic_headers['priority'] = _("Priority");
- $display_headers['priority'] = Horde_String::ucfirst($priority);
- break;
- }
-
- /* Set the status information of the message. */
- $status = '';
- $match_identity = $identity = null;
-
- if (!empty($msgAddresses)) {
- $match_identity = $identity = $user_identity->getMatchingIdentity($msgAddresses);
- if (is_null($identity)) {
- $identity = $user_identity->getDefault();
- }
- }
-
- $flag_parse = $injector->getInstance('IMP_Flags')->parse(array(
- 'flags' => $flags,
- 'personal' => $match_identity
- ));
-
- foreach ($flag_parse as $val) {
- if ($abbrev = $val->abbreviation) {
- $status .= $abbrev;
- } elseif ($val instanceof IMP_Flag_User) {
- $status .= ' *' . Horde_String::truncate($val->label, 8) . '*';
- }
- }
-
- /* Create the body of the message. */
- $inline_ob = new IMP_Contents_InlineOutput();
- $inlineout = $inline_ob->getInlineOutput($imp_contents, array(
- 'display_mask' => IMP_Contents::RENDER_INLINE,
- 'no_inline_all' => true
- ));
-
- $msg_text = $inlineout['msgtext'];
-
- $this->view->msg = nl2br($injector->getInstance('Horde_Core_Factory_TextFilter')->filter($msg_text, 'space2html'));
-
- $menu = array();
- if ($this->indices->mailbox->access_deletemsgs) {
- $menu[] = in_array(Horde_Imap_Client::FLAG_DELETED, $flags)
- ? array(_("Undelete"), $self_link->copy()->add('a', 'u'))
- : array(_("Delete"), $self_link->copy()->add(array('a' => 'd', 't' => $session->getToken())));
- }
-
- /* Add compose actions (Reply, Reply List, Reply All, Forward,
- * Redirect, Edit as New). */
- if (IMP_Compose::canCompose()) {
- $clink_ob = new IMP_Compose_Link();
- $clink_ob->args['buid'] = $buid;
- $clink_ob->args['mailbox'] = $this->indices->mailbox;
- $clink = $clink_ob->link()->add(array('identity' => $identity));
-
- $menu[] = array(_("Reply"), $clink->copy()->add(array('a' => 'r')));
-
- if ($list_info['reply_list']) {
- $menu[] = array(_("Reply to List"), $clink->copy()->add(array('a' => 'rl')));
- }
-
- $addr_ob = clone($envelope->to);
- $addr_ob->add($envelope->cc);
- $addr_ob->setIteratorFilter(0, $user_identity->getAllFromAddresses());
-
- if (count($addr_ob)) {
- $menu[] = array(_("Reply All"), $clink->copy()->add(array('a' => 'ra')));
- }
-
- $menu[] = array(_("Forward"), $clink->copy()->add(array('a' => 'f')));
- $menu[] = array(_("Redirect"), $clink->copy()->add(array('a' => 'rc')));
- $menu[] = array(_("Edit as New"), $clink->copy()->add(array('a' => 'en')));
- }
-
- /* Generate previous/next links. */
- if ($prev_msg = $imp_mailbox[$imp_mailbox->getIndex() - 1]) {
- $menu[] = array(_("Previous Message"), self::url(array(
- 'buid' => $imp_mailbox->getBuid($prev_msg['m'], $prev_msg['u']),
- 'mailbox' => $this->indices->mailbox
- )));
- }
- if ($next_msg = $imp_mailbox[$imp_mailbox->getIndex() + 1]) {
- $menu[] = array(_("Next Message"), self::url(array(
- 'buid' => $imp_mailbox->getBuid($next_msg['m'], $next_msg['u']),
- 'mailbox' => $this->indices->mailbox
- )));
- }
-
- $menu[] = array(sprintf(_("To %s"), $this->indices->mailbox->label), $mailbox_link);
-
- if ($mailbox->spam_show) {
- $menu[] = array(_("Report as Spam"), $self_link->copy()->add(array('a' => 'rs', 't' => $session->getToken())));
- }
-
- if ($mailbox->innocent_show) {
- $menu[] = array(_("Report as Innocent"), $self_link->copy()->add(array('a' => 'ri', 't' => $session->getToken())));
- }
-
- $this->view->menu = $this->getMenu('message', $menu);
-
- $hdrs = array();
- foreach ($display_headers as $head => $val) {
- $tmp = array(
- 'label' => $basic_headers[$head]
- );
- if ((Horde_String::lower($head) == 'to') &&
- !isset($this->vars->allto) &&
- (($pos = strpos($val, ',')) !== false)) {
- $val = Horde_String::substr($val, 0, $pos);
- $tmp['all_to'] = $self_link->copy()->add('allto', 1);
- }
- $tmp['val'] = $val;
- $hdrs[] = $tmp;
- }
- $this->view->hdrs = $hdrs;
-
- $atc = array();
- foreach ($inlineout['atc_parts'] as $key) {
- $summary = $imp_contents->getSummary($key, IMP_Contents::SUMMARY_BYTES | IMP_Contents::SUMMARY_SIZE | IMP_Contents::SUMMARY_DESCRIP | IMP_Contents::SUMMARY_DOWNLOAD);
-
- $tmp = array(
- 'descrip' => $summary['description_raw'],
- 'size' => $summary['size'],
- 'type' => $summary['type']
- );
-
- if (!empty($summary['download'])) {
- /* Preference: if set, only show download confirmation screen
- * if attachment over a certain size. */
- $tmp['download'] = IMP_Minimal_Messagepart::url(array(
- 'buid' => $buid,
- 'mailbox' => $this->indices->mailbox
- ))->add('atc', $key);
- }
-
- if ($imp_contents->canDisplay($key, IMP_Contents::RENDER_INLINE)) {
- $tmp['view'] = IMP_Minimal_Messagepart::url(array(
- 'buid' => $buid,
- 'mailbox' => $this->indices->mailbox
- ))->add('id', $key);
- }
-
- $atc[] = $tmp;
- }
- $this->view->atc = $atc;
-
- $this->title = $display_headers['subject'];
- $this->view->title = ($status ? $status . ' ' : '') . sprintf(_("(Message %d of %d)"), $msgindex, $msgcount);
-
- $page_output->noDnsPrefetch();
-
- $this->_pages[] = 'message';
- $this->_pages[] = 'menu';
- }
-
- /**
- * @param array $opts Options:
- * - buid: (string) BUID of message.
- * - mailbox: (string) Mailbox of message.
- */
- public static function url(array $opts = array())
- {
- return IMP_Mailbox::get($opts['mailbox'])->url('minimal', $opts['buid'])->add('page', 'message');
- }
-
-}
diff --git a/imp/lib/Minimal/Messagepart.php b/imp/lib/Minimal/Messagepart.php
deleted file mode 100644
index 785998b2d61..00000000000
--- a/imp/lib/Minimal/Messagepart.php
+++ /dev/null
@@ -1,71 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Minimal_Messagepart extends IMP_Minimal_Base
-{
- /**
- * URL Parameters:
- * - atc
- * - buid
- * - id
- */
- protected function _init()
- {
- global $injector;
-
- /* Parse the message. */
- try {
- $imp_contents = $injector->getInstance('IMP_Factory_Contents')->create($this->indices);
- } catch (IMP_Exception $e) {
- IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->add('a', 'm')->redirect();
- }
-
- if (isset($this->vars->atc)) {
- $summary = $imp_contents->getSummary($this->vars->atc, IMP_Contents::SUMMARY_SIZE | IMP_Contents::SUMMARY_DESCRIP | IMP_Contents::SUMMARY_DOWNLOAD);
-
- $this->title = _("Download Attachment");
-
- $this->view->descrip = $summary['description_raw'];
- $this->view->download = $summary['download_url'];
- $this->view->size = $summary['size'];
- $this->view->type = $summary['type'];
- } else {
- $this->title = _("View Attachment");
-
- $data = $imp_contents->renderMIMEPart($this->vars->id, $imp_contents->canDisplay($this->vars->id, IMP_Contents::RENDER_INLINE));
- $this->view->data = isset($data[$this->vars->id])
- ? $data[$this->vars->id]['data']
- : _("This part is empty.");
- }
-
- $this->view->self_link = IMP_Minimal_Message::url(array(
- 'buid' => $this->vars->buid,
- 'mailbox' => $this->indices->mailbox
- ));
- $this->view->title = $this->title;
-
- $this->_pages[] = 'messagepart';
- }
-
- /**
- * @param array $opts Options:
- * - buid: (integer) BUID of message.
- * - mailbox: (string) Mailbox of message.
- */
- public static function url(array $opts = array())
- {
- return IMP_Mailbox::get($opts['mailbox'])->url('minimal', $opts['buid'])->add('page', 'messagepart');
- }
-
-}
diff --git a/imp/lib/Minimal/Search.php b/imp/lib/Minimal/Search.php
deleted file mode 100644
index fa9e5c47b39..00000000000
--- a/imp/lib/Minimal/Search.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Minimal_Search extends IMP_Minimal_Base
-{
- /**
- * URL Parameters:
- * - a: (string) Action ID.
- * - checkbox: TODO
- * - mt: TODO
- * - p: (integer) Page.
- * - search: (sring) The search string
- * - start: (integer) Start.
- */
- protected function _init()
- {
- $this->title = sprintf(_("Search %s"), $this->indicees->mailbox->display);
-
- $this->view->mailbox = $this->indices->mailbox->form_to;
- $this->view->menu = $this->getMenu('search');
- $this->view->title = $this->title;
- $this->view->url = IMP_Minimal_Mailbox::url();
-
- $this->_pages[] = 'search';
- $this->_pages[] = 'menu';
- }
-
- /**
- * @param array $opts Options:
- * - mailbox: (string) The mailbox to search. Defaults to INBOX.
- */
- public static function url(array $opts = array())
- {
- $opts = array_merge(array('mailbox' => 'INBOX'), $opts);
-
- return IMP_Mailbox::get($opts['mailbox'])->url('minimal')->add('page', 'search');
- }
-
-}
diff --git a/imp/lib/Tree/Simplehtml.php b/imp/lib/Tree/Simplehtml.php
deleted file mode 100644
index 07ec6be584c..00000000000
--- a/imp/lib/Tree/Simplehtml.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- * @category Horde
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-class IMP_Tree_Simplehtml extends Horde_Core_Tree_Renderer_Simplehtml
-{
- /**
- * Should this element be toggled?
- *
- * @param string $id The node ID.
- *
- * @return boolean True of the element should be toggled.
- */
- public function shouldToggle($id)
- {
- return ($this->_tree->nodeId($id) == $GLOBALS['injector']->getInstance('Horde_Variables')->get(Horde_Tree::TOGGLE . $this->_tree->instance));
- }
-
- /**
- * Generate a link URL tag.
- *
- * @param string $node_id The node ID.
- *
- * @return string The link tag.
- */
- protected function _generateUrlTag($node_id)
- {
- return IMP_Minimal_Folders::url()
- ->add(Horde_Tree::TOGGLE . $this->_tree->instance, $node_id)
- ->link();
- }
-
-}
diff --git a/imp/minimal.php b/imp/minimal.php
deleted file mode 100644
index 4c770ca8f63..00000000000
--- a/imp/minimal.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
- * @category Horde
- * @copyright 2012-2014 Horde LLC
- * @license http://www.horde.org/licenses/gpl GPL
- * @package IMP
- */
-
-require_once __DIR__ . '/lib/Application.php';
-$vars = Horde_Variables::getDefaultVariables();
-Horde_Registry::appInit('imp', array(
- 'impmode' => Horde_Registry::VIEW_MINIMAL,
- 'timezone' => in_array($vars->page, array('compose', 'mailbox', 'message'))
-));
-
-$class = 'IMP_Minimal_' . Horde_String::ucfirst($vars->page);
-if (!class_exists($class)) {
- throw new IMP_Exception('Page not found: ' . $vars->page);
-}
-
-try {
- $ob = new $class($vars);
- $page_output->header(array(
- 'title' => $ob->title,
- 'view' => $registry::VIEW_MINIMAL
- ));
-} catch (Exception $e) {
- $notification->push($e);
- $page_output->header();
- $ob = new IMP_Minimal_Error($vars);
-}
-
-$notification->notify(array(
- 'listeners' => array('status')
-));
-
-$ob->render();
-$page_output->footer();
diff --git a/imp/package.xml b/imp/package.xml
index 31c1473cb93..888a07e7061 100644
--- a/imp/package.xml
+++ b/imp/package.xml
@@ -22,7 +22,7 @@
chuck@horde.org
no
- 2014-10-03
+ 2014-10-08
6.3.0
6.2.0
@@ -33,6 +33,7 @@
GPL-2.0
+* [mms] Removed minimal view.
* [mms] Allow auto-completed e-mail groups to be expanded on the dynamic compose page.
* [mms] Add class of message part rendering display errors that aren't show to the user by default.
* [mms] Throttle message list keypresses in dynamic view to prevent avalanche of preview requests sent to server (Request #13574).
@@ -434,16 +435,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -561,7 +552,6 @@
-
@@ -960,17 +950,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -1202,9 +1181,6 @@
-
-
-
@@ -1218,7 +1194,6 @@
-
@@ -1832,14 +1807,6 @@
-
-
-
-
-
-
-
-
@@ -1920,7 +1887,6 @@
-
@@ -2085,15 +2051,6 @@
-
-
-
-
-
-
-
-
-
@@ -2276,14 +2233,12 @@
-
-
diff --git a/imp/templates/minimal/compose.html.php b/imp/templates/minimal/compose.html.php
deleted file mode 100644
index 36ef8d75316..00000000000
--- a/imp/templates/minimal/compose.html.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
diff --git a/imp/templates/minimal/folders.html.php b/imp/templates/minimal/folders.html.php
deleted file mode 100644
index 6d317c70650..00000000000
--- a/imp/templates/minimal/folders.html.php
+++ /dev/null
@@ -1 +0,0 @@
-tree ?>
diff --git a/imp/templates/minimal/header.html.php b/imp/templates/minimal/header.html.php
deleted file mode 100644
index 50dedab0655..00000000000
--- a/imp/templates/minimal/header.html.php
+++ /dev/null
@@ -1,3 +0,0 @@
-h($this->title) ?>
-
-
diff --git a/imp/templates/minimal/mailbox.html.php b/imp/templates/minimal/mailbox.html.php
deleted file mode 100644
index 96caf36d98f..00000000000
--- a/imp/templates/minimal/mailbox.html.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
diff --git a/imp/templates/minimal/menu.html.php b/imp/templates/minimal/menu.html.php
deleted file mode 100644
index 55994abcb05..00000000000
--- a/imp/templates/minimal/menu.html.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
diff --git a/imp/templates/minimal/message.html.php b/imp/templates/minimal/message.html.php
deleted file mode 100644
index c841a311516..00000000000
--- a/imp/templates/minimal/message.html.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
-hdrs as $val): ?>
-
-
:
- h($val['val']) ?>
-
- [
]
-
-
-
-
-atc as $val): ?>
-
-
:
-
- ()
-
-
- [
]
-
-
- [
]
-
-
-
-
-
-
-
-
-
-
- msg ?>
-
-
-fullmsg_link)): ?>
-
-
-
-
diff --git a/imp/templates/minimal/messagepart.html.php b/imp/templates/minimal/messagepart.html.php
deleted file mode 100644
index 8b6e4237909..00000000000
--- a/imp/templates/minimal/messagepart.html.php
+++ /dev/null
@@ -1,16 +0,0 @@
-data)): ?>
-data ?>
-
-
-
- descrip ?>
- [type ?>]
- size ?>
-
-
-
-
-
-
-
-
diff --git a/imp/templates/minimal/redirect.html.php b/imp/templates/minimal/redirect.html.php
deleted file mode 100644
index 33155dfe348..00000000000
--- a/imp/templates/minimal/redirect.html.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
diff --git a/imp/templates/minimal/search.html.php b/imp/templates/minimal/search.html.php
deleted file mode 100644
index bdf75c3afe3..00000000000
--- a/imp/templates/minimal/search.html.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/imp/themes/default/minimal/screen.css b/imp/themes/default/minimal/screen.css
deleted file mode 100644
index f901db3bad4..00000000000
--- a/imp/themes/default/minimal/screen.css
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Minimal view (mimp) core CSS.
- */
-
-body {
- font-family: sans-serif;
- font-size: 90%;
-}
-
-.fixed, .mimePartData {
- font-family: monospace;
-}
-
-.mimeStatusMessage {
- padding-bottom: 10px;
-}
-
-.mimeStatusMessageTable {
- border-collapse: collapse;
-}
-
-.notices img {
- display: none;
-}
-.notices {
- border: 1px solid black;
-}
-
-ul.mimpMenu li {
- padding-bottom: 4px;
-}