]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - plugins/archiveorg/archiveorg.php
Optimize and cleanup imports
[github/shaarli/Shaarli.git] / plugins / archiveorg / archiveorg.php
index cda35751041933c6caffd061c59121da5833c24f..0ee1c73c9333ef0fd9635db3ededbc64fb44521e 100644 (file)
@@ -5,6 +5,8 @@
  * Add an icon in the link list for archive.org.
  */
 
+use Shaarli\Plugin\PluginManager;
+
 /**
  * Add archive.org icon to link_plugin when rendering linklist.
  *
@@ -17,7 +19,7 @@ function hook_archiveorg_render_linklist($data)
     $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html');
 
     foreach ($data['links'] as &$value) {
-        if($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) {
+        if ($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) {
             continue;
         }
         $archive = sprintf($archive_html, $value['url'], t('View on archive.org'));