X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Fqrcode%2Fqrcode.php;h=56ae47b30ad29b9ff46e085108b7e06c8638d61b;hb=328c215a8ac28e8c6b542fad1120b26692c923c5;hp=2ec0cb6576d859c3723f96d39cd8f9165c8cfd5e;hpb=1a8ac737e52cb25a5c346232ee398f5908cee7d7;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php index 2ec0cb65..56ae47b3 100644 --- a/plugins/qrcode/qrcode.php +++ b/plugins/qrcode/qrcode.php @@ -19,11 +19,12 @@ function hook_qrcode_render_linklist($data) { $qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html'); + $path = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH; foreach ($data['links'] as &$value) { $qrcode = sprintf( $qrcode_html, $value['url'], - PluginManager::$PLUGINS_PATH + $path ); $value['link_plugin'][] = $qrcode; } @@ -41,7 +42,7 @@ function hook_qrcode_render_linklist($data) function hook_qrcode_render_footer($data) { if ($data['_PAGE_'] == TemplatePage::LINKLIST) { - $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/shaarli-qrcode.js'; + $data['js_files'][] = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/qrcode/shaarli-qrcode.js'; } return $data; @@ -57,7 +58,7 @@ function hook_qrcode_render_footer($data) function hook_qrcode_render_includes($data) { if ($data['_PAGE_'] == TemplatePage::LINKLIST) { - $data['css_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.css'; + $data['css_files'][] = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.css'; } return $data;