]> git.mxchange.org Git - friendica.git/blobdiff - mod/message.php
replace session return url by static pages
[friendica.git] / mod / message.php
index ac93cc73e97e562a2f73537ac78222dc77754abb..e2380fdb5c5c7d5504588fba97b86f937c2d5a80 100644 (file)
@@ -14,6 +14,7 @@ use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\Mail;
 use Friendica\Util\DateTimeFormat;
+use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Temporal;
 
 require_once 'include/conversation.php';
@@ -91,7 +92,7 @@ function message_post(App $a)
                $a->argc = 2;
                $a->argv[1] = 'new';
        } else {
-               goaway($_SESSION['return_url']);
+               goaway($a->cmd . '/' . $ret);
        }
 }
 
@@ -159,7 +160,7 @@ function message_content(App $a)
 
                // Now check how the user responded to the confirmation query
                if (!empty($_REQUEST['canceled'])) {
-                       goaway($_SESSION['return_url']);
+                       goaway('/message');
                }
 
                $cmd = $a->argv[1];
@@ -168,8 +169,7 @@ function message_content(App $a)
                                info(L10n::t('Message deleted.') . EOL);
                        }
 
-                       //goaway(System::baseUrl(true) . '/message' );
-                       goaway($_SESSION['return_url']);
+                       goaway('/message' );
                } else {
                        $r = q("SELECT `parent-uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                                intval($a->argv[2]),
@@ -183,8 +183,7 @@ function message_content(App $a)
                                        info(L10n::t('Conversation removed.') . EOL);
                                }
                        }
-                       //goaway(System::baseUrl(true) . '/message' );
-                       goaway($_SESSION['return_url']);
+                       goaway('/message' );
                }
        }
 
@@ -388,7 +387,7 @@ function message_content(App $a)
                                'from_url' => $from_url,
                                'from_addr' => $contact['addr'],
                                'sparkle' => $sparkle,
-                               'from_photo' => proxy_url($from_photo, false, PROXY_SIZE_THUMB),
+                               'from_photo' => ProxyUtils::proxifyUrl($from_photo, false, ProxyUtils::SIZE_THUMB),
                                'subject' => $subject_e,
                                'body' => $body_e,
                                'delete' => L10n::t('Delete message'),
@@ -487,9 +486,9 @@ function render_messages(array $msg, $t)
                        '$id' => $rr['id'],
                        '$from_name' => $participants,
                        '$from_url' => Contact::magicLink($rr['url']),
-                       '$from_addr' => $contact['addr'],
+                       '$from_addr' => defaults($contact, 'addr', ''),
                        '$sparkle' => ' sparkle',
-                       '$from_photo' => proxy_url($from_photo, false, PROXY_SIZE_THUMB),
+                       '$from_photo' => ProxyUtils::proxifyUrl($from_photo, false, ProxyUtils::SIZE_THUMB),
                        '$subject' => $subject_e,
                        '$delete' => L10n::t('Delete conversation'),
                        '$body' => $body_e,