From cfd8cc3fd8382038a556ea729bb7c9beb09e4765 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Fri, 25 Mar 2016 16:16:49 +0300 Subject: [PATCH] Show release notes --- core/templates/update.admin.php | 5 +++++ lib/base.php | 3 +++ lib/private/server.php | 13 +++++++++++++ 3 files changed, 21 insertions(+) diff --git a/core/templates/update.admin.php b/core/templates/update.admin.php index 75815de84b..543820e054 100644 --- a/core/templates/update.admin.php +++ b/core/templates/update.admin.php @@ -34,6 +34,11 @@
t('Please make sure that the database, the config folder and the data folder have been backed up before proceeding.')) ?>
+ +
+ +
+
t('To avoid timeouts with larger installations, you can instead run the following command from your installation directory:')) ?> diff --git a/lib/base.php b/lib/base.php index 35c8592fe1..a5b0dd429a 100644 --- a/lib/base.php +++ b/lib/base.php @@ -392,12 +392,15 @@ class OC { $tmpl->assign('isAppsOnlyUpgrade', false); } + $releaseNotes = \OC::$server->getReleaseNotes(); + // get third party apps $ocVersion = \OCP\Util::getVersion(); $tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); $tmpl->assign('incompatibleAppsList', $appManager->getIncompatibleApps($ocVersion)); $tmpl->assign('productName', 'ownCloud'); // for now $tmpl->assign('oldTheme', $oldTheme); + $tmpl->assign('releaseNotes', $releaseNotes->getReleaseNotes($installedVersion, $currentVersion)); $tmpl->printPage(); } diff --git a/lib/private/server.php b/lib/private/server.php index 581a2b44ce..00ee4e5c56 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -623,6 +623,12 @@ class Server extends ServerContainer implements IServerContainer { return $manager; }); + + $this->registerService('ReleaseNotes', function (Server $c) { + return new \OC\ReleaseNotes( + $c->getDatabaseConnection() + ); + }); } /** @@ -1276,4 +1282,11 @@ class Server extends ServerContainer implements IServerContainer { return $this->query('ShareManager'); } + /** + * @return \OC\ReleaseNotes + */ + public function getReleaseNotes() { + return $this->query('ReleaseNotes'); + } + }