Skip to content

Commit

Permalink
Remove minimal specific preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 13, 2014
1 parent 2d91444 commit 4eefc4a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 40 deletions.
26 changes: 2 additions & 24 deletions imp/config/prefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@
'image_replacement', 'image_replacement_manage', 'highlight_text',
'highlight_simple_markup', 'show_quoteblocks', 'dim_signature',
'emoticons', 'parts_display', 'mail_hdr', 'default_msg_charset',
'send_mdn', 'mimp_download_confirm', 'mimp_inline_all'
'send_mdn'
)
);

Expand Down Expand Up @@ -1128,21 +1128,6 @@
}
);

$_prefs['mimp_download_confirm'] = array(
'value' => 0,
'advanced' => true,
'type' => 'number',
'zero' => true,
'desc' => _("Only show download confirmation page if message part is greater than this size, in bytes. Set to 0 to always require the confirmation page.") . ' (<em>' . _("Minimal view only") . '</em>)'
);

$_prefs['mimp_inline_all'] = array(
'value' => 0,
'advanced' => true,
'type' => 'checkbox',
'desc' => _("Show all inline parts by default in message view? If unchecked, will treat all but the first viewable inline part as attachments.") . ' (<em>' . _("Minimal view only") . '</em>)'
);



// *** Delete/Move Messages Preferences ***
Expand Down Expand Up @@ -1467,7 +1452,7 @@
'initialpageselect', 'mailbox_start', 'sortby', 'sortdir', 'sortdate',
'max_msgs', 'from_link', 'atc_flag', 'preview_enabled',
'preview_maxlen', 'preview_strip_nl', 'preview_show_unread',
'preview_show_tooltip', 'mimp_preview_msg'
'preview_show_tooltip'
)
);

Expand Down Expand Up @@ -1623,13 +1608,6 @@
'requires' => array('preview_enabled')
);

$_prefs['mimp_preview_msg'] = array(
'value' => 0,
'advanced' => true,
'type' => 'checkbox',
'desc' => _("Display only the first 250 characters of a message initially?") . ' (<em>' . _("Minimal view only") . '</em>)'
);



// *** Folder Display Preferences ***
Expand Down
3 changes: 3 additions & 0 deletions imp/docs/UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ The following preferences have been added::
The following preferences have been removed::

mail_domain
mimp_download_confirm
mimp_inline_all
mimp_preview_msg
pgp_scan_body


Expand Down
21 changes: 5 additions & 16 deletions imp/lib/Minimal/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class IMP_Minimal_Message extends IMP_Minimal_Base
* a: (string) Action ID.
* allto: (boolean) View all To addresses?
* buid: (string) Browser UID.
* fullmsg: (boolean) View full message?
* t: (string) Token.
*/
protected function _init()
Expand Down Expand Up @@ -205,19 +204,11 @@ protected function _init()
/* Create the body of the message. */
$inlineout = $imp_contents->getInlineOutput(array(
'display_mask' => IMP_Contents::RENDER_INLINE,
'no_inline_all' => !$prefs->getValue('mimp_inline_all')
'no_inline_all' => true
));

$msg_text = $inlineout['msgtext'];

/* Display the first 250 characters, or display the entire message? */
if ($prefs->getValue('mimp_preview_msg') &&
!isset($this->vars->fullmsg) &&
(strlen($msg_text) > 250)) {
$msg_text = Horde_String::substr(trim($msg_text), 0, 250) . " [...]\n";
$this->view->fullmsg_link = $self_link->copy()->add('fullmsg', 1);
}

$this->view->msg = nl2br($injector->getInstance('Horde_Core_Factory_TextFilter')->filter($msg_text, 'space2html'));

$compose_params = array(
Expand Down Expand Up @@ -313,12 +304,10 @@ protected function _init()
if (!empty($summary['download'])) {
/* Preference: if set, only show download confirmation screen
* if attachment over a certain size. */
$tmp['download'] = ($summary['bytes'] > $prefs->getValue('mimp_download_confirm'))
? IMP_Minimal_Messagepart::url(array(
'buid' => $buid,
'mailbox' => $this->indices->mailbox
))->add('atc', $key)
: $summary['download_url'];
$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)) {
Expand Down

0 comments on commit 4eefc4a

Please sign in to comment.