aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/archiveorg
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/archiveorg')
-rw-r--r--plugins/archiveorg/archiveorg.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php
index f26e6129..922b5966 100644
--- a/plugins/archiveorg/archiveorg.php
+++ b/plugins/archiveorg/archiveorg.php
@@ -20,10 +20,12 @@ function hook_archiveorg_render_linklist($data)
20 $path = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH; 20 $path = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH;
21 21
22 foreach ($data['links'] as &$value) { 22 foreach ($data['links'] as &$value) {
23 if ($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) { 23 $isNote = startsWith($value['real_url'], '/shaare/');
24 if ($value['private'] && $isNote) {
24 continue; 25 continue;
25 } 26 }
26 $archive = sprintf($archive_html, $value['url'], $path, t('View on archive.org')); 27 $url = $isNote ? rtrim(index_url($_SERVER), '/') . $value['real_url'] : $value['real_url'];
28 $archive = sprintf($archive_html, $url, $path, t('View on archive.org'));
27 $value['link_plugin'][] = $archive; 29 $value['link_plugin'][] = $archive;
28 } 30 }
29 31