You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

update.php 457B

123456789101112131415
  1. <?php
  2. $installedVersion=OCP\Config::getAppValue('files_versions', 'installed_version');
  3. // move versions to new directory
  4. if (version_compare($installedVersion, '1.0.2', '<')) {
  5. $users = \OCP\User::getUsers();
  6. $datadir = \OCP\Config::getSystemValue('datadirectory').'/';
  7. foreach ($users as $user) {
  8. $oldPath = $datadir.$user.'/versions';
  9. $newPath = $datadir.$user.'/files_versions';
  10. if(is_dir($oldPath)) {
  11. rename($oldPath, $newPath);
  12. }
  13. }
  14. }