X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=b433381a74c50faa895b87238765463e1b5a6172;hb=030e1e82c32a3061abf71ffb90e65f2b9197d8a4;hp=6ded6f87c4cf8f0b01e0797e50e9e445d3a8a827;hpb=d49895a8a10442e1a585732e94230ac51e92396d;p=friendica.git
diff --git a/include/items.php b/include/items.php
index 6ded6f87c4..b433381a74 100644
--- a/include/items.php
+++ b/include/items.php
@@ -378,6 +378,10 @@ function get_atom_elements($feed,$item) {
if($dguid)
$res['guid'] = unxmlify($dguid[0]['data']);
+ $bm = $item->get_item_tags(NAMESPACE_DFRN,'bookmark');
+ if($bm)
+ $res['bookmark'] = ((unxmlify($bm[0]['data']) === 'true') ? 1 : 0);
+
/**
* If there's a copy of the body content which is guaranteed to have survived mangling in transit, use it.
@@ -713,6 +717,7 @@ function item_store($arr,$force_parent = false) {
$arr['owner-avatar'] = ((x($arr,'owner-avatar')) ? notags(trim($arr['owner-avatar'])) : '');
$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['commented'] = datetime_convert();
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();
$arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : '');
@@ -733,6 +738,7 @@ function item_store($arr,$force_parent = false) {
$arr['deny_cid'] = ((x($arr,'deny_cid')) ? trim($arr['deny_cid']) : '');
$arr['deny_gid'] = ((x($arr,'deny_gid')) ? trim($arr['deny_gid']) : '');
$arr['private'] = ((x($arr,'private')) ? intval($arr['private']) : 0 );
+ $arr['bookmark'] = ((x($arr,'bookmark')) ? intval($arr['bookmark']) : 0 );
$arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : '');
$arr['tag'] = ((x($arr,'tag')) ? notags(trim($arr['tag'])) : '');
$arr['attach'] = ((x($arr,'attach')) ? notags(trim($arr['attach'])) : '');
@@ -860,6 +866,14 @@ function item_store($arr,$force_parent = false) {
intval($current_post)
);
+ // update the commented timestamp on the parent
+
+ q("UPDATE `item` set `commented` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ intval($parent_id)
+ );
+
if($dsprsig) {
q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
intval($current_post),
@@ -1706,6 +1720,8 @@ function atom_entry($item,$type,$author,$owner,$comment = false) {
if($item['extid'])
$o .= '' . xmlify($item['extid']) . '' . "\r\n";
+ if($item['bookmark'])
+ $o .= 'true' . "\r\n";
if($item['app'])
$o .= '' . "\r\n";