aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-24 15:21:33 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-24 15:21:33 -0700
commit6368bd165612dfa1e95e8d4c99b922797bf429af (patch)
treed64d21ef77e8dfaae0162f376eae48ecde8eebe0 /mod/network.php
parentd6dbcf8581ef4f93db386eb5c52b060831ee4762 (diff)
downloadvolse-hubzilla-6368bd165612dfa1e95e8d4c99b922797bf429af.tar.gz
volse-hubzilla-6368bd165612dfa1e95e8d4c99b922797bf429af.tar.bz2
volse-hubzilla-6368bd165612dfa1e95e8d4c99b922797bf429af.zip
more live update
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php46
1 files changed, 27 insertions, 19 deletions
diff --git a/mod/network.php b/mod/network.php
index 38d2bbb0c..cbd1f4454 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -6,7 +6,7 @@ function network_init(&$a) {
}
-function network_content(&$a) {
+function network_content(&$a, $update = false) {
if(! local_user())
return;
@@ -15,31 +15,36 @@ function network_content(&$a) {
$contact_id = $a->cid;
- $r = q("UPDATE `item` SET `unseen` = 0
- WHERE `unseen` = 1 AND `uid` = %d",
- intval($_SESSION['uid'])
- );
+ if(! $update) {
- $tpl = file_get_contents('view/jot-header.tpl');
+
+ $tpl = file_get_contents('view/jot-header.tpl');
- $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
+ $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
+
+ require_once('view/acl_selectors.php');
+
+ $tpl = file_get_contents("view/jot.tpl");
- require_once('view/acl_selectors.php');
+ $o .= replace_macros($tpl,array(
+ '$return_path' => $a->cmd,
+ '$baseurl' => $a->get_baseurl(),
+ '$visitor' => 'block',
+ '$lockstate' => 'unlock',
+ '$acl' => populate_acl(),
+ '$profile_uid' => $_SESSION['uid']
+ ));
- $tpl = file_get_contents("view/jot.tpl");
- $o .= replace_macros($tpl,array(
- '$return_path' => $a->cmd,
- '$baseurl' => $a->get_baseurl(),
- '$visitor' => 'block',
- '$lockstate' => 'unlock',
- '$acl' => populate_acl(),
- '$profile_uid' => $_SESSION['uid']
- ));
+ $o .= '<div id="live-network"></div>' . "\r\n";
+ }
+ $r = q("UPDATE `item` SET `unseen` = 0
+ WHERE `unseen` = 1 AND `uid` = %d",
+ intval($_SESSION['uid'])
+ );
- $o .= '<div id="live-network"></div>' . "\r\n";
$sql_extra = '';
@@ -164,6 +169,9 @@ function network_content(&$a) {
));
}
}
- $o .= paginate($a);
+
+ if(! $update)
+ $o .= paginate($a);
+
return $o;
} \ No newline at end of file