aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/qrcode/qrcode.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-07-26 14:43:10 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-26 14:43:10 +0200
commit9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9 (patch)
tree9bfc3c9b185eb0c185d23146d44d42dd6685a4da /plugins/qrcode/qrcode.php
parentbc583903adfd768f115fae438e4d9ed1043682d9 (diff)
downloadShaarli-9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9.tar.gz
Shaarli-9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9.tar.zst
Shaarli-9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9.zip
New basePath: fix officiel plugin paths and vintage template
Diffstat (limited to 'plugins/qrcode/qrcode.php')
-rw-r--r--plugins/qrcode/qrcode.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php
index 2ec0cb65..3b5dae34 100644
--- a/plugins/qrcode/qrcode.php
+++ b/plugins/qrcode/qrcode.php
@@ -19,11 +19,12 @@ function hook_qrcode_render_linklist($data)
19{ 19{
20 $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html'); 20 $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html');
21 21
22 $path = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH;
22 foreach ($data['links'] as &$value) { 23 foreach ($data['links'] as &$value) {
23 $qrcode = sprintf( 24 $qrcode = sprintf(
24 $qrcode_html, 25 $qrcode_html,
25 $value['url'], 26 $value['url'],
26 PluginManager::$PLUGINS_PATH 27 $path
27 ); 28 );
28 $value['link_plugin'][] = $qrcode; 29 $value['link_plugin'][] = $qrcode;
29 } 30 }
@@ -41,7 +42,7 @@ function hook_qrcode_render_linklist($data)
41function hook_qrcode_render_footer($data) 42function hook_qrcode_render_footer($data)
42{ 43{
43 if ($data['_PAGE_'] == TemplatePage::LINKLIST) { 44 if ($data['_PAGE_'] == TemplatePage::LINKLIST) {
44 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/shaarli-qrcode.js'; 45 $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/shaarli-qrcode.js';
45 } 46 }
46 47
47 return $data; 48 return $data;