From c4b292a4f103eb049c13dbe3c62f0438c18de816 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 22 Mar 2011 03:07:46 -0700 Subject: account/profile/contacts export --- mod/settings.php | 5 +++++ mod/uexport.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 mod/uexport.php (limited to 'mod') diff --git a/mod/settings.php b/mod/settings.php index 6a2733d7c..b20f4d11b 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -5,6 +5,7 @@ function settings_init(&$a) { if(local_user()) { profile_load($a,$a->user['nickname']); } + } @@ -341,9 +342,13 @@ function settings_content(&$a) { $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); + $uexport = ''; + + $o .= replace_macros($stpl,array( '$baseurl' => $a->get_baseurl(), '$oidhtml' => $oidhtml, + '$uexport' => $uexport, '$uid' => local_user(), '$username' => $username, '$openid' => $openid, diff --git a/mod/uexport.php b/mod/uexport.php new file mode 100644 index 000000000..423c3a82f --- /dev/null +++ b/mod/uexport.php @@ -0,0 +1,48 @@ + $v) + $user[$k] = $v; + + } + $contact = array(); + $r = q("SELECT * FROM `contact` WHERE `uid` = %d ", + local_user() + ); + if(count($r)) { + foreach($r as $rr) + foreach($rr as $k => $v) + $contact[][$k] = $v; + + } + + $profile = array(); + $r = q("SELECT * FROM `profile` WHERE `uid` = %d ", + local_user() + ); + if(count($r)) { + foreach($r as $rr) + foreach($rr as $k => $v) + $profile[][$k] = $v; + } + + + + $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile); + + header("Content-type: text/json"); + echo str_replace('\\/','/',json_encode($output)); + + killme(); + +} \ No newline at end of file -- cgit v1.2.3 From 83a36cbd13a7c59b30164424579592a457cec7f5 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 22 Mar 2011 03:20:41 -0700 Subject: export posts also --- mod/uexport.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/uexport.php b/mod/uexport.php index 423c3a82f..d8141534a 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -36,9 +36,19 @@ function uexport_init(&$a) { $profile[][$k] = $v; } + $item = array(); + $r = q("SELECT * FROM `item` WHERE `uid` = %d ", + local_user() + ); + if(count($r)) { + foreach($r as $rr) + foreach($rr as $k => $v) + $item[][$k] = $v; + } + - $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile); + $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile, 'item' => $item ); header("Content-type: text/json"); echo str_replace('\\/','/',json_encode($output)); -- cgit v1.2.3 From f20464112f274d720649c2f92480cc235df4db19 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 22 Mar 2011 03:25:43 -0700 Subject: remove items from export - too much memory consumed, will have to stream items,photos --- mod/uexport.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'mod') diff --git a/mod/uexport.php b/mod/uexport.php index d8141534a..d8f931593 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -36,19 +36,7 @@ function uexport_init(&$a) { $profile[][$k] = $v; } - $item = array(); - $r = q("SELECT * FROM `item` WHERE `uid` = %d ", - local_user() - ); - if(count($r)) { - foreach($r as $rr) - foreach($rr as $k => $v) - $item[][$k] = $v; - } - - - - $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile, 'item' => $item ); + $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile ); header("Content-type: text/json"); echo str_replace('\\/','/',json_encode($output)); -- cgit v1.2.3 From 8f31935b7da523ba03b51459d7596fc5e6eb2854 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 22 Mar 2011 16:19:00 -0700 Subject: items back in personal data download, chunked this time --- mod/uexport.php | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/uexport.php b/mod/uexport.php index d8f931593..fdd7fcec6 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -17,7 +17,7 @@ function uexport_init(&$a) { } $contact = array(); $r = q("SELECT * FROM `contact` WHERE `uid` = %d ", - local_user() + intval(local_user()) ); if(count($r)) { foreach($r as $rr) @@ -28,7 +28,7 @@ function uexport_init(&$a) { $profile = array(); $r = q("SELECT * FROM `profile` WHERE `uid` = %d ", - local_user() + intval(local_user()) ); if(count($r)) { foreach($r as $rr) @@ -41,6 +41,32 @@ function uexport_init(&$a) { header("Content-type: text/json"); echo str_replace('\\/','/',json_encode($output)); + $r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ", + intval(local_user()) + ); + if(count($r)) + $total = $r[0]['total']; + + // chunk the output to avoid exhausting memory + + for($x = 0; $x < $total; $x += 500) { + $item = array(); + $r = q("SELECT * FROM `item` WHERE `uid` = %d LIMIT %d, %d", + intval(local_user()), + intval($x), + intval(500) + ); + if(count($r)) { + foreach($r as $rr) + foreach($rr as $k => $v) + $item[][$k] = $v; + } + + $output = array('item' => $item); + echo str_replace('\\/','/',json_encode($output)); + } + + killme(); } \ No newline at end of file -- cgit v1.2.3 From e0202d82a1e33dc2c2ed5b8fcec46440cc905d3f Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 22 Mar 2011 16:34:12 -0700 Subject: add fulltext index on keywords, missed some directory localisations --- mod/directory.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/directory.php b/mod/directory.php index 825e2a375..72c30fb31 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -86,10 +86,10 @@ function directory_content(&$a) { } if(strlen($rr['dob'])) { if(($years = age($rr['dob'],$rr['timezone'],'')) != 0) - $details .= "
Age: $years" ; + $details .= '
' . t('Age: ') . $years ; } if(strlen($rr['gender'])) - $details .= '
Gender: ' . $rr['gender']; + $details .= '
' . t('Gender: ') . $rr['gender']; $entry = replace_macros($tpl,array( '$id' => $rr['id'], @@ -115,7 +115,7 @@ function directory_content(&$a) { } else - notice("No entries (some entries may be hidden)."); + notice( t("No entries \x28some entries may be hidden\x29.") . EOL); return $o; } \ No newline at end of file -- cgit v1.2.3 From 85e227151bc7d02a625ecf8f61d4567e8b455f67 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 22 Mar 2011 16:52:14 -0700 Subject: use correct mime type for json --- mod/uexport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/uexport.php b/mod/uexport.php index fdd7fcec6..96f062c41 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -38,7 +38,7 @@ function uexport_init(&$a) { $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile ); - header("Content-type: text/json"); + header("Content-type: application/json"); echo str_replace('\\/','/',json_encode($output)); $r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ", -- cgit v1.2.3 From 51447932f707e1d0177ee4700266285ed80be2f6 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 24 Mar 2011 01:16:14 -0700 Subject: link same as visited --- mod/profile.php | 1 - 1 file changed, 1 deletion(-) (limited to 'mod') diff --git a/mod/profile.php b/mod/profile.php index 4b5f92a1f..d33c9aeb2 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -437,6 +437,5 @@ function profile_content(&$a, $update = 0) { $o .= paginate($a); $o .= '
' . t('Shared content is covered by the Creative Commons Attribution 3.0 license.') . '
'; - return $o; } -- cgit v1.2.3 From 6bc5d6f17b9d86d909cf43cde0a399b17c46bbf5 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 24 Mar 2011 15:45:27 -0700 Subject: repair duplicate nickname accounts caused by race condition --- mod/register.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mod') diff --git a/mod/register.php b/mod/register.php index 95e9d581f..06ed1e0f1 100644 --- a/mod/register.php +++ b/mod/register.php @@ -199,6 +199,24 @@ function register_post(&$a) { return; } + /** + * if somebody clicked submit twice very quickly, they could end up with two accounts + * due to race condition. Remove this one. + */ + + $r = q("SELECT `uid` FROM `user` + WHERE `nickname` = '%s' ", + dbesc($nickname) + ); + if((count($r) > 1) && $newuid) { + $err .= t('Nickname is already registered. Please choose another.') . EOL; + q("DELETE FROM `user` WHERE `uid` = %d LIMIT 1", + intval($newuid) + ); + notice ($err); + return; + } + if(x($newuid) !== false) { $r = q("INSERT INTO `profile` ( `uid`, `profile-name`, `is-default`, `name`, `photo`, `thumb`, `publish`, `net-publish` ) VALUES ( %d, '%s', %d, '%s', '%s', '%s', %d, %d ) ", -- cgit v1.2.3 From 76918ed5a59ac52486531f8bf4efec1180fc9d59 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 27 Mar 2011 16:35:56 -0700 Subject: info page --- mod/friendika.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 mod/friendika.php (limited to 'mod') diff --git a/mod/friendika.php b/mod/friendika.php new file mode 100644 index 000000000..4a8240a11 --- /dev/null +++ b/mod/friendika.php @@ -0,0 +1,47 @@ +Friendika'; + + + $o .= '

'; + + $o .= 'View License' . '

'; + $o .= t('This is Friendika version') . ' ' . FRIENDIKA_VERSION . ' '; + $o .= t('running at web location') . ' ' . $a->get_baseurl() . '

'; + + $o .= t('Shared content within the Friendika network is provided under the Creative Commons Attribution 3.0 license') . '

'; + + $o .= t('Please visit Project.Friendika.com to learn more about the Friendika project.') . '

'; + + $o .= t('Bug reports and issues: please visit') . ' ' . 'Bugs.Friendika.com

'; + $o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendika - dot com') . '

'; + + $o .= '

'; + + if(count($a->plugins)) { + $o .= '

' . t('Installed plugins/addons/apps') . '

'; + $o .= '
    '; + foreach($a->plugins as $p) + if(strlen($p)) + $o .= '
  • ' . $p . '
  • '; + $o .= '
'; + } + else + $o .= '

' . t('No installed plugins/addons/apps'); + + return $o; + + + + + + + + + + + +} \ No newline at end of file -- cgit v1.2.3 From c962f5c4bcc26fa7bad98a714cdb5e92b6acb57c Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 27 Mar 2011 19:53:36 -0700 Subject: comment collapsing, pagination wasn't advancing past 16 --- mod/network.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++--------- mod/profile.php | 66 +++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 119 insertions(+), 19 deletions(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 97bc0713d..08bc5af4c 100644 --- a/mod/network.php +++ b/mod/network.php @@ -183,8 +183,11 @@ function network_content(&$a, $update = 0) { intval($_SESSION['uid']) ); - if(count($r)) + if(count($r)) { $a->set_pager_total($r[0]['total']); + $a->set_pager_itemspage(40); + } + if($nouveau) { $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, @@ -203,21 +206,41 @@ function network_content(&$a, $update = 0) { ); } else { - $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, - `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, - `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, - `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` - FROM `item`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent`=`p`.`id`) as `parentitem`, `contact` + $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact_uid` + FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 - AND `contact`.`id` = `item`.`contact-id` AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND `item`.`parent` = `parentitem`.`id` + AND `item`.`parent` = `item`.`id` $sql_extra - ORDER BY `parentitem`.`created` DESC, `item`.`gravity` ASC, `item`.`created` ASC LIMIT %d ,%d ", + ORDER BY `item`.`created` DESC LIMIT %d ,%d ", intval(local_user()), intval($a->pager['start']), intval($a->pager['itemspage']) ); + + $parents_arr = array(); + $parents_str = ''; + + if(count($r)) { + foreach($r as $rr) + $parents_arr[] = $rr['item_id']; + $parents_str = implode(', ', $parents_arr); + + $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, + `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, + `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, + `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` + FROM `item`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent`=`p`.`id`) as `parentitem`, `contact` + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 + AND `contact`.`id` = `item`.`contact-id` + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + AND `item`.`parent` = `parentitem`.`id` AND `item`.`parent` IN ( %s ) + $sql_extra + ORDER BY `parentitem`.`created` DESC, `item`.`gravity` ASC, `item`.`created` ASC ", + intval(local_user()), + dbesc($parents_str) + ); + } } $author_contacts = extract_item_authors($r,local_user()); @@ -302,15 +325,25 @@ function network_content(&$a, $update = 0) { } - + $comments = array(); + foreach($r as $rr) { + if(intval($rr['gravity']) == 6) { + if(! x($comments,$rr['parent'])) + $comments[$rr['parent']] = 1; + else + $comments[$rr['parent']] += 1; + } + } foreach($r as $item) { like_puller($a,$item,$alike,'like'); like_puller($a,$item,$dlike,'dislike'); } + $comments_collapsed = false; foreach($r as $item) { + $comment = ''; $template = $tpl; $commentww = ''; @@ -320,9 +353,26 @@ function network_content(&$a, $update = 0) { if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) && ($item['id'] != $item['parent'])) continue; - $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; + if($item['id'] == $item['parent']) { + $comments_seen = 0; + $comments_collapsed = false; + } + else + $comments_seen ++; + + if(($comments[$item['parent']] > 2) && ($comments_seen <= ($comments[$item['parent']] - 2)) && ($item['gravity'] == 6)) { + if(! $comments_collapsed) { + $o .= '

'; + $o .= ''; + } + $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) diff --git a/mod/profile.php b/mod/profile.php index d33c9aeb2..9544512ba 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -243,31 +243,52 @@ function profile_content(&$a, $update = 0) { FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `wall` = 1 ) + AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1 $sql_extra ", intval($a->profile['profile_uid']) ); - if(count($r)) + if(count($r)) { $a->set_pager_total($r[0]['total']); + $a->set_pager_itemspage(40); + } - $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, - `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`, - `contact`.`thumb`, `contact`.`self`, - `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` + $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact-uid` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `wall` = 1 ) + AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1 $sql_extra - ORDER BY `parent` DESC, `gravity` ASC, `id` ASC LIMIT %d ,%d ", + LIMIT %d ,%d ", intval($a->profile['profile_uid']), intval($a->pager['start']), intval($a->pager['itemspage']) ); + $parents_arr = array(); + $parents_str = ''; + + if(count($r)) { + foreach($r as $rr) + $parents_arr[] = $rr['item_id']; + $parents_str = implode(', ', $parents_arr); + + $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, + `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`, + `contact`.`thumb`, `contact`.`self`, + `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` + FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + AND `item`.`parent` IN ( %s ) + $sql_extra + ORDER BY `parent` DESC, `gravity` ASC, `item`.`id` ASC ", + intval($a->profile['profile_uid']), + dbesc($parents_str) + ); + } if($is_owner && ! $update) $o .= get_birthdays(); @@ -292,6 +313,16 @@ function profile_content(&$a, $update = 0) { if($r !== false && count($r)) { + $comments = array(); + foreach($r as $rr) { + if(intval($rr['gravity']) == 6) { + if(! x($comments,$rr['parent'])) + $comments[$rr['parent']] = 1; + else + $comments[$rr['parent']] += 1; + } + } + foreach($r as $item) { like_puller($a,$item,$alike,'like'); like_puller($a,$item,$dlike,'dislike'); @@ -311,6 +342,25 @@ function profile_content(&$a, $update = 0) { && ($item['id'] != $item['parent'])) continue; + if($item['id'] == $item['parent']) { + $comments_seen = 0; + $comments_collapsed = false; + } + else + $comments_seen ++; + + + if(($comments[$item['parent']] > 2) && ($comments_seen <= ($comments[$item['parent']] - 2)) && ($item['gravity'] == 6)) { + if(! $comments_collapsed) { + $o .= ''; + $o .= ''; + } + $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) ? '
' . t('Private Message') . '
' -- cgit v1.2.3 From b57214cb783ca2f741760a2ccfbd01babfbd165b Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 27 Mar 2011 19:59:27 -0700 Subject: wrong date order profile page --- mod/profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/profile.php b/mod/profile.php index 9544512ba..8fb483007 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -260,7 +260,7 @@ function profile_content(&$a, $update = 0) { AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1 $sql_extra - LIMIT %d ,%d ", + ORDER BY `item`.`created` DESC LIMIT %d ,%d ", intval($a->profile['profile_uid']), intval($a->pager['start']), intval($a->pager['itemspage']) -- cgit v1.2.3 From 7defb1768bff1c3da7ea63957cf8c7c928d379ab Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 27 Mar 2011 20:37:44 -0700 Subject: collapse posts by same author (but not you). --- mod/network.php | 21 +++++++++++++++++++-- mod/profile.php | 2 ++ 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 08bc5af4c..21b818f9c 100644 --- a/mod/network.php +++ b/mod/network.php @@ -325,6 +325,7 @@ function network_content(&$a, $update = 0) { } + $comments = array(); foreach($r as $rr) { if(intval($rr['gravity']) == 6) { @@ -341,9 +342,11 @@ function network_content(&$a, $update = 0) { } $comments_collapsed = false; + $blowhard = 0; + $blowhard_count = 0; + foreach($r as $item) { - $comment = ''; $template = $tpl; $commentww = ''; @@ -354,6 +357,20 @@ function network_content(&$a, $update = 0) { continue; if($item['id'] == $item['parent']) { + if($blowhard == $item['cid'] && (! $item['self'])) { + $blowhard_count ++; + if($blowhard_count == 3) { + $o .= '' . ''; + } + } + $comments_seen = 0; $comments_collapsed = false; } @@ -369,7 +386,7 @@ function network_content(&$a, $update = 0) { } } if(($comments[$item['parent']] > 2) && ($comments_seen == ($comments[$item['parent']] - 1))) { - $o .= ''; + $o .= ''; } $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; diff --git a/mod/profile.php b/mod/profile.php index 8fb483007..1101c6998 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -328,6 +328,8 @@ function profile_content(&$a, $update = 0) { like_puller($a,$item,$dlike,'dislike'); } + $comments_collapsed = false; + foreach($r as $item) { $sparkle = ''; -- cgit v1.2.3 From 77fbd2f78c6a24201a26d5c4ec60ad5fb42c48dd Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 27 Mar 2011 20:43:45 -0700 Subject: tweaks to author collapsing --- mod/network.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 21b818f9c..f68b399f8 100644 --- a/mod/network.php +++ b/mod/network.php @@ -365,10 +365,9 @@ function network_content(&$a, $update = 0) { } else { $blowhard = $item['cid']; - if($blowhard_count > 3) { - $blowhard_count = 0; + if($blowhard_count > 3) $o .= ''; - } + $blowhard_count = 0; } $comments_seen = 0; -- cgit v1.2.3 From 1f6c6c466a449ba422c4e67744577f6c35b3ce0b Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 28 Mar 2011 00:49:20 -0700 Subject: author collapse: close off before pagination --- mod/network.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index f68b399f8..17d36dfb2 100644 --- a/mod/network.php +++ b/mod/network.php @@ -546,6 +546,10 @@ function network_content(&$a, $update = 0) { } if(! $update) { + if($blowhard_count > 3) + $o .= ''; + + $o .= paginate($a); $o .= '
' . t('Shared content is covered by the Creative Commons Attribution 3.0 license.') . '
'; } -- cgit v1.2.3