Skip to content

Commit

Permalink
Don't block images in HTML data when viewing in thread mode
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Oct 9, 2013
1 parent bab3224 commit a635b37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions imp/lib/Basic/Thread.php
Expand Up @@ -71,6 +71,9 @@ protected function _init()
$query = new Horde_Imap_Client_Fetch_Query();
$query->envelope();

/* Force images to show in HTML data. */
$injector->getInstance('IMP_Images')->alwaysShow = true;

foreach ($imp_indices as $ob) {
$fetch_res = $imp_imap->fetch($ob->mbox, $query, array(
'ids' => $imp_imap->getIdsOb($ob->uids)
Expand Down
9 changes: 8 additions & 1 deletion imp/lib/Images.php
Expand Up @@ -22,6 +22,13 @@
*/
class IMP_Images
{
/**
* Always show inline images?
*
* @var boolean
*/
public $alwaysShow = false;

/**
* Show inline images in messages?
*
Expand All @@ -34,7 +41,7 @@ public function showInlineImage(IMP_Contents $contents)
{
global $injector, $prefs, $registry;

if (!$prefs->getValue('image_replacement')) {
if ($this->alwaysShow || !$prefs->getValue('image_replacement')) {
return true;
}

Expand Down

0 comments on commit a635b37

Please sign in to comment.