diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/Updater.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/application/Updater.php b/application/Updater.php index eb03c6d3..90aba745 100644 --- a/application/Updater.php +++ b/application/Updater.php | |||
@@ -133,21 +133,6 @@ class Updater | |||
133 | } | 133 | } |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * Rename tags starting with a '-' to work with tag exclusion search. | ||
137 | */ | ||
138 | public function updateMethodRenameDashTags() | ||
139 | { | ||
140 | $linklist = $this->linkDB->filterSearch(); | ||
141 | foreach ($linklist as $key => $link) { | ||
142 | $link['tags'] = preg_replace('/(^| )\-/', '$1', $link['tags']); | ||
143 | $link['tags'] = implode(' ', array_unique(LinkFilter::tagsStrToArray($link['tags'], true))); | ||
144 | $this->linkDB[$key] = $link; | ||
145 | } | ||
146 | $this->linkDB->save($this->conf->get('resource.page_cache')); | ||
147 | return true; | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * Move old configuration in PHP to the new config system in JSON format. | 136 | * Move old configuration in PHP to the new config system in JSON format. |
152 | * | 137 | * |
153 | * Will rename 'config.php' into 'config.save.php' and create 'config.json.php'. | 138 | * Will rename 'config.php' into 'config.save.php' and create 'config.json.php'. |
@@ -258,6 +243,21 @@ class Updater | |||
258 | } | 243 | } |
259 | 244 | ||
260 | /** | 245 | /** |
246 | * Rename tags starting with a '-' to work with tag exclusion search. | ||
247 | */ | ||
248 | public function updateMethodRenameDashTags() | ||
249 | { | ||
250 | $linklist = $this->linkDB->filterSearch(); | ||
251 | foreach ($linklist as $key => $link) { | ||
252 | $link['tags'] = preg_replace('/(^| )\-/', '$1', $link['tags']); | ||
253 | $link['tags'] = implode(' ', array_unique(LinkFilter::tagsStrToArray($link['tags'], true))); | ||
254 | $this->linkDB[$key] = $link; | ||
255 | } | ||
256 | $this->linkDB->save($this->conf->get('resource.page_cache')); | ||
257 | return true; | ||
258 | } | ||
259 | |||
260 | /** | ||
261 | * Initialize API settings: | 261 | * Initialize API settings: |
262 | * - api.enabled: true | 262 | * - api.enabled: true |
263 | * - api.secret: generated secret | 263 | * - api.secret: generated secret |