aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-04 19:58:03 -0700
committerFriendika <info@friendika.com>2011-09-04 19:58:03 -0700
commit82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30 (patch)
tree54400fab49c5f64b917db32c60cc201f2ac6e626 /include/items.php
parent481853d2cc44a4bf6c540e72c741ff453305a925 (diff)
downloadvolse-hubzilla-82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30.tar.gz
volse-hubzilla-82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30.tar.bz2
volse-hubzilla-82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30.zip
bookmarks + bug #140
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 6ded6f87c..facd8b2d4 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.
@@ -733,6 +737,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'])) : '');
@@ -1706,6 +1711,8 @@ function atom_entry($item,$type,$author,$owner,$comment = false) {
if($item['extid'])
$o .= '<dfrn:extid>' . xmlify($item['extid']) . '</dfrn:extid>' . "\r\n";
+ if($item['bookmark'])
+ $o .= '<dfrn:bookmark>true</dfrn:bookmark>' . "\r\n";
if($item['app'])
$o .= '<statusnet:notice_info local_id="' . $item['id'] . '" source="' . xmlify($item['app']) . '" ></statusnet:notice_info>' . "\r\n";