blob: e289b927b3c7af64b445e5db0a6d0a1d4de82c56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
}
}
}
|