diff --git a/appinfo/info.xml b/appinfo/info.xml index fe0849f2..b4399ff4 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -14,7 +14,7 @@ https://github.com/owncloud/bookmarks/issues https://github.com/owncloud/bookmarks.git - + 168710 diff --git a/controller/lib/search.php b/controller/lib/search.php index aaaf9193..49c64095 100644 --- a/controller/lib/search.php +++ b/controller/lib/search.php @@ -40,7 +40,7 @@ class Search extends \OCP\Search\Provider{ $user = \OCP\User::getUser(); $bookmarks = Bookmarks::findBookmarks($user, $db, 0, 'id', $search_words, false); - $l = new \OC_l10n('bookmarks'); //resulttype can't be localized, javascript relies on that type + $l = \OC::$server->getL10N('bookmarks'); //resulttype can't be localized, javascript relies on that type foreach ($bookmarks as $bookmark) { $results[] = new \OC_Search_Result($bookmark['title'], $bookmark['title'], $bookmark['url'], (string) $l->t('Bookm.')); } diff --git a/templates/main.php b/templates/main.php index 72bc9d78..72261514 100644 --- a/templates/main.php +++ b/templates/main.php @@ -18,7 +18,7 @@ $bookmarkleturl = $_['bookmarkleturl']; $bookmarkletscript = bookmarklet($bookmarkleturl); function bookmarklet($bookmarkleturl) { - $l = new OC_l10n('bookmarks'); + $l = \OC::$server->getL10N('bookmarks'); $blet = "javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('"; $blet .= $bookmarkleturl; $blet .= "?output=popup&url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=400px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();";