mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-02-26 23:54:25 +01:00
Move away from legacy OC_L10N
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
7910aef7c3
commit
c4be518bd1
@ -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.'));
|
||||
}
|
||||
|
@ -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);})();";
|
||||
|
Loading…
x
Reference in New Issue
Block a user