mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
firmware: pass argument, why not...
This commit is contained in:
parent
5daf7785e6
commit
f83f556a61
@ -176,15 +176,16 @@ class FirmwareController extends ApiControllerBase
|
||||
return $response;
|
||||
}
|
||||
|
||||
if (empty($version)) {
|
||||
// sanitize package name
|
||||
$filter = new \Phalcon\Filter();
|
||||
$filter->add('version', function ($value) {
|
||||
return preg_replace('/[^0-9a-zA-Z\.]/', '', $value);
|
||||
});
|
||||
$version = $filter->sanitize($version, 'version');
|
||||
|
||||
if ($version == 'update') {
|
||||
$backend->configdRun('firmware changelog fetch');
|
||||
} else {
|
||||
// sanitize package name
|
||||
$filter = new \Phalcon\Filter();
|
||||
$filter->add('version', function ($value) {
|
||||
return preg_replace('/[^0-9a-zA-Z\.]/', '', $value);
|
||||
});
|
||||
$version = $filter->sanitize($version, 'version');
|
||||
$text = trim($backend->configdRun(sprintf('firmware changelog text %s', $version)));
|
||||
$html = trim($backend->configdRun(sprintf('firmware changelog html %s', $version)));
|
||||
if (!empty($text)) {
|
||||
|
||||
@ -485,7 +485,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
$('#checkupdate_maj').click(function () {
|
||||
$("#checkupdate_progress").addClass("fa fa-spinner fa-pulse");
|
||||
// empty call refreshes changelogs in the background
|
||||
ajaxCall('/api/core/firmware/changelog/', {}, function () {
|
||||
ajaxCall('/api/core/firmware/changelog/update', {}, function () {
|
||||
$("#checkupdate_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
BootstrapDialog.show({
|
||||
type:BootstrapDialog.TYPE_WARNING,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user