mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue with add to other list form not correctly handling variables
This commit is contained in:
@@ -467,7 +467,7 @@ module.exports = function() {
|
|||||||
if(arr.hasOwnProperty("list")) {
|
if(arr.hasOwnProperty("list")) {
|
||||||
arr.list = Functions.encodeChannelName(arr.list);
|
arr.list = Functions.encodeChannelName(arr.list);
|
||||||
}
|
}
|
||||||
if(coll !== undefined) {
|
if(coll !== undefined && ((arr.hasOwnProperty("offsiteAdd") && !arr.offsiteAdd) || !arr.hasOwnProperty("offsiteAdd"))) {
|
||||||
try {
|
try {
|
||||||
coll = arr.list;//.replace(/ /g,'');
|
coll = arr.list;//.replace(/ /g,'');
|
||||||
if(coll.length == 0) return;
|
if(coll.length == 0) return;
|
||||||
@@ -478,6 +478,8 @@ module.exports = function() {
|
|||||||
} catch(e) {
|
} catch(e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if(arr.hasOwnProperty("offsiteAdd") && arr.offsiteAdd) {
|
||||||
|
arr.list = Functions.removeEmojis(arr.list).toLowerCase();
|
||||||
}
|
}
|
||||||
ListChange.add_function(arr, coll, guid, offline, socket);
|
ListChange.add_function(arr, coll, guid, offline, socket);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -401,7 +401,9 @@ function add_function(arr, coll, guid, offline, socket) {
|
|||||||
socket.emit('update_required', result);
|
socket.emit('update_required', result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(arr.hasOwnProperty("offsiteAdd") && arr.offsiteAdd) {
|
||||||
|
coll = arr.list;
|
||||||
|
}
|
||||||
Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) {
|
Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) {
|
||||||
if(adminpass != "" || arr.adminpass == undefined) {
|
if(adminpass != "" || arr.adminpass == undefined) {
|
||||||
arr.adminpass = Functions.hash_pass(adminpass);
|
arr.adminpass = Functions.hash_pass(adminpass);
|
||||||
|
|||||||
@@ -1802,6 +1802,7 @@ function addDynamicListeners() {
|
|||||||
} else if(event.keyCode == 32 && document.querySelector(".search-container").classList.contains("hide") && window.location.pathname != "/" &&
|
} else if(event.keyCode == 32 && document.querySelector(".search-container").classList.contains("hide") && window.location.pathname != "/" &&
|
||||||
document.querySelector("#text-chat-input") != document.activeElement &&
|
document.querySelector("#text-chat-input") != document.activeElement &&
|
||||||
document.querySelector("#password") != document.activeElement &&
|
document.querySelector("#password") != document.activeElement &&
|
||||||
|
document.querySelector("#other-list-name-add") != document.activeElement &&
|
||||||
document.querySelector("#user-pass-input") != document.activeElement &&
|
document.querySelector("#user-pass-input") != document.activeElement &&
|
||||||
document.querySelector("#thumbnail_input") != document.activeElement &&
|
document.querySelector("#thumbnail_input") != document.activeElement &&
|
||||||
document.querySelector("#rules_input") != document.activeElement &&
|
document.querySelector("#rules_input") != document.activeElement &&
|
||||||
|
|||||||
Reference in New Issue
Block a user