aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-19 11:55:21 +0000
committerMario <mario@mariovavti.com>2024-07-19 11:55:21 +0000
commit1861eeeb0acbcd7b22b8b447e47207959f54043e (patch)
tree6b4f54c02fd6a9d4deefcd065c5a303d79b85b3f /view/tpl
parent663aeca2a7dcbb41f219b1377bb7b7b33c4f9c2b (diff)
downloadvolse-hubzilla-1861eeeb0acbcd7b22b8b447e47207959f54043e.tar.gz
volse-hubzilla-1861eeeb0acbcd7b22b8b447e47207959f54043e.tar.bz2
volse-hubzilla-1861eeeb0acbcd7b22b8b447e47207959f54043e.zip
more f arg removal
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/build_query.tpl61
1 files changed, 31 insertions, 30 deletions
diff --git a/view/tpl/build_query.tpl b/view/tpl/build_query.tpl
index af70a9595..b009d4c9c 100644
--- a/view/tpl/build_query.tpl
+++ b/view/tpl/build_query.tpl
@@ -41,36 +41,37 @@
var bParam_unseen = "{{$unseen}}";
function buildCmd() {
- var udargs = ((page_load) ? "/load" : "");
- var bCmd = bParam_cmd + udargs + "?f=" ;
- if(bParam_uid) bCmd = bCmd + "&p=" + bParam_uid;
- if(bParam_cmin != (-1)) bCmd = bCmd + "&cmin=" + bParam_cmin;
- if(bParam_cmax != (-1)) bCmd = bCmd + "&cmax=" + bParam_cmax;
- if(bParam_gid != 0) { bCmd = bCmd + "&gid=" + bParam_gid; } else
- if(bParam_cid != 0) { bCmd = bCmd + "&cid=" + bParam_cid; }
- if(bParam_star != 0) bCmd = bCmd + "&star=" + bParam_star;
- if(bParam_liked != 0) bCmd = bCmd + "&liked=" + bParam_liked;
- if(bParam_conv!= 0) bCmd = bCmd + "&conv=" + bParam_conv;
- if(bParam_spam != 0) bCmd = bCmd + "&spam=" + bParam_spam;
- if(bParam_new != 0) bCmd = bCmd + "&new=" + bParam_new;
- if(bParam_wall != 0) bCmd = bCmd + "&wall=" + bParam_wall;
- if(bParam_list != 0) bCmd = bCmd + "&list=" + bParam_list;
- if(bParam_fh != 0) bCmd = bCmd + "&fh=" + bParam_fh;
- if(bParam_dm != 0) bCmd = bCmd + "&dm=" + bParam_dm;
- if(bParam_search != "") bCmd = bCmd + "&search=" + bParam_search;
- if(bParam_xchan != "") bCmd = bCmd + "&xchan=" + bParam_xchan;
- if(bParam_order != "") bCmd = bCmd + "&order=" + bParam_order;
- if(bParam_file != "") bCmd = bCmd + "&file=" + bParam_file;
- if(bParam_cats != "") bCmd = bCmd + "&cat=" + bParam_cats;
- if(bParam_tags != "") bCmd = bCmd + "&tag=" + bParam_tags;
- if(bParam_dend != "") bCmd = bCmd + "&dend=" + bParam_dend;
- if(bParam_dbegin != "") bCmd = bCmd + "&dbegin=" + bParam_dbegin;
- if(bParam_mid != "") bCmd = bCmd + "&mid=" + bParam_mid;
- if(bParam_verb != "") bCmd = bCmd + "&verb=" + bParam_verb;
- if(bParam_net != "") bCmd = bCmd + "&net=" + bParam_net;
- if(bParam_page != 1) bCmd = bCmd + "&page=" + bParam_page;
- if(bParam_pf != 0) bCmd = bCmd + "&pf=" + bParam_pf;
- if(bParam_unseen != 0) bCmd = bCmd + "&unseen=" + bParam_unseen;
+ let udargs = ((page_load) ? "/load" : "");
+ let bCmd = bParam_cmd + udargs;
+
+ if(bParam_uid) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "p=" + bParam_uid;
+ if(bParam_cmin != (-1)) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cmin=" + bParam_cmin;
+ if(bParam_cmax != (-1)) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cmax=" + bParam_cmax;
+ if(bParam_gid != 0) { bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "gid=" + bParam_gid; } else
+ if(bParam_cid != 0) { bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cid=" + bParam_cid; }
+ if(bParam_star != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "star=" + bParam_star;
+ if(bParam_liked != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "liked=" + bParam_liked;
+ if(bParam_conv!= 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "conv=" + bParam_conv;
+ if(bParam_spam != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "spam=" + bParam_spam;
+ if(bParam_new != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "new=" + bParam_new;
+ if(bParam_wall != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "wall=" + bParam_wall;
+ if(bParam_list != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "list=" + bParam_list;
+ if(bParam_fh != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "fh=" + bParam_fh;
+ if(bParam_dm != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "dm=" + bParam_dm;
+ if(bParam_search != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "search=" + bParam_search;
+ if(bParam_xchan != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "xchan=" + bParam_xchan;
+ if(bParam_order != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "order=" + bParam_order;
+ if(bParam_file != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "file=" + bParam_file;
+ if(bParam_cats != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cat=" + bParam_cats;
+ if(bParam_tags != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "tag=" + bParam_tags;
+ if(bParam_dend != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "dend=" + bParam_dend;
+ if(bParam_dbegin != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "dbegin=" + bParam_dbegin;
+ if(bParam_mid != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "mid=" + bParam_mid;
+ if(bParam_verb != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "verb=" + bParam_verb;
+ if(bParam_net != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "net=" + bParam_net;
+ if(bParam_page != 1) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "page=" + bParam_page;
+ if(bParam_pf != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "pf=" + bParam_pf;
+ if(bParam_unseen != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "unseen=" + bParam_unseen;
return(bCmd);
}