aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Updater.php
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-02-15 21:12:39 +0100
committerArthur <arthur@hoa.ro>2016-02-15 21:12:39 +0100
commit1e7331126d81a5759ab91c221f7e0f164aeebfb5 (patch)
treea5d084066e1e49fae01ae72f102b3eab2fb6d8ac /application/Updater.php
parent6e607ca613b47e17f7516e94adfee930d4f3e1e8 (diff)
parentce354bf1a61ce2478529ad558b24cdf9678c398a (diff)
downloadShaarli-1e7331126d81a5759ab91c221f7e0f164aeebfb5.tar.gz
Shaarli-1e7331126d81a5759ab91c221f7e0f164aeebfb5.tar.zst
Shaarli-1e7331126d81a5759ab91c221f7e0f164aeebfb5.zip
Merge pull request #446 from ArthurHoaro/search-tag-exclude
Add exclusion in tag search
Diffstat (limited to 'application/Updater.php')
-rw-r--r--application/Updater.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/application/Updater.php b/application/Updater.php
index 20ae0c4d..773a1ffa 100644
--- a/application/Updater.php
+++ b/application/Updater.php
@@ -131,6 +131,21 @@ class Updater
131 131
132 return true; 132 return true;
133 } 133 }
134
135 /**
136 * Rename tags starting with a '-' to work with tag exclusion search.
137 */
138 public function updateMethodRenameDashTags()
139 {
140 $linklist = $this->linkDB->filter();
141 foreach ($linklist as $link) {
142 $link['tags'] = preg_replace('/(^| )\-/', '$1', $link['tags']);
143 $link['tags'] = implode(' ', array_unique(LinkFilter::tagsStrToArray($link['tags'], true)));
144 $this->linkDB[$link['linkdate']] = $link;
145 }
146 $this->linkDB->savedb($this->config['config']['PAGECACHE']);
147 return true;
148 }
134} 149}
135 150
136/** 151/**