Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
98678fb1
Commit
98678fb1
authored
Nov 20, 2015
by
Frédéric LIETART (TheLinuxFr)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Firmware update, proposed addition of missing translations
parent
a453828f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
FirmwareController.php
.../app/controllers/OPNsense/Core/Api/FirmwareController.php
+7
-7
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php
View file @
98678fb1
...
...
@@ -51,21 +51,21 @@ class FirmwareController extends ApiControllerBase
if
(
$response
!=
null
)
{
if
(
array_key_exists
(
'connection'
,
$response
)
&&
$response
[
'connection'
]
==
'error'
)
{
$response
[
'status_msg'
]
=
'Connection error.'
;
$response
[
'status_msg'
]
=
gettext
(
'Connection error.'
)
;
$response
[
'status'
]
=
'error'
;
}
elseif
(
array_key_exists
(
'repository'
,
$response
)
&&
$response
[
'repository'
]
==
'error'
)
{
$response
[
'status_msg'
]
=
'Repository problem.'
;
$response
[
'status_msg'
]
=
gettext
(
'Repository problem.'
)
;
$response
[
'status'
]
=
'error'
;
}
elseif
(
array_key_exists
(
'updates'
,
$response
)
&&
$response
[
'updates'
]
==
0
)
{
$response
[
'status_msg'
]
=
'There are no updates available.'
;
$response
[
'status_msg'
]
=
gettext
(
'There are no updates available.'
)
;
$response
[
'status'
]
=
'none'
;
}
elseif
(
array_key_exists
(
0
,
$response
[
'upgrade_packages'
])
&&
$response
[
'upgrade_packages'
][
0
][
'name'
]
==
'pkg'
)
{
$response
[
'status_upgrade_action'
]
=
'pkg'
;
$response
[
'status'
]
=
'ok'
;
$response
[
'status_msg'
]
=
'There is a mandatory update for the package manager available. '
.
'Please install and fetch updates again.'
;
gettext
(
'There is a mandatory update for the package manager available. '
)
.
gettext
(
'Please install and fetch updates again.'
)
;
}
elseif
(
array_key_exists
(
'updates'
,
$response
))
{
$response
[
'status_upgrade_action'
]
=
'all'
;
$response
[
'status'
]
=
'ok'
;
...
...
@@ -79,12 +79,12 @@ class FirmwareController extends ApiControllerBase
$response
[
'status_msg'
]
=
sprintf
(
'%s %s'
,
$response
[
'status_msg'
],
'This update requires a reboot.'
gettext
(
'This update requires a reboot.'
)
);
}
}
}
else
{
$response
=
array
(
'status'
=>
'unknown'
,
'status_msg'
=>
'Current status is unknown.'
);
$response
=
array
(
'status'
=>
'unknown'
,
'status_msg'
=>
gettext
(
'Current status is unknown.'
)
);
}
return
$response
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment