aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/bookmarks.php8
-rw-r--r--mod/bookmarks.php6
-rw-r--r--version.inc2
3 files changed, 9 insertions, 7 deletions
diff --git a/include/bookmarks.php b/include/bookmarks.php
index 3a4c5c5d6..7a9f40697 100644
--- a/include/bookmarks.php
+++ b/include/bookmarks.php
@@ -7,10 +7,6 @@ function bookmark_add($channel,$sender,$taxonomy,$private) {
$iarr = array();
$channel_id = $channel['channel_id'];
-
-
-
-
if($private)
$iarr['contact_allow'] = array($channel['channel_hash']);
$iarr['mitem_link'] = $taxonomy['url'];
@@ -45,12 +41,14 @@ function bookmark_add($channel,$sender,$taxonomy,$private) {
logger('bookmark_add: unable to create menu ' . $arr['menu_name']);
return;
}
-
+ logger('add_bookmark: menu_id ' . $menu_id);
$r = q("select * from menu_item where mitem_link = '%s' and mitem_menu_id = %d and mitem_channel_id = %d limit 1",
dbesc($iarr['mitem_link']),
intval($menu_id),
intval($channel_id)
);
+ if($r)
+ logger('duplicate menu entry');
if(! $r)
$r = menu_add_item($menu_id,$channel_id,$iarr);
return $r;
diff --git a/mod/bookmarks.php b/mod/bookmarks.php
index fe5ec1e19..73958ff2f 100644
--- a/mod/bookmarks.php
+++ b/mod/bookmarks.php
@@ -26,9 +26,13 @@ function bookmarks_init(&$a) {
require_once('include/bookmarks.php');
require_once('include/Contact.php');
$s = channelx_by_hash($i[0]['author_xchan']);
+ if(! $s) {
+ notice( t('Author lookup failed') . EOL);
+ killme();
+ }
foreach($terms as $t) {
bookmark_add($u,$s[0],$t,$i[0]['item_private']);
- notice( t('Bookmark(s) added') . EOL);
+ notice( t('Bookmark added') . EOL);
}
}
killme();
diff --git a/version.inc b/version.inc
index 6140d2174..c26fe7d69 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-02-04.578
+2014-02-05.579