aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bookmarks.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/bookmarks.php b/include/bookmarks.php
index 895dedaff..21a775f9a 100644
--- a/include/bookmarks.php
+++ b/include/bookmarks.php
@@ -37,9 +37,13 @@ function bookmark_add($channel,$sender,$taxonomy,$private,$opts = null) {
$iarr['mitem_flags'] |= MENU_ITEM_ZID;
$arr = array();
- if(! $menu_name)
+ if(! $menu_name) {
$arr['menu_name'] = substr($sender['xchan_hash'],0,16) . ' ' . $sender['xchan_name'];
- $arr['menu_desc'] = sprintf( t('%1$s\'s bookmarks'), $sender['xchan_name']);
+ $arr['menu_desc'] = sprintf( t('%1$s\'s bookmarks'), $sender['xchan_name']);
+ }
+ else {
+ $arr['menu_name'] = $arr['menu_desc'] = $menu_name;
+ }
$arr['menu_flags'] = (($sender['xchan_hash'] === $channel['channel_hash']) ? MENU_BOOKMARK : MENU_SYSTEM|MENU_BOOKMARK);
$arr['menu_channel_id'] = $channel_id;
@@ -68,3 +72,14 @@ function bookmark_add($channel,$sender,$taxonomy,$private,$opts = null) {
return $r;
}
+
+function get_bookmark_link($observer) {
+
+ if((! $observer) || ($observer['xchan_network'] !== 'zot'))
+ return '';
+
+ $h = @parse_url($observer['xchan_url']);
+ if($h)
+ return $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : '') . '/rbmark?f=';
+ return '';
+}