]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - plugins/qrcode/qrcode.php
Process main page (linklist) through Slim controller
[github/shaarli/Shaarli.git] / plugins / qrcode / qrcode.php
index 21908cee6817b33d1094651e9c58d7de910b260d..2ec0cb6576d859c3723f96d39cd8f9165c8cfd5e 100644 (file)
@@ -5,7 +5,8 @@
  * Display a QRCode icon in link list.
  */
 
-use Shaarli\Router;
+use Shaarli\Plugin\PluginManager;
+use Shaarli\Render\TemplatePage;
 
 /**
  * Add qrcode icon to link_plugin when rendering linklist.
@@ -21,7 +22,6 @@ function hook_qrcode_render_linklist($data)
     foreach ($data['links'] as &$value) {
         $qrcode = sprintf(
             $qrcode_html,
-            urlencode($value['url']),
             $value['url'],
             PluginManager::$PLUGINS_PATH
         );
@@ -40,7 +40,7 @@ function hook_qrcode_render_linklist($data)
  */
 function hook_qrcode_render_footer($data)
 {
-    if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
+    if ($data['_PAGE_'] == TemplatePage::LINKLIST) {
         $data['js_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/shaarli-qrcode.js';
     }
 
@@ -56,7 +56,7 @@ function hook_qrcode_render_footer($data)
  */
 function hook_qrcode_render_includes($data)
 {
-    if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
+    if ($data['_PAGE_'] == TemplatePage::LINKLIST) {
         $data['css_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.css';
     }