2012-07-09 14:07:26 +00:00
|
|
|
<?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) {
|
2012-08-29 06:42:49 +00:00
|
|
|
$oldPath = $datadir.$user.'/versions';
|
2012-07-09 14:07:26 +00:00
|
|
|
$newPath = $datadir.$user.'/files_versions';
|
|
|
|
if(is_dir($oldPath)) {
|
|
|
|
rename($oldPath, $newPath);
|
|
|
|
}
|
|
|
|
}
|
2012-08-29 06:42:49 +00:00
|
|
|
|
2012-07-09 14:07:26 +00:00
|
|
|
}
|