From 11cf46008f6c14180ba21afc1c80383ec2c91dd9 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Tue, 29 Mar 2016 17:44:48 +1100 Subject: [PATCH] Adds core changelog to update screen --- modules/system/controllers/Updates.php | 21 +++++++++++++++++++ .../controllers/updates/_update_list.htm | 9 ++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index 8e6087e4f..020416856 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -273,6 +273,7 @@ class Updates extends Controller $manager = UpdateManager::instance(); $result = $manager->requestUpdateList(); + $result = $this->processUpdateLists($result); $result = $this->processImportantUpdates($result); $this->vars['core'] = array_get($result, 'core', false); @@ -290,6 +291,8 @@ class Updates extends Controller /** * Loops the update list and checks for actionable updates. + * @param array $result + * @return array */ protected function processImportantUpdates($result) { @@ -313,6 +316,24 @@ class Updates extends Controller return $result; } + /** + * Reverses the update lists for the core and all plugins. + * @param array $result + * @return array + */ + protected function processUpdateLists($result) + { + if ($core = array_get($result, 'core')) { + $result['core']['updates'] = array_reverse(array_get($core, 'updates', []), true); + } + + foreach (array_get($result, 'plugins', []) as $code => $plugin) { + $result['plugins'][$code]['updates'] = array_reverse(array_get($plugin, 'updates', []), true); + } + + return $result; + } + /** * Contacts the update server for a list of necessary updates. */ diff --git a/modules/system/controllers/updates/_update_list.htm b/modules/system/controllers/updates/_update_list.htm index c954ab96a..f1ee3158e 100644 --- a/modules/system/controllers/updates/_update_list.htm +++ b/modules/system/controllers/updates/_update_list.htm @@ -19,8 +19,10 @@
-
$core['build']])) ?>
-
+ $description): ?> +
$build])) ?>
+
+
$core['old_build']])) ?>
@@ -70,7 +72,6 @@
-
@@ -79,7 +80,7 @@ - $description): ?> + $description): ?>