summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/appinfo/update.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-05-06 13:55:26 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-06-02 18:55:13 +0200
commit7ad0fee0b56d9ab678cbb52128d427ebd641b05e (patch)
treeb8b99b661cbeb7772f927d070eb6e18cd5408a92 /apps/files_versions/appinfo/update.php
parent390d8e53b4349af2265085f25c2784c620fbf4ae (diff)
downloadnextcloud-server-7ad0fee0b56d9ab678cbb52128d427ebd641b05e.tar.gz
nextcloud-server-7ad0fee0b56d9ab678cbb52128d427ebd641b05e.zip
let file cache handle the versions size
Diffstat (limited to 'apps/files_versions/appinfo/update.php')
-rw-r--r--apps/files_versions/appinfo/update.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/apps/files_versions/appinfo/update.php b/apps/files_versions/appinfo/update.php
index 52a4850758a..ee6d3c14c9a 100644
--- a/apps/files_versions/appinfo/update.php
+++ b/apps/files_versions/appinfo/update.php
@@ -2,14 +2,7 @@
$installedVersion=OCP\Config::getAppValue('files_versions', 'installed_version');
// move versions to new directory
-if (version_compare($installedVersion, '1.0.2', '<')) {
- $users = \OCP\User::getUsers();
- $datadir = \OCP\Config::getSystemValue('datadirectory').'/';
- foreach ($users as $user) {
- $oldPath = $datadir.$user.'/versions';
- $newPath = $datadir.$user.'/files_versions';
- if(is_dir($oldPath)) {
- rename($oldPath, $newPath);
- }
- }
+if (version_compare($installedVersion, '1.0.4', '<')) {
+ $query = \OCP\DB::prepare("DROP TABLE `*PREFIX*files_versions`");
+ $query->execute(array());
}