diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-07-05 00:41:59 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-07-05 14:33:08 +0200 |
commit | 772bbd99bee83d17707c73a630a4d47c4b8bc807 (patch) | |
tree | 9cc5293fe3454e3e71be018b80825a5686516ae5 /lib/private/Updater | |
parent | cbfcfb236f3e8ace6c64ab5a654b9a331a3ce1c0 (diff) | |
download | nextcloud-server-772bbd99bee83d17707c73a630a4d47c4b8bc807.tar.gz nextcloud-server-772bbd99bee83d17707c73a630a4d47c4b8bc807.zip |
Backend work to provide NC whats New info to users
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Updater')
-rw-r--r-- | lib/private/Updater/ChangesCheck.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/Updater/ChangesCheck.php b/lib/private/Updater/ChangesCheck.php index 095f63db879..095cf396e89 100644 --- a/lib/private/Updater/ChangesCheck.php +++ b/lib/private/Updater/ChangesCheck.php @@ -48,6 +48,15 @@ class ChangesCheck { } /** + * @throws DoesNotExistException + */ + public function getChangesForVersion(string $version): array { + $version = $this->normalizeVersion($version); + $changesInfo = $this->mapper->getChanges($version); + return json_decode($changesInfo->getData(), true); + } + + /** * @throws \Exception */ public function check(string $uri, string $version): array { @@ -145,7 +154,7 @@ class ChangesCheck { * returns a x.y.z form of the provided version. Extra numbers will be * omitted, missing ones added as zeros. */ - protected function normalizeVersion(string $version): string { + public function normalizeVersion(string $version): string { $versionNumbers = array_slice(explode('.', $version), 0, 3); $versionNumbers[0] = $versionNumbers[0] ?: '0'; // deal with empty input while(count($versionNumbers) < 3) { |