diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2016-10-13 18:12:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 18:12:55 +0200 |
commit | f63632a6fb84594b8aeacb387a5cd17b4a841d2c (patch) | |
tree | 86b21f07afcdae003e8740682eb5698f07f3c937 /plugins | |
parent | 03542572665bae57705a2f57b0737ed43f4f1415 (diff) | |
parent | 5e148f8a529abf72256ef74ed149d56a5b27bd72 (diff) | |
download | Shaarli-f63632a6fb84594b8aeacb387a5cd17b4a841d2c.tar.gz Shaarli-f63632a6fb84594b8aeacb387a5cd17b4a841d2c.tar.zst Shaarli-f63632a6fb84594b8aeacb387a5cd17b4a841d2c.zip |
Merge pull request #654 from teromene/archive-org-no-internal
Archive.org plugin: do not propose archival of private notes
Fixes #637
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/archiveorg/archiveorg.php | 3 |
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 | } |