mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 03:46:30 +01:00
Fix passing the correct version property to the json_response
This commit is contained in:
@@ -1195,14 +1195,16 @@ class AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$gpm = \Grav\Plugin\Admin\Gpm::GPM();
|
$gpm = \Grav\Plugin\Admin\Gpm::GPM();
|
||||||
|
$version = $gpm->grav->getVersion();
|
||||||
|
|
||||||
$result = \Grav\Plugin\Admin\Gpm::selfupgrade();
|
$result = \Grav\Plugin\Admin\Gpm::selfupgrade();
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->admin->json_response = [
|
$this->admin->json_response = [
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'type' => 'updategrav',
|
'type' => 'updategrav',
|
||||||
'version' => GRAV_VERSION,
|
'version' => $version,
|
||||||
'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_WAS_SUCCESSFULLY_UPDATED_TO') . ' ' . $gpm->grav->getVersion()
|
'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_WAS_SUCCESSFULLY_UPDATED_TO') . ' ' . $version
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$this->admin->json_response = [
|
$this->admin->json_response = [
|
||||||
|
|||||||
Reference in New Issue
Block a user