X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Fwallabag%2Fwallabag.php;h=f2003cb9953be148dde47e822de31f7af7c8dc7a;hb=302662797cb5e8ac6579a99297ceae301f7927a6;hp=d0df3501d6389b40ce2e1c340675f4debada71ea;hpb=81c9df1363116b0f70161ccf55af4d6aab8c7f6b;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/wallabag/wallabag.php b/plugins/wallabag/wallabag.php index d0df3501..f2003cb9 100644 --- a/plugins/wallabag/wallabag.php +++ b/plugins/wallabag/wallabag.php @@ -1,4 +1,5 @@ get('plugins.WALLABAG_URL'); if (empty($wallabagUrl)) { - $error = t('Wallabag plugin error: '. + $error = t('Wallabag plugin error: ' . 'Please define the "WALLABAG_URL" setting in the plugin administration page.'); - return array($error); + return [$error]; } + $conf->setEmpty('plugins.WALLABAG_URL', '2'); } /** @@ -35,7 +37,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 +53,7 @@ function hook_wallabag_render_linklist($data, $conf) $wallabag = sprintf( $wallabagHtml, $wallabagInstance->getWallabagUrl(), - urlencode($value['url']), + urlencode(unescape($value['url'])), $path, $linkTitle );