aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-11-03 11:46:54 +0100
committerGitHub <noreply@github.com>2020-11-03 11:46:54 +0100
commit38b55fbf3d4fdb515d0e82e5a3126d4671652b3e (patch)
treeedb65474ec46a3aeb9897b4f42fc5e205718c774 /plugins
parentb7ec15790e88959d8026df8a5e68e523d03522c7 (diff)
parent358cb20bcba3cb7b0ce2a3000fb7026465a10386 (diff)
downloadShaarli-38b55fbf3d4fdb515d0e82e5a3126d4671652b3e.tar.gz
Shaarli-38b55fbf3d4fdb515d0e82e5a3126d4671652b3e.tar.zst
Shaarli-38b55fbf3d4fdb515d0e82e5a3126d4671652b3e.zip
Merge pull request #1610 from ArthurHoaro/fix/wallabag
Plugin wallabag: minor improvements
Diffstat (limited to 'plugins')
-rw-r--r--plugins/wallabag/wallabag.php5
1 files changed, 3 insertions, 2 deletions
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)
22 'Please define the "WALLABAG_URL" setting in the plugin administration page.'); 22 'Please define the "WALLABAG_URL" setting in the plugin administration page.');
23 return array($error); 23 return array($error);
24 } 24 }
25 $conf->setEmpty('plugins.WALLABAG_URL', '2');
25} 26}
26 27
27/** 28/**
@@ -35,7 +36,7 @@ function wallabag_init($conf)
35function hook_wallabag_render_linklist($data, $conf) 36function hook_wallabag_render_linklist($data, $conf)
36{ 37{
37 $wallabagUrl = $conf->get('plugins.WALLABAG_URL'); 38 $wallabagUrl = $conf->get('plugins.WALLABAG_URL');
38 if (empty($wallabagUrl)) { 39 if (empty($wallabagUrl) || !$data['_LOGGEDIN_']) {
39 return $data; 40 return $data;
40 } 41 }
41 42
@@ -51,7 +52,7 @@ function hook_wallabag_render_linklist($data, $conf)
51 $wallabag = sprintf( 52 $wallabag = sprintf(
52 $wallabagHtml, 53 $wallabagHtml,
53 $wallabagInstance->getWallabagUrl(), 54 $wallabagInstance->getWallabagUrl(),
54 urlencode($value['url']), 55 urlencode(unescape($value['url'])),
55 $path, 56 $path,
56 $linkTitle 57 $linkTitle
57 ); 58 );