From 757ca5014cc6329b53d5a8f6e6b7a1a19952f0f2 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 24 Nov 2011 17:32:45 -0800 Subject: [PATCH] move liveupdate after birthdays/events --- mod/network.php | 18 ++++++++++++++++++ mod/profile.php | 18 ++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/mod/network.php b/mod/network.php index 763b3693f4..b6440cabbf 100644 --- a/mod/network.php +++ b/mod/network.php @@ -342,6 +342,24 @@ function network_content(&$a, $update = 0) { $o .= get_events(); } + if(! $update) { + // The special div is needed for liveUpdate to kick in for this page. + // We only launch liveUpdate if you aren't filtering in some incompatible + // way and also you aren't writing a comment (discovered in javascript). + + $o .= '
' . "\r\n"; + $o .= "\r\n"; + } + $sql_extra2 = (($nouveau) ? '' : " AND `item`.`parent` = `item`.`id` "); if(x($_GET,'search')) { diff --git a/mod/profile.php b/mod/profile.php index f68006af54..f35ef3653f 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -148,14 +148,6 @@ function profile_content(&$a, $update = 0) { $o .= status_editor($a,$x); } - // This is ugly, but we can't pass the profile_uid through the session to the ajax updater, - // because browser prefetching might change it on us. We have to deliver it with the page. - - if($tab === 'posts') { - $o .= '
' . "\r\n"; - $o .= "\r\n"; - } } if($is_owner) { @@ -229,6 +221,16 @@ function profile_content(&$a, $update = 0) { $o .= get_events(); } + if((! $update) && ($tab === 'posts')) { + + // This is ugly, but we can't pass the profile_uid through the session to the ajax updater, + // because browser prefetching might change it on us. We have to deliver it with the page. + + $o .= '
' . "\r\n"; + $o .= "\r\n"; + } + $o .= conversation($a,$r,'profile',$update); if(! $update) {