mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +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();
|
||||
$version = $gpm->grav->getVersion();
|
||||
|
||||
$result = \Grav\Plugin\Admin\Gpm::selfupgrade();
|
||||
|
||||
if ($result) {
|
||||
$this->admin->json_response = [
|
||||
'status' => 'success',
|
||||
'type' => 'updategrav',
|
||||
'version' => GRAV_VERSION,
|
||||
'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_WAS_SUCCESSFULLY_UPDATED_TO') . ' ' . $gpm->grav->getVersion()
|
||||
'version' => $version,
|
||||
'message' => $this->admin->translate('PLUGIN_ADMIN.GRAV_WAS_SUCCESSFULLY_UPDATED_TO') . ' ' . $version
|
||||
];
|
||||
} else {
|
||||
$this->admin->json_response = [
|
||||
|
||||
Reference in New Issue
Block a user