aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
authorTeromene <teromene@teromene.fr>2016-10-11 16:37:42 +0100
committerArthurHoaro <arthur@hoa.ro>2016-11-05 14:29:53 +0100
commit7aff34edf05ea791a531c8787d3d6ca792ffb304 (patch)
tree671c428cb79784b8d59f2449bb86c1d0b5f9f2ed /plugins
parentbfafb61e601585af25f6c056da2c765a4e3a01f4 (diff)
downloadShaarli-7aff34edf05ea791a531c8787d3d6ca792ffb304.tar.gz
Shaarli-7aff34edf05ea791a531c8787d3d6ca792ffb304.tar.zst
Shaarli-7aff34edf05ea791a531c8787d3d6ca792ffb304.zip
Archive.org plugin: do not propose archival of private notes
Fixes #637
Diffstat (limited to 'plugins')
-rw-r--r--plugins/archiveorg/archiveorg.php3
1 files changed, 3 insertions, 0 deletions
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)
17 $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html'); 17 $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html');
18 18
19 foreach ($data['links'] as &$value) { 19 foreach ($data['links'] as &$value) {
20 if($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) {
21 continue;
22 }
20 $archive = sprintf($archive_html, $value['url']); 23 $archive = sprintf($archive_html, $value['url']);
21 $value['link_plugin'][] = $archive; 24 $value['link_plugin'][] = $archive;
22 } 25 }