aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/repair.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/repair.php')
-rw-r--r--lib/private/repair.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/repair.php b/lib/private/repair.php
index 50e54ae1179..c7db8b2617d 100644
--- a/lib/private/repair.php
+++ b/lib/private/repair.php
@@ -82,11 +82,21 @@ class Repair extends BasicEmitter {
* @return array of RepairStep instances
*/
public static function getBeforeUpgradeRepairSteps() {
- return array(
+ $steps = array(
new \OC\Repair\InnoDB(),
new \OC\Repair\Collation(\OC::$server->getConfig(), \OC_DB::getConnection()),
new \OC\Repair\SearchLuceneTables()
);
+
+ //There is no need to delete all previews on every single update
+ //only 7.0.0 thru 7.0.2 generated broken previews
+ $currentVersion = \OC_Config::getValue('version');
+ if (version_compare($currentVersion, '7.0.0.0', '>=') &&
+ version_compare($currentVersion, '7.0.2.2', '<=')) {
+ $steps[] = new \OC\Repair\Preview();
+ }
+
+ return $steps;
}
/**