From 5e148f8a529abf72256ef74ed149d56a5b27bd72 Mon Sep 17 00:00:00 2001 From: Teromene Date: Tue, 11 Oct 2016 16:37:42 +0100 Subject: Archive.org plugin: do not propose archival of private notes Fixes #637 --- plugins/archiveorg/archiveorg.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/archiveorg') diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php index 7d172584..03d13d0e 100644 --- a/plugins/archiveorg/archiveorg.php +++ b/plugins/archiveorg/archiveorg.php @@ -17,6 +17,9 @@ 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'])) { + continue; + } $archive = sprintf($archive_html, $value['url']); $value['link_plugin'][] = $archive; } -- cgit v1.2.3