From 46cbc4b461fde2612d6cb585f13d0de721eaddfb Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 23 Mar 2012 16:53:44 +0100 Subject: [PATCH 1/4] use unnamed as title for a bookmark if no title was entered and curl fails --- bookmarksHelper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bookmarksHelper.php b/bookmarksHelper.php index 8def7401..7ada6901 100644 --- a/bookmarksHelper.php +++ b/bookmarksHelper.php @@ -71,7 +71,7 @@ function getURLMetadata($url) { return $metadata; } -function addBookmark($url, $title='', $tags='') { +function addBookmark($url, $title, $tags='') { $CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" ); if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ $_ut = "strftime('%s','now')"; @@ -93,6 +93,11 @@ function addBookmark($url, $title='', $tags='') { $title = $metadata['title']; } + if(empty($title)) { + $l = new OC_L10N('bookmarks'); + $title = $l->t('unnamed'); + } + $params=array( htmlspecialchars_decode($url), htmlspecialchars_decode($title), From 80162a5b930f33882d5654c5b11b0d6810dfec0e Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 23 Mar 2012 16:58:48 +0100 Subject: [PATCH 2/4] Bookmarks: make link text click clickable too - bugfix for oc-131 --- js/bookmarks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/bookmarks.js b/js/bookmarks.js index fa5adde2..3557810d 100644 --- a/js/bookmarks.js +++ b/js/bookmarks.js @@ -145,7 +145,7 @@ function updateBookmarksList(bookmark) { '

'+ '' + encodeEntities(bookmark.title) + '' + '

' + - '

' + encodeEntities(bookmark.url) + '

' + + '

' + encodeEntities(bookmark.url) + '

' + '' ); if(taglist != '') { From 67efac79528a381bb28686ae995e12a8813e4e74 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Sat, 24 Mar 2012 19:53:39 +0100 Subject: [PATCH 3/4] bookmarks tag placement & list width fix --- js/bookmarks.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/bookmarks.js b/js/bookmarks.js index 3557810d..a3a4779d 100644 --- a/js/bookmarks.js +++ b/js/bookmarks.js @@ -9,9 +9,7 @@ $(document).ready(function() { fillWindow($('.bookmarks_list')); }); $(window).resize(); - $($('.bookmarks_list')).scroll(updateOnBottom); - - $('.bookmarks_list').empty(); + $('.bookmarks_list').scroll(updateOnBottom).empty().width($('#content').width()); getBookmarks(); }); From 3972729d260191cee2a73752cf0326457312e822 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Sat, 24 Mar 2012 19:54:54 +0100 Subject: [PATCH 4/4] spaces to tabs in bookmarks --- js/bookmarks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/bookmarks.js b/js/bookmarks.js index a3a4779d..9502af0a 100644 --- a/js/bookmarks.js +++ b/js/bookmarks.js @@ -9,7 +9,7 @@ $(document).ready(function() { fillWindow($('.bookmarks_list')); }); $(window).resize(); - $('.bookmarks_list').scroll(updateOnBottom).empty().width($('#content').width()); + $('.bookmarks_list').scroll(updateOnBottom).empty().width($('#content').width()); getBookmarks(); });