summaryrefslogtreecommitdiffstats
path: root/lib/private/updater.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-03-18 17:14:38 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-03-18 17:14:38 +0100
commit6b9ae27b90ee5649fcab2417ebaf14e87559756e (patch)
treea5ce01aee8c99e2d4a37c1f090c7a1d82443af41 /lib/private/updater.php
parentf6c3667efa32d0fa24307b3acc3a239081bf6410 (diff)
downloadnextcloud-server-6b9ae27b90ee5649fcab2417ebaf14e87559756e.tar.gz
nextcloud-server-6b9ae27b90ee5649fcab2417ebaf14e87559756e.zip
drop file cache migration OC5 -> OC6
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r--lib/private/updater.php43
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php
index dd8dc84e804..1354f3fd2f8 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -16,9 +16,6 @@ use OC\Hooks\BasicEmitter;
* - maintenanceStart()
* - maintenanceEnd()
* - dbUpgrade()
- * - filecacheStart()
- * - filecacheProgress(int $percentage)
- * - filecacheDone()
* - failure(string $message)
*/
class Updater extends BasicEmitter {
@@ -122,9 +119,6 @@ class Updater extends BasicEmitter {
\OC_DB::updateDbFromStructure(\OC::$SERVERROOT . '/db_structure.xml');
$this->emit('\OC\Updater', 'dbUpgrade');
- // do a file cache upgrade for users with files
- // this can take loooooooooooooooooooooooong
- $this->upgradeFileCache();
} catch (\Exception $exception) {
$this->emit('\OC\Updater', 'failure', array($exception->getMessage()));
}
@@ -142,42 +136,5 @@ class Updater extends BasicEmitter {
$this->emit('\OC\Updater', 'maintenanceEnd');
}
- private function upgradeFileCache() {
- try {
- $query = \OC_DB::prepare('
- SELECT DISTINCT `user`
- FROM `*PREFIX*fscache`
- ');
- $result = $query->execute();
- } catch (\Exception $e) {
- return;
- }
- $users = $result->fetchAll();
- if (count($users) == 0) {
- return;
- }
- $step = 100 / count($users);
- $percentCompleted = 0;
- $lastPercentCompletedOutput = 0;
- $startInfoShown = false;
- foreach ($users as $userRow) {
- $user = $userRow['user'];
- \OC\Files\Filesystem::initMountPoints($user);
- \OC\Files\Cache\Upgrade::doSilentUpgrade($user);
- if (!$startInfoShown) {
- //We show it only now, because otherwise Info about upgraded apps
- //will appear between this and progress info
- $this->emit('\OC\Updater', 'filecacheStart');
- $startInfoShown = true;
- }
- $percentCompleted += $step;
- $out = floor($percentCompleted);
- if ($out != $lastPercentCompletedOutput) {
- $this->emit('\OC\Updater', 'filecacheProgress', array($out));
- $lastPercentCompletedOutput = $out;
- }
- }
- $this->emit('\OC\Updater', 'filecacheDone');
- }
}