mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed vulnerabilities and few design suspicions where two conditional structures are having the same implementation.
This commit is contained in:
committed by
Akshay Joshi
parent
7c12ade161
commit
df05efd7d9
@@ -472,20 +472,11 @@ define([
|
||||
// If there is default arguments
|
||||
//Below logic will assign default values to "Default value" column
|
||||
for (j = (myargname.length - 1); j >= 0; j--) {
|
||||
if (debug_info['proargmodes'] == null) {
|
||||
if (arg_cnt) {
|
||||
arg_cnt = arg_cnt - 1;
|
||||
def_val_list[j] = default_args[arg_cnt];
|
||||
} else {
|
||||
def_val_list[j] = '<No default value>';
|
||||
}
|
||||
if (arg_cnt) {
|
||||
arg_cnt = arg_cnt - 1;
|
||||
def_val_list[j] = default_args[arg_cnt];
|
||||
} else {
|
||||
if (arg_cnt) {
|
||||
arg_cnt = arg_cnt - 1;
|
||||
def_val_list[j] = default_args[arg_cnt];
|
||||
} else {
|
||||
def_val_list[j] = '<No default value>';
|
||||
}
|
||||
def_val_list[j] = '<No default value>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -923,22 +914,11 @@ define([
|
||||
let node = pgBrowser.Nodes[item_data._type];
|
||||
let treeInfo = node.getTreeNodeHierarchy.call(node, selected_item);
|
||||
|
||||
let f_id;
|
||||
if (item_data._type == 'function') {
|
||||
f_id = item_data._id;
|
||||
} else if (item_data._type == 'procedure') {
|
||||
f_id = item_data._id;
|
||||
} else if (item_data._type == 'edbfunc') {
|
||||
f_id = item_data._id;
|
||||
} else if (item_data._type == 'edbproc') {
|
||||
f_id = item_data._id;
|
||||
}
|
||||
|
||||
baseUrl = url_for('debugger.clear_arguments', {
|
||||
'sid': treeInfo.server._id,
|
||||
'did': treeInfo.database._id,
|
||||
'scid': treeInfo.schema._id,
|
||||
'func_id': f_id,
|
||||
'func_id': item_data._id,
|
||||
});
|
||||
} else {
|
||||
baseUrl = url_for('debugger.clear_arguments', {
|
||||
|
||||
@@ -391,18 +391,7 @@ define([
|
||||
if (res.data.result == null || res.data.result.length == 0) {
|
||||
self.poll_result(trans_id);
|
||||
} else {
|
||||
if (res.data.result[0].src != undefined || res.data.result[0].src != null) {
|
||||
pgTools.DirectDebug.polling_timeout_idle = false;
|
||||
pgTools.DirectDebug.docker.finishLoading(50);
|
||||
if (res.data.result[0].src != pgTools.DirectDebug.editor.getValue()) {
|
||||
pgTools.DirectDebug.editor.setValue(res.data.result[0].src);
|
||||
self.UpdateBreakpoint(trans_id);
|
||||
}
|
||||
self.setActiveLine(res.data.result[0].linenumber - 2);
|
||||
// Update the stack, local variables and parameters information
|
||||
self.GetStackInformation(trans_id);
|
||||
|
||||
} else if (!pgTools.DirectDebug.debug_type && !pgTools.DirectDebug.first_time_indirect_debug) {
|
||||
if (!pgTools.DirectDebug.debug_type && !pgTools.DirectDebug.first_time_indirect_debug) {
|
||||
pgTools.DirectDebug.docker.finishLoading(50);
|
||||
self.setActiveLine(-1);
|
||||
self.clear_all_breakpoint(trans_id);
|
||||
|
||||
Reference in New Issue
Block a user