From 13538cdd21c6e13a2ff108f1b42dbecaab8b375a Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 17 Nov 2013 19:22:24 -0800 Subject: pull in some posts when we first connect with a new channel (if allowed to) - if not allowed to, do it if that condition changes --- mod/follow.php | 6 ++++++ mod/item.php | 8 -------- mod/network.php | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'mod') diff --git a/mod/follow.php b/mod/follow.php index 1d29dab2e..364fe76b9 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -24,6 +24,12 @@ function follow_init(&$a) { info( t('Channel added.') . EOL); + // If we can view their stream, pull in some posts + + if($result['abook']['abook_their_perms'] & PERMS_R_STREAM) + proc_run('php','include/onepoll.php',$result['abook']['abook_id']); + + goaway(z_root() . '/connections/' . $result['abook']['abook_id']); } diff --git a/mod/item.php b/mod/item.php index b564c7545..7eebbe287 100644 --- a/mod/item.php +++ b/mod/item.php @@ -774,14 +774,6 @@ function item_post(&$a) { // NOTREACHED } - // update the commented timestamp on the parent - - q("UPDATE `item` set `commented` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($parent) - ); - $page_type = ''; if($webpage & ITEM_WEBPAGE) diff --git a/mod/network.php b/mod/network.php index 81b38a5ae..9ee21dc05 100644 --- a/mod/network.php +++ b/mod/network.php @@ -512,7 +512,7 @@ function network_content(&$a, $update = 0, $load = false) { . "'; var profile_page = " . $a->pager['page'] . ";"; -logger('Search: ' . $search); + $a->page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( '$baseurl' => z_root(), @@ -734,7 +734,7 @@ logger('Search: ' . $search); $o .= alt_pager($a,count($items)); if($load) { - logger('mod_network: load: ' . count($items) . ' items', LOGGER_DATA); +// logger('mod_network: load: ' . count($items) . ' items', LOGGER_DATA); profiler($start,$first,'network parents'); profiler($first,$second,'network children'); -- cgit v1.2.3