summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-07-09 16:07:26 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-07-11 11:06:29 +0200
commite248412ca9e9b75db5c7a4cc9651391e341c66f5 (patch)
treeaef16016bdade5ab0a5b995e0fc9a0fa364eedda /apps/files_versions/appinfo
parent0f0aa1827f446ca531732bb1c807c244ef66676a (diff)
downloadnextcloud-server-e248412ca9e9b75db5c7a4cc9651391e341c66f5.tar.gz
nextcloud-server-e248412ca9e9b75db5c7a4cc9651391e341c66f5.zip
use getStorage() to get versions location
update routine implemented version number of files_versions increased Conflicts: apps/files_versions/lib/hooks.php
Diffstat (limited to 'apps/files_versions/appinfo')
-rw-r--r--apps/files_versions/appinfo/update.php16
-rw-r--r--apps/files_versions/appinfo/version2
2 files changed, 17 insertions, 1 deletions
diff --git a/apps/files_versions/appinfo/update.php b/apps/files_versions/appinfo/update.php
new file mode 100644
index 00000000000..9569ca10485
--- /dev/null
+++ b/apps/files_versions/appinfo/update.php
@@ -0,0 +1,16 @@
+<?php
+
+$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);
+ }
+ }
+
+}
diff --git a/apps/files_versions/appinfo/version b/apps/files_versions/appinfo/version
index 7f207341d5d..e6d5cb833c6 100644
--- a/apps/files_versions/appinfo/version
+++ b/apps/files_versions/appinfo/version
@@ -1 +1 @@
-1.0.1 \ No newline at end of file
+1.0.2 \ No newline at end of file