1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2024-12-10 12:24:09 +01:00

Merge pull request #3 from Kawohl/fixcompat

fixed compatibility
This commit is contained in:
Thomas Müller 2017-08-07 12:09:05 +02:00 committed by GitHub
commit 8bb4d0bf13
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@
<bugs>https://github.com/owncloud/bookmarks/issues</bugs> <bugs>https://github.com/owncloud/bookmarks/issues</bugs>
<repository type="git">https://github.com/owncloud/bookmarks.git</repository> <repository type="git">https://github.com/owncloud/bookmarks.git</repository>
<dependencies> <dependencies>
<owncloud min-version="9.0" max-version="9.2" /> <owncloud min-version="9.0" max-version="10.0" />
</dependencies> </dependencies>
<ocsid>168710</ocsid> <ocsid>168710</ocsid>
</info> </info>

View File

@ -40,7 +40,7 @@ class Search extends \OCP\Search\Provider{
$user = \OCP\User::getUser(); $user = \OCP\User::getUser();
$bookmarks = Bookmarks::findBookmarks($user, $db, 0, 'id', $search_words, false); $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) { foreach ($bookmarks as $bookmark) {
$results[] = new \OC_Search_Result($bookmark['title'], $bookmark['title'], $bookmark['url'], (string) $l->t('Bookm.')); $results[] = new \OC_Search_Result($bookmark['title'], $bookmark['title'], $bookmark['url'], (string) $l->t('Bookm.'));
} }

View File

@ -18,7 +18,7 @@ $bookmarkleturl = $_['bookmarkleturl'];
$bookmarkletscript = bookmarklet($bookmarkleturl); $bookmarkletscript = bookmarklet($bookmarkleturl);
function 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 = "javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('";
$blet .= $bookmarkleturl; $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);})();"; $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);})();";