X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=1524bfd369e9012e42b131ba36a5f009743c24b4;hb=2a23a7e8405cde73ad95e1c0103fe49df3a883f9;hp=a16b0d8cf6c438c4b9a24fc8437673889ecbcaaa;hpb=b91494d22ec1bcf7724f36c1df90d83178f6e47f;p=friendica.git
diff --git a/mod/message.php b/mod/message.php
index a16b0d8cf6..1524bfd369 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -24,6 +24,9 @@ function message_post(&$a) {
return;
}
+ if(! strlen($subject))
+ $subject = t('[no subject]');
+
$me = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
intval($_SESSION['uid'])
);
@@ -69,7 +72,6 @@ function message_post(&$a) {
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
$proc_debug = get_config('system','proc_debug');
-notice("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" $proc_debug &");
if($post_id) {
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" $proc_debug &",
@@ -84,6 +86,8 @@ notice("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" $proc_debug
}
function message_content(&$a) {
+
+ $o = '';
$o .= '';
if(! local_user()) {
@@ -103,11 +107,11 @@ function message_content(&$a) {
));
- if(($a->argc == 3) && ($a->argv[1] == 'drop' || $a->argv[1] == 'dropconv')) {
+ if(($a->argc == 3) && ($a->argv[1] === 'drop' || $a->argv[1] === 'dropconv')) {
if(! intval($a->argv[2]))
return;
$cmd = $a->argv[1];
- if($cmd == 'drop') {
+ if($cmd === 'drop') {
$r = q("DELETE FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[2]),
intval($_SESSION['uid'])
@@ -135,7 +139,7 @@ function message_content(&$a) {
}
}
- if(($a->argc > 2) && ($a->argv[1] == 'redeliver') && intval($a->argv[2])) {
+ if(($a->argc > 2) && ($a->argv[1] === 'redeliver') && intval($a->argv[2])) {
$post_id = intval($a->argv[2]);
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
$proc_debug = get_config('system','proc_debug');
@@ -148,13 +152,13 @@ function message_content(&$a) {
- if(($a->argc > 1) && ($a->argv[1] == 'new')) {
+ if(($a->argc > 1) && ($a->argv[1] === 'new')) {
$tpl = load_view_file('view/msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
- $select .= contact_select('messageto','message-to-select', false, 4, true);
+ $select = contact_select('messageto','message-to-select', false, 4, true);
$tpl = load_view_file('view/prv_message.tpl');
$o .= replace_macros($tpl,array(
'$header' => t('Send Private Message'),
@@ -174,7 +178,7 @@ function message_content(&$a) {
return $o;
}
- if(($a->argc == 1) || ($a->argc == 2 && $a->argv[1] == 'sent')) {
+ if(($a->argc == 1) || ($a->argc == 2 && $a->argv[1] === 'sent')) {
$o .= $header;
@@ -211,6 +215,7 @@ function message_content(&$a) {
'$id' => $rr['id'],
'$from_name' =>$rr['from-name'],
'$from_url' => $a->get_baseurl() . '/redir/' . $rr['contact-id'],
+ '$sparkle' => ' sparkle',
'$from_photo' => $rr['from-photo'],
'$subject' => (($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . ''),
'$delete' => t('Delete conversation'),
@@ -261,11 +266,19 @@ function message_content(&$a) {
$tpl = load_view_file('view/mail_conv.tpl');
foreach($messages as $message) {
+ if($message['from-url'] == $myprofile) {
+ $from_url = $myprofile;
+ $sparkle = '';
+ }
+ else {
+ $from_url = $a->get_baseurl() . '/redir/' . $message['contact-id'];
+ $sparkle = ' sparkle';
+ }
$o .= replace_macros($tpl, array(
'$id' => $message['id'],
'$from_name' =>$message['from-name'],
- '$from_url' => (($message['from-url'] == $myprofile)
- ? $myprofile : $a->get_baseurl() . '/redir/' . $message['contact-id']),
+ '$from_url' => $from_url,
+ '$sparkle' => $sparkle,
'$from_photo' => $message['from-photo'],
'$subject' => $message['title'],
'$body' => bbcode($message['body']),