Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FFS Gluon Packages
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
firmware
FFS Gluon Packages
Commits
bead07dc
Commit
bead07dc
authored
Oct 25, 2017
by
Philippe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace normal uses of luci.model.uci with simple-uci
parent
64ef1b3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
gluon-config-mode-zip/luasrc/lib/gluon/config-mode/wizard/0450-geo-location.lua
...luasrc/lib/gluon/config-mode/wizard/0450-geo-location.lua
+4
-8
No files found.
gluon-config-mode-zip/luasrc/lib/gluon/config-mode/wizard/0450-geo-location.lua
View file @
bead07dc
local
cbi
=
require
"luci.cbi"
local
i18n
=
require
"luci.i18n"
local
uci
=
luci
.
model
.
uci
.
cursor
()
local
uci
=
require
(
"simple-uci"
)
.
cursor
()
local
M
=
{}
...
...
@@ -19,13 +19,9 @@ end
function
M
.
handle
(
data
)
local
sname
=
uci
:
get_first
(
"gluon-node-info"
,
"location"
)
if
data
.
_zip
~=
nil
then
uci
:
set
(
"gluon-node-info"
,
sname
,
"zip"
,
data
.
_zip
:
trim
())
else
uci
:
delete
(
"gluon-node-info"
,
sname
,
"zip"
)
end
uci
:
save
(
"gluon-node-info"
)
uci
:
commit
(
"gluon-node-info"
)
uci
:
set
(
"gluon-node-info"
,
sname
,
"zip"
,
data
.
_zip
:
trim
())
uci
:
save
(
"gluon-node-info"
)
uci
:
commit
(
"gluon-node-info"
)
end
return
M
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