Fix passing the correct version property to the json_response

This commit is contained in:
Flavio Copes
2016-04-29 16:23:45 +02:00
parent 199c53a3d0
commit cf72ea93fc

View File

@@ -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 = [