From 358cb20bcba3cb7b0ce2a3000fb7026465a10386 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 24 Oct 2020 16:25:06 +0200 Subject: Plugin wallabag: minor improvements - hide the wallabag icon for logged out users - set API V2 as default parameter - fix URL encoding issue with special chars Fixes #1147 --- plugins/wallabag/wallabag.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/wallabag') diff --git a/plugins/wallabag/wallabag.php b/plugins/wallabag/wallabag.php index d0df3501..8cd3f4ad 100644 --- a/plugins/wallabag/wallabag.php +++ b/plugins/wallabag/wallabag.php @@ -22,6 +22,7 @@ function wallabag_init($conf) 'Please define the "WALLABAG_URL" setting in the plugin administration page.'); return array($error); } + $conf->setEmpty('plugins.WALLABAG_URL', '2'); } /** @@ -35,7 +36,7 @@ function wallabag_init($conf) function hook_wallabag_render_linklist($data, $conf) { $wallabagUrl = $conf->get('plugins.WALLABAG_URL'); - if (empty($wallabagUrl)) { + if (empty($wallabagUrl) || !$data['_LOGGEDIN_']) { return $data; } @@ -51,7 +52,7 @@ function hook_wallabag_render_linklist($data, $conf) $wallabag = sprintf( $wallabagHtml, $wallabagInstance->getWallabagUrl(), - urlencode($value['url']), + urlencode(unescape($value['url'])), $path, $linkTitle ); -- cgit v1.2.3