mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-19 05:53:05 +01:00
fixes for scss and autoloading
Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
@@ -1323,15 +1323,16 @@ class AdminController extends AdminBaseController
|
||||
$result = Gpm::install(array_keys($dependencies), ['theme' => $type === 'themes']);
|
||||
|
||||
if ($result) {
|
||||
$this->admin->json_response = ['status' => 'success', 'message' => 'Dependencies installed successfully'];
|
||||
$json_response = ['status' => 'success', 'message' => 'Dependencies installed successfully'];
|
||||
} else {
|
||||
$this->admin->json_response = [
|
||||
$json_response = [
|
||||
'status' => 'error',
|
||||
'message' => $this->admin::translate('PLUGIN_ADMIN.INSTALLATION_FAILED')
|
||||
];
|
||||
}
|
||||
|
||||
return true;
|
||||
// Exit early to prevent any post-install code from running with potentially mismatched autoloaders
|
||||
$this->sendJsonResponse($json_response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1376,19 +1377,20 @@ class AdminController extends AdminBaseController
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$this->admin->json_response = [
|
||||
$json_response = [
|
||||
'status' => 'success',
|
||||
'message' => $this->admin::translate(is_string($result) ? $result : sprintf($this->admin::translate($reinstall ?: 'PLUGIN_ADMIN.PACKAGE_X_REINSTALLED_SUCCESSFULLY',
|
||||
null), $package))
|
||||
];
|
||||
} else {
|
||||
$this->admin->json_response = [
|
||||
$json_response = [
|
||||
'status' => 'error',
|
||||
'message' => $this->admin::translate($reinstall ?: 'PLUGIN_ADMIN.INSTALLATION_FAILED')
|
||||
];
|
||||
}
|
||||
|
||||
return true;
|
||||
// Exit early to prevent any post-install code from running with potentially mismatched autoloaders
|
||||
$this->sendJsonResponse($json_response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1501,19 +1503,20 @@ class AdminController extends AdminBaseController
|
||||
$result = Gpm::directInstall($url);
|
||||
|
||||
if ($result === true) {
|
||||
$this->admin->json_response = [
|
||||
$json_response = [
|
||||
'status' => 'success',
|
||||
'message' => $this->admin::translate(sprintf($this->admin::translate('PLUGIN_ADMIN.PACKAGE_X_REINSTALLED_SUCCESSFULLY',
|
||||
null), $package_name))
|
||||
];
|
||||
} else {
|
||||
$this->admin->json_response = [
|
||||
$json_response = [
|
||||
'status' => 'error',
|
||||
'message' => $this->admin::translate('PLUGIN_ADMIN.REINSTALLATION_FAILED')
|
||||
];
|
||||
}
|
||||
|
||||
return true;
|
||||
// Exit early to prevent any post-install code from running with potentially mismatched autoloaders
|
||||
$this->sendJsonResponse($json_response);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user