diff options
Diffstat (limited to 'plugins/archiveorg')
-rw-r--r-- | plugins/archiveorg/archiveorg.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php index cda35751..0ee1c73c 100644 --- a/plugins/archiveorg/archiveorg.php +++ b/plugins/archiveorg/archiveorg.php | |||
@@ -5,6 +5,8 @@ | |||
5 | * Add an icon in the link list for archive.org. | 5 | * Add an icon in the link list for archive.org. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | use Shaarli\Plugin\PluginManager; | ||
9 | |||
8 | /** | 10 | /** |
9 | * Add archive.org icon to link_plugin when rendering linklist. | 11 | * Add archive.org icon to link_plugin when rendering linklist. |
10 | * | 12 | * |
@@ -17,7 +19,7 @@ function hook_archiveorg_render_linklist($data) | |||
17 | $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html'); | 19 | $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html'); |
18 | 20 | ||
19 | foreach ($data['links'] as &$value) { | 21 | foreach ($data['links'] as &$value) { |
20 | if($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) { | 22 | if ($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) { |
21 | continue; | 23 | continue; |
22 | } | 24 | } |
23 | $archive = sprintf($archive_html, $value['url'], t('View on archive.org')); | 25 | $archive = sprintf($archive_html, $value['url'], t('View on archive.org')); |