]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #776 from ArthurHoaro/hotfix/linkdb-update
authorArthurHoaro <arthur@hoa.ro>
Sat, 4 Feb 2017 14:24:49 +0000 (15:24 +0100)
committerGitHub <noreply@github.com>
Sat, 4 Feb 2017 14:24:49 +0000 (15:24 +0100)
Fixes #775: LinkDB do not access LinkDB before ID system migration

application/Updater.php

index eb03c6d3afe6cc6be66062fb2050ac6dfe3170b5..90aba74508faa33472d3bc6a754f127cf1a8e066 100644 (file)
@@ -132,21 +132,6 @@ class Updater
         return true;
     }
 
-    /**
-     * Rename tags starting with a '-' to work with tag exclusion search.
-     */
-    public function updateMethodRenameDashTags()
-    {
-        $linklist = $this->linkDB->filterSearch();
-        foreach ($linklist as $key => $link) {
-            $link['tags'] = preg_replace('/(^| )\-/', '$1', $link['tags']);
-            $link['tags'] = implode(' ', array_unique(LinkFilter::tagsStrToArray($link['tags'], true)));
-            $this->linkDB[$key] = $link;
-        }
-        $this->linkDB->save($this->conf->get('resource.page_cache'));
-        return true;
-    }
-
     /**
      * Move old configuration in PHP to the new config system in JSON format.
      *
@@ -257,6 +242,21 @@ class Updater
         return true;
     }
 
+    /**
+     * Rename tags starting with a '-' to work with tag exclusion search.
+     */
+    public function updateMethodRenameDashTags()
+    {
+        $linklist = $this->linkDB->filterSearch();
+        foreach ($linklist as $key => $link) {
+            $link['tags'] = preg_replace('/(^| )\-/', '$1', $link['tags']);
+            $link['tags'] = implode(' ', array_unique(LinkFilter::tagsStrToArray($link['tags'], true)));
+            $this->linkDB[$key] = $link;
+        }
+        $this->linkDB->save($this->conf->get('resource.page_cache'));
+        return true;
+    }
+
     /**
      * Initialize API settings:
      *   - api.enabled: true