X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fmessage.php;h=a16b0d8cf6c438c4b9a24fc8437673889ecbcaaa;hb=b91494d22ec1bcf7724f36c1df90d83178f6e47f;hp=549ce434d5bb3e3f1c22fc6a9ec2070247ca0521;hpb=04e65823d70d448400d3be7f0b3244ea8658834d;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 549ce434d5..a16b0d8cf6 100644 --- a/mod/message.php +++ b/mod/message.php @@ -67,10 +67,12 @@ function message_post(&$a) { if(count($r)) $post_id = $r[0]['id']; - $url = $a->get_baseurl(); - + $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 include/notifier.php \"$url\" \"mail\" \"$post_id\" > mail.log &", + proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" $proc_debug &", array(),$foo)); notice( t('Message sent.') . EOL ); } @@ -82,6 +84,7 @@ function message_post(&$a) { } function message_content(&$a) { + $o .= ''; if(! local_user()) { notice( t('Permission denied.') . EOL); @@ -91,7 +94,7 @@ function message_content(&$a) { $myprofile = $a->get_baseurl() . '/profile/' . $a->user['nickname']; - $tpl = file_get_contents('view/mail_head.tpl'); + $tpl = load_view_file('view/mail_head.tpl'); $header = replace_macros($tpl, array( '$messages' => t('Messages'), '$inbox' => t('Inbox'), @@ -133,9 +136,12 @@ function message_content(&$a) { } if(($a->argc > 2) && ($a->argv[1] == 'redeliver') && intval($a->argv[2])) { - $url = $a->get_baseurl(); $post_id = intval($a->argv[2]); - proc_close(proc_open("php include/notifier.php \"$url\" \"mail\" \"$post_id\" > mail.log &", + $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); + $proc_debug = get_config('system','proc_debug'); + + + proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" $proc_debug & ", array(),$foo)); goaway($a->get_baseurl() . '/message' ); } @@ -144,12 +150,12 @@ function message_content(&$a) { if(($a->argc > 1) && ($a->argv[1] == 'new')) { - $tpl = file_get_contents('view/msg-header.tpl'); + $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); - $tpl = file_get_contents('view/prv_message.tpl'); + $tpl = load_view_file('view/prv_message.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Private Message'), '$to' => t('To:'), @@ -199,7 +205,7 @@ function message_content(&$a) { return $o; } - $tpl = file_get_contents('view/mail_list.tpl'); + $tpl = load_view_file('view/mail_list.tpl'); foreach($r as $rr) { $o .= replace_macros($tpl, array( '$id' => $rr['id'], @@ -248,12 +254,12 @@ function message_content(&$a) { require_once("include/bbcode.php"); - $tpl = file_get_contents('view/msg-header.tpl'); + $tpl = load_view_file('view/msg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); - $tpl = file_get_contents('view/mail_conv.tpl'); + $tpl = load_view_file('view/mail_conv.tpl'); foreach($messages as $message) { $o .= replace_macros($tpl, array( '$id' => $message['id'], @@ -271,7 +277,7 @@ function message_content(&$a) { } $select = $message['name'] . ''; $parent = ''; - $tpl = file_get_contents('view/prv_message.tpl'); + $tpl = load_view_file('view/prv_message.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Reply'), '$to' => t('To:'),