diff --git a/luciexpress/htdocs/css/radio.css b/luciexpress/htdocs/css/radio.css index 70c520959..381c5488c 100644 --- a/luciexpress/htdocs/css/radio.css +++ b/luciexpress/htdocs/css/radio.css @@ -1,3 +1,7 @@ +.radio-info input[type="radio"] { + cursor: pointer; +} + .radio-info input[type="radio"] + label::after { background-color: #a8b400; } @@ -6,4 +10,4 @@ } .radio-info input[type="radio"]:checked + label::after { background-color: #a8b400; -} \ No newline at end of file +} diff --git a/luciexpress/htdocs/plugins/core/pages/overview.html b/luciexpress/htdocs/plugins/core/pages/overview.html index 9d89505e1..99f82cfec 100644 --- a/luciexpress/htdocs/plugins/core/pages/overview.html +++ b/luciexpress/htdocs/plugins/core/pages/overview.html @@ -33,13 +33,13 @@
-
Schedule {{wifiSchedStatus | translate}}
+
Schedule {{wifiSchedStatus | translate}}
-
WPS {{wifiWPSStatus | translate}}
+
WPS {{wifiWPSStatus | translate}}
diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js b/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js index b49621645..c8d35230c 100644 --- a/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js +++ b/luciexpress/htdocs/plugins/settings/pages/settings.upgrade.js @@ -205,7 +205,7 @@ JUCI.app //return; } - upgradeStart(); + upgradeStart($scope.uploadFilename); $(this).unbind("load"); }); diff --git a/luciexpress/src/io/main.c b/luciexpress/src/io/main.c index 74f8b41a0..20979f01c 100644 --- a/luciexpress/src/io/main.c +++ b/luciexpress/src/io/main.c @@ -58,7 +58,6 @@ struct state bool filedata; int filemode; int filefd; - int tempfd; }; enum { @@ -306,7 +305,7 @@ failure(int e, const char *message) return -1; } - +/* static int filecopy(void) { @@ -352,7 +351,7 @@ filecopy(void) return 0; } - +*/ static int header_field(multipart_parser *p, const char *data, size_t len) { @@ -394,7 +393,6 @@ header_value(multipart_parser *p, const char *data, size_t len) static int data_begin_cb(multipart_parser *p) { - char tmpname[24] = "/tmp/luci-upload.XXXXXX"; if (st.parttype == PART_FILEDATA) { @@ -404,12 +402,12 @@ data_begin_cb(multipart_parser *p) if (!st.filename) return response(false, "File data without name"); - st.tempfd = mkstemp(tmpname); + st.filefd = open(st.filename, O_CREAT | O_TRUNC | O_WRONLY, 0600); - if (st.tempfd < 0) - return response(false, "Failed to create temporary file"); + if (st.filefd < 0) + return response(false, "Failed to create file"); - unlink(tmpname); + //unlink(tmpname); } return 0; @@ -433,9 +431,9 @@ data_cb(multipart_parser *p, const char *data, size_t len) break; case PART_FILEDATA: - if (write(st.tempfd, data, len) != len) + if (write(st.filefd, data, len) != len) { - close(st.tempfd); + close(st.filefd); return response(false, "I/O failure while writing temporary file"); } @@ -464,30 +462,11 @@ data_end_cb(multipart_parser *p) } else if (st.parttype == PART_FILEDATA) { - if (st.tempfd < 0) + if (st.filefd < 0) return response(false, "Internal program failure"); -#if 0 - /* prepare directory */ - for (ptr = st.filename; *ptr; ptr++) - { - if (*ptr == '/') - { - *ptr = 0; - - if (mkdir(st.filename, 0755)) - { - unlink(st.tmpname); - return response(false, "Failed to create destination directory"); - } - - *ptr = '/'; - } - } -#endif - - if (filecopy()) - return -1; + //if (filecopy()) + // return -1; return response(true, NULL); } @@ -529,7 +508,6 @@ init_parser(void) strcpy(boundary, "--"); strcpy(boundary + 2, var); - st.tempfd = -1; st.filefd = -1; st.filemode = 0600;