Adds core changelog to update screen
This commit is contained in:
parent
2ac23cc3c7
commit
11cf46008f
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,8 +19,10 @@
|
|||
</h5>
|
||||
</div>
|
||||
<dl>
|
||||
<dt><?= e(trans('system::lang.updates.core_build', ['build'=>$core['build']])) ?></dt>
|
||||
<dd><?= e(trans('system::lang.updates.core_build_help')) ?></dd>
|
||||
<?php foreach ($core['updates'] as $build => $description): ?>
|
||||
<dt><?= e(trans('system::lang.updates.core_build', ['build'=>$build])) ?></dt>
|
||||
<dd><?= e($description) ?></dd>
|
||||
<?php endforeach ?>
|
||||
<?php if ($core['old_build']): ?>
|
||||
<dt class="text-muted"><?= e(trans('system::lang.updates.core_build', ['build'=>$core['old_build']])) ?></dt>
|
||||
<dd class="text-muted"><?= e(trans('system::lang.updates.core_current_build')) ?></dd>
|
||||
|
|
@ -70,7 +72,6 @@
|
|||
</h5>
|
||||
</div>
|
||||
<dl>
|
||||
|
||||
<?php if (!$plugin['old_version']): ?>
|
||||
<dt>
|
||||
<?= $plugin['version'] ?>
|
||||
|
|
@ -79,7 +80,7 @@
|
|||
<?= e(trans('system::lang.updates.plugin_version_none')) ?>
|
||||
</dd>
|
||||
<?php else: ?>
|
||||
<?php foreach (array_reverse($plugin['updates']) as $version => $description): ?>
|
||||
<?php foreach ($plugin['updates'] as $version => $description): ?>
|
||||
<dt><?= e($version) ?></dt>
|
||||
<?php if (is_array($description)): ?>
|
||||
<dd>
|
||||
|
|
|
|||
Loading…
Reference in New Issue