aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-01 00:59:35 -0700
committerfriendica <info@friendica.com>2012-04-01 00:59:35 -0700
commit5c2fdc795fc5273176a7f81d989ad06e16945f1c (patch)
tree88f277d576d6b6af459eab8759792e59bc6f7281 /mod/message.php
parentea10bba14711d26dfbefcd83659bb60ae6587e26 (diff)
downloadvolse-hubzilla-5c2fdc795fc5273176a7f81d989ad06e16945f1c.tar.gz
volse-hubzilla-5c2fdc795fc5273176a7f81d989ad06e16945f1c.tar.bz2
volse-hubzilla-5c2fdc795fc5273176a7f81d989ad06e16945f1c.zip
send unverified private mail using zrl
Diffstat (limited to 'mod/message.php')
-rwxr-xr-xmod/message.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/mod/message.php b/mod/message.php
index c347468d1..1369fde2e 100755
--- a/mod/message.php
+++ b/mod/message.php
@@ -223,9 +223,13 @@ function message_content(&$a) {
$tpl = get_markup_template('mail_list.tpl');
foreach($r as $rr) {
- if (link_compare($rr['from-url'],$myprofile)){
+ if($rr['unknown']) {
+ $partecipants = sprintf( t("Unknown sender - %s"),$rr['from-name']);
+ }
+ elseif (link_compare($rr['from-url'],$myprofile)){
$partecipants = sprintf( t("You and %s"), $rr['name']);
- } else {
+ }
+ else {
$partecipants = sprintf( t("%s and You"), $rr['from-name']);
}
@@ -234,7 +238,7 @@ function message_content(&$a) {
'$from_name' => $partecipants,
'$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl(true) . '/redir/' . $rr['contact-id'] : $rr['url']),
'$sparkle' => ' sparkle',
- '$from_photo' => $rr['thumb'],
+ '$from_photo' => (($rr['thumb']) ? $rr['thumb'] : $rr['from-photo']),
'$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>')),
'$delete' => t('Delete conversation'),
'$body' => template_escape($rr['body']),
@@ -297,7 +301,11 @@ function message_content(&$a) {
$mails = array();
$seen = 0;
+ $unknown = false;
+
foreach($messages as $message) {
+ if($message['unknown'])
+ $unknown = true;
if($message['from-url'] == $myprofile) {
$from_url = $myprofile;
$sparkle = '';
@@ -323,7 +331,7 @@ function message_content(&$a) {
}
$select = $message['name'] . '<input type="hidden" name="messageto" value="' . $contact_id . '" />';
$parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
-
+
$tpl = get_markup_template('mail_display.tpl');
$o = replace_macros($tpl, array(
@@ -331,7 +339,8 @@ function message_content(&$a) {
'$thread_subject' => $message['title'],
'$thread_seen' => $seen,
'$delete' => t('Delete conversation'),
-
+ '$canreply' => (($unknown) ? false : '1'),
+ '$unknown_text' => t("No secure communications available. You <strong>may</strong> be able to respond from the sender's profile page."),
'$mails' => $mails,
// reply