Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions localization/en_US.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$labels = array();

$labels['internal'] = "Mail was internal";
$labels['unencrypted'] = "Message received over an unencrypted connection!";
6 changes: 6 additions & 0 deletions localization/ru_RU.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$labels = array();

$labels['internal'] = "Письмо было внутренним";
$labels['unencrypted'] = "Сообщение получено по незашифрованному соединению!";
8 changes: 5 additions & 3 deletions tls_icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function init()
$this->add_hook('storage_init', array($this, 'storage_init'));

$this->include_stylesheet('tls_icon.css');

$this->add_texts('localization/');
}

public function storage_init($p)
Expand All @@ -23,7 +25,7 @@ public function storage_init($p)
}

public function message_headers($p)
{
{
if($this->message_headers_done===false)
{
$this->message_headers_done = true;
Expand Down Expand Up @@ -53,11 +55,11 @@ public function message_headers($p)

$this->icon_img .= '<img class="lock_icon" src="plugins/tls_icon/lock.svg" title="'. htmlentities($data) .'" />';
} else if(preg_match_all('/\([a-zA-Z]*, from userid [0-9]*\)/im', $Received, $items, PREG_PATTERN_ORDER)){
$this->icon_img .= '<img class="lock_icon" src="plugins/tls_icon/blue_lock.svg" title="Mail was internal" />';
$this->icon_img .= '<img class="lock_icon" src="plugins/tls_icon/blue_lock.svg" title="' . $this->gettext('internal') . '" />';
}
else {
// TODO: Mails received from localhost but without TLS are currently flagged insecure
$this->icon_img .= '<img class="lock_icon" src="plugins/tls_icon/unlock.svg" title="Message received over an unencrypted connection!" />';
$this->icon_img .= '<img class="lock_icon" src="plugins/tls_icon/unlock.svg" title="' . $this->gettext('unencrypted') . '" />';
}
}

Expand Down