diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-30 01:41:30 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-30 01:41:30 +0100 |
commit | dbbb357f62c1ba86bdff0fbe63e4cea9bc2977fc (patch) | |
tree | 81ceee024d224f530d82b50d043e43da570381f8 /apps/files | |
parent | d33f697a5f3438f286ba3abe63255b6797a6fc03 (diff) | |
download | nextcloud-server-dbbb357f62c1ba86bdff0fbe63e4cea9bc2977fc.tar.gz nextcloud-server-dbbb357f62c1ba86bdff0fbe63e4cea9bc2977fc.zip |
add upgrade path from old cache to preserve file id's
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/appinfo/app.php | 14 | ||||
-rw-r--r-- | apps/files/appinfo/version | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php index b431ddfec02..fb64a80ec0d 100644 --- a/apps/files/appinfo/app.php +++ b/apps/files/appinfo/app.php @@ -1,8 +1,18 @@ <?php -$l=OC_L10N::get('files'); +$l = OC_L10N::get('files'); OCP\App::registerAdmin('files', 'admin'); -OCP\App::addNavigationEntry( array( "id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo( "files", "index.php" ), "icon" => OCP\Util::imagePath( "core", "places/home.svg" ), "name" => $l->t("Files") )); +OCP\App::addNavigationEntry(array("id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo("files", "index.php"), "icon" => OCP\Util::imagePath("core", "places/home.svg"), "name" => $l->t("Files"))); OC_Search::registerProvider('OC_Search_Provider_File'); + +if (OC_User::isLoggedIn()) { + // update OC4.5 filecache to OC5 filecache, can't do this in update.php since it needs to happen for each user individually + $cacheVersion = (int)OCP\Config::getUserValue(OC_User::getUser(), 'files', 'cache_version', 4); + if ($cacheVersion < 5) { + \OC_Log::write('files', 'updating filecache to 5.0 for user ' . OC_User::getUser(), \OC_Log::INFO); + \OC\Files\Cache\Upgrade::upgrade(); + OCP\Config::setUserValue(OC_User::getUser(), 'files', 'cache_version', 5); + } +} diff --git a/apps/files/appinfo/version b/apps/files/appinfo/version index 0664a8fd291..2bf1ca5f549 100644 --- a/apps/files/appinfo/version +++ b/apps/files/appinfo/version @@ -1 +1 @@ -1.1.6 +1.1.7 |