Show release notes

This commit is contained in:
Victor Dubiniuk 2016-03-25 16:16:49 +03:00
parent 118c39d472
commit cfd8cc3fd8
3 changed files with 21 additions and 0 deletions

View File

@ -34,6 +34,11 @@
<div class="infogroup bold">
<?php p($l->t('Please make sure that the database, the config folder and the data folder have been backed up before proceeding.')) ?>
</div>
<?php foreach ($_['releaseNotes'] as $note): ?>
<div class="infogroup bold">
<?php p($note) ?>
</div>
<?php endforeach; ?>
<input class="updateButton" type="button" value="<?php p($l->t('Start update')) ?>">
<div class="infogroup">
<?php p($l->t('To avoid timeouts with larger installations, you can instead run the following command from your installation directory:')) ?>

View File

@ -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();
}

View File

@ -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');
}
}