aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-30 00:41:08 -0800
committerfriendica <info@friendica.com>2012-12-30 00:41:08 -0800
commit2f1bc925de4b921acb9b96dbbc50ee3c8548cfd8 (patch)
tree6268bd39fdd7c53cdb74b92fc38606319518cf29 /include/items.php
parentcb329b9fb4b2bc2553219d75f05bf5237974c4dd (diff)
downloadvolse-hubzilla-2f1bc925de4b921acb9b96dbbc50ee3c8548cfd8.tar.gz
volse-hubzilla-2f1bc925de4b921acb9b96dbbc50ee3c8548cfd8.tar.bz2
volse-hubzilla-2f1bc925de4b921acb9b96dbbc50ee3c8548cfd8.zip
add item['expires'] to protocol communications
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 4e656d059..3cfdd59da 100755
--- a/include/items.php
+++ b/include/items.php
@@ -465,6 +465,9 @@ function get_item_elements($x) {
$arr['created'] = datetime_convert('UTC','UTC',$x['created']);
$arr['edited'] = datetime_convert('UTC','UTC',$x['edited']);
+ $arr['expires'] = ((x($x,'expires') && $x['expires'])
+ ? datetime_convert('UTC','UTC',$x['expires'])
+ : '0000-00-00 00:00:00');
if($arr['created'] > datetime_convert())
$arr['created'] = datetime_convert();
@@ -546,6 +549,7 @@ function encode_item($item) {
$x['message_parent'] = $item['thr_parent'];
$x['created'] = $item['created'];
$x['edited'] = $item['edited'];
+ $x['expires'] = $item['expires'];
$x['title'] = $item['title'];
$x['body'] = $item['body'];
$x['app'] = $item['app'];
@@ -1233,6 +1237,7 @@ function item_store($arr,$force_parent = false) {
$arr['owner_xchan'] = ((x($arr,'owner_xchan')) ? notags(trim($arr['owner_xchan'])) : '');
$arr['created'] = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert());
$arr['edited'] = ((x($arr,'edited') !== false) ? datetime_convert('UTC','UTC',$arr['edited']) : datetime_convert());
+ $arr['expires'] = ((x($arr,'expires') !== false) ? datetime_convert('UTC','UTC',$arr['expires']) : '0000-00-00 00:00:00');
$arr['commented'] = datetime_convert();
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();