diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-11-12 02:09:32 -0800 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-11-12 02:09:32 -0800 |
commit | 67a101452b82782114143dc0b5bdba15adc0ba99 (patch) | |
tree | 9daee3807b370d02ee4c28e6df7db08731fbb9f1 /include/message.php | |
parent | b23f3fc03b6bc751aab67fe2258a21f7c65bab8e (diff) | |
parent | 7cb4c2f8ad813336aafdec05e40f3a8eb1808d00 (diff) | |
download | volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.gz volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.bz2 volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.zip |
Merge pull request #4 from friendica/master
Fork aligned to red master
Diffstat (limited to 'include/message.php')
-rw-r--r-- | include/message.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/message.php b/include/message.php index e54a6cd83..3bcd5e209 100644 --- a/include/message.php +++ b/include/message.php @@ -8,7 +8,7 @@ require_once('include/attach.php'); // send a private message -function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=''){ +function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='',$expires = ''){ $ret = array('success' => false); @@ -22,6 +22,10 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' if(! strlen($subject)) $subject = t('[no subject]'); +// if(! $expires) +// $expires = '0000-00-00 00:00:00'; +// else +// $expires = datetime_convert(date_default_timezone_get(),'UTC',$expires); if($uid) { $r = q("select * from channel where channel_id = %d limit 1", @@ -111,8 +115,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' - $r = q("INSERT INTO mail ( account_id, mail_flags, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created ) - VALUES ( %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", + $r = q("INSERT INTO mail ( account_id, mail_flags, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires ) + VALUES ( %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", intval($channel['channel_account_id']), intval(MAIL_OBSCURED), intval($channel['channel_id']), @@ -123,7 +127,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' dbesc($jattach), dbesc($mid), dbesc($replyto), - dbesc(datetime_convert()) + dbesc(datetime_convert()), + dbesc($expires) ); // verify the save |