aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/qrcode/qrcode.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/qrcode/qrcode.php')
-rw-r--r--plugins/qrcode/qrcode.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php
index 0f96a106..34eef8be 100644
--- a/plugins/qrcode/qrcode.php
+++ b/plugins/qrcode/qrcode.php
@@ -5,6 +5,9 @@
5 * Display a QRCode icon in link list. 5 * Display a QRCode icon in link list.
6 */ 6 */
7 7
8use Shaarli\Plugin\PluginManager;
9use Shaarli\Router;
10
8/** 11/**
9 * Add qrcode icon to link_plugin when rendering linklist. 12 * Add qrcode icon to link_plugin when rendering linklist.
10 * 13 *
@@ -17,7 +20,8 @@ function hook_qrcode_render_linklist($data)
17 $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html'); 20 $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html');
18 21
19 foreach ($data['links'] as &$value) { 22 foreach ($data['links'] as &$value) {
20 $qrcode = sprintf($qrcode_html, 23 $qrcode = sprintf(
24 $qrcode_html,
21 urlencode($value['url']), 25 urlencode($value['url']),
22 $value['url'], 26 $value['url'],
23 PluginManager::$PLUGINS_PATH 27 PluginManager::$PLUGINS_PATH