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")) {
|
||||
arr.list = Functions.encodeChannelName(arr.list);
|
||||
}
|
||||
if(coll !== undefined) {
|
||||
if(coll !== undefined && ((arr.hasOwnProperty("offsiteAdd") && !arr.offsiteAdd) || !arr.hasOwnProperty("offsiteAdd"))) {
|
||||
try {
|
||||
coll = arr.list;//.replace(/ /g,'');
|
||||
if(coll.length == 0) return;
|
||||
@@ -478,6 +478,8 @@ module.exports = function() {
|
||||
} catch(e) {
|
||||
return;
|
||||
}
|
||||
} else if(arr.hasOwnProperty("offsiteAdd") && arr.offsiteAdd) {
|
||||
arr.list = Functions.removeEmojis(arr.list).toLowerCase();
|
||||
}
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
if(arr.hasOwnProperty("offsiteAdd") && arr.offsiteAdd) {
|
||||
coll = arr.list;
|
||||
}
|
||||
Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) {
|
||||
if(adminpass != "" || arr.adminpass == undefined) {
|
||||
arr.adminpass = Functions.hash_pass(adminpass);
|
||||
|
||||
Reference in New Issue
Block a user