From 476675e2117d169549573523101b33e8a9cd8f3d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 17 Jun 2014 21:51:20 -0700 Subject: get rid of some old crap --- mod/network.php | 61 ++++----------------------------------------------------- 1 file changed, 4 insertions(+), 57 deletions(-) diff --git a/mod/network.php b/mod/network.php index 8202b1044..f12471467 100644 --- a/mod/network.php +++ b/mod/network.php @@ -104,7 +104,6 @@ function network_content(&$a, $update = 0, $load = false) { $file = ((x($_GET,'file')) ? $_GET['file'] : ''); - if(x($_GET,'search') || x($_GET,'file')) $nouveau = true; if($cid) @@ -205,25 +204,11 @@ function network_content(&$a, $update = 0, $load = false) { // 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 .= ""; - + if($gid || $cid || $cmin || ($cmax != 99) || $star || $liked || $conv || $spam || $nouveau || $list) + $firehose = 0; + $o .= '
' . "\r\n"; + $o .= ""; $a->page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( '$baseurl' => z_root(), @@ -329,13 +314,10 @@ function network_content(&$a, $update = 0, $load = false) { $uids = " and item.uid = " . local_user() . " "; } - $simple_update = (($update) ? " and ( item.item_flags & " . intval(ITEM_UNSEEN) . " ) " : ''); if($load) $simple_update = ''; - $start = dba_timer(); - if($nouveau && $load) { // "New Item View" - show all items unthreaded in reverse created date order @@ -389,8 +371,6 @@ function network_content(&$a, $update = 0, $load = false) { } } - $first = dba_timer(); - // Then fetch all the children of the parents that are on this page $parents_str = ''; $update_unseen = ''; @@ -406,22 +386,9 @@ function network_content(&$a, $update = 0, $load = false) { dbesc($parents_str) ); - $second = dba_timer(); - xchan_query($items); - - $third = dba_timer(); - $items = fetch_post_tags($items,true); - - $fourth = dba_timer(); - $items = conv_sort($items,$ordering); - - - - //logger('items: ' . print_r($items,true)); - } else { $items = array(); @@ -432,8 +399,6 @@ function network_content(&$a, $update = 0, $load = false) { } -// logger('items: ' . count($items)); - if(($update_unseen) && (! $firehose)) $r = q("UPDATE `item` SET item_flags = ( item_flags ^ %d) WHERE (item_flags & %d) AND `uid` = %d $update_unseen ", @@ -444,28 +409,10 @@ function network_content(&$a, $update = 0, $load = false) { $mode = (($nouveau) ? 'network-new' : 'network'); - $fifth = dba_timer(); - $o .= conversation($a,$items,$mode,$update,'client'); - $sixth = dba_timer(); - - if(($items) && (! $update)) $o .= alt_pager($a,count($items)); - if($load) { -// logger('mod_network: load: ' . count($items) . ' items', LOGGER_DATA); - - profiler($start,$first,'network parents'); - profiler($first,$second,'network children'); - profiler($second,$third,'network authors'); - profiler($third,$fourth,'network tags'); - profiler($fourth,$fifth,'network sort'); - profiler($fifth,$sixth,'network render'); - profiler($start,$sixth,'network total'); - profiler(1,1,'-- ' . count($items)); - } - return $o; } -- cgit v1.2.3