aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-18 23:11:20 -0700
committerfriendica <info@friendica.com>2012-07-18 23:11:20 -0700
commitf0fd22d01bbf57dd5d50e36f6b1e1a1cc7bd2af5 (patch)
tree14563cbffa421058c11a3293acc484b32cdf28fc /mod
parentd92a4a686dd989613cfb628896902c7a4f21c522 (diff)
downloadvolse-hubzilla-f0fd22d01bbf57dd5d50e36f6b1e1a1cc7bd2af5.tar.gz
volse-hubzilla-f0fd22d01bbf57dd5d50e36f6b1e1a1cc7bd2af5.tar.bz2
volse-hubzilla-f0fd22d01bbf57dd5d50e36f6b1e1a1cc7bd2af5.zip
dynamically building the page query - start simple
Diffstat (limited to 'mod')
-rw-r--r--mod/network.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/mod/network.php b/mod/network.php
index b1bef5d53..8c8d9140d 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -514,10 +514,12 @@ function network_content(&$a, $update = 0) {
. ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '')
. ((x($_GET,'file')) ? '&file=' . $_GET['file'] : '')
- . "'; var profile_page = " . $a->pager['page'] . ";";
+ . "'; var profile_page = " . $a->pager['page'] . ";</script>";
- $o .= "var network_gid = " . (($gid) ? $gid : 0) . ";\r\n"
+ $a->page['htmlhead'] .= "<script>\r\n"
+ . "var network_cmd = " . '"' . $a->get_baseurl() . '/network/' . '"' . ";\r\n"
+ . "var network_gid = " . (($gid) ? $gid : 0) . ";\r\n"
. "var network_cid = " . (($_GET['cid']) ? $_GET['cid'] : 0) . ";\r\n"
. "var network_cmin = " . (($_GET['cmin']) ? $_GET['cmin'] : 0) . ";\r\n"
. "var network_cmax = " . (($_GET['cmax']) ? $_GET['cmax'] : 99) . ";\r\n"
@@ -534,9 +536,17 @@ function network_content(&$a, $update = 0) {
. 'var network_file = "' . $_GET['file'] . '"' . ";\r\n"
. 'var network_date_end = "' . $datequery . '"' . ";\r\n"
. 'var network_date_start = "' . $datequery2 . '"' . ";\r\n"
+ . 'function buildCmd() { var bCmd = network_cmd + "?f=" ;
+ if(network_cmin) bCmd = bCmd + "&cmin=" + network_cmin;
+ if(network_cmax) bCmd = bCmd + "&cmax=" + network_cmax;
+
+ return(bCmd);
+ }'
+
+ . "</script>\r\n";
+
;
- $o .= "</script>\r\n";