fix isArray error in validate-operator-tweaks.js
This commit is contained in:
@@ -283,7 +283,9 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
|
|||||||
// wtv-guide is a special case due to needing this function
|
// wtv-guide is a special case due to needing this function
|
||||||
contextObj.wtvguide = new contextObj["WTVGuide"](minisrv_config, ssid_sessions[contextObj.socket.ssid], contextObj.socket, runScriptInVM);
|
contextObj.wtvguide = new contextObj["WTVGuide"](minisrv_config, ssid_sessions[contextObj.socket.ssid], contextObj.socket, runScriptInVM);
|
||||||
break;
|
break;
|
||||||
|
case "wtv-admin":
|
||||||
|
// wtv-admin needs util.isArray in validation of certain actions.
|
||||||
|
contextObj = { ...contextObj, "util": require("util") }
|
||||||
case "wtv-1800":
|
case "wtv-1800":
|
||||||
case "wtv-flashrom":
|
case "wtv-flashrom":
|
||||||
// these are special cases because the primary app already loaded this
|
// these are special cases because the primary app already loaded this
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ if (auth === true) {
|
|||||||
var v = request_headers.query[k];
|
var v = request_headers.query[k];
|
||||||
|
|
||||||
// enable_multi_query may send ["false", "on"] for checkboxes due to webtvism
|
// enable_multi_query may send ["false", "on"] for checkboxes due to webtvism
|
||||||
if (isArray(v)) v = v[(v.length - 1)];
|
if (util.isArray(v)) v = v[(v.length - 1)];
|
||||||
|
|
||||||
// convert numbers back to int before writing to config
|
// convert numbers back to int before writing to config
|
||||||
if (!isNaN(parseInt(v))) v = parseInt(v);
|
if (!isNaN(parseInt(v))) v = parseInt(v);
|
||||||
|
|||||||
Reference in New Issue
Block a user