aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 832618c91..45bac146e 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -216,16 +216,17 @@ dbg(2);
$tpl = file_get_contents('view/wall_item.tpl');
if(count($r)) {
- foreach($r as $rr) {
+ for($x = 0; $x < count($r); $x ++) {
+ $rr = $r[$x];
+ $comment = '';
if(can_write_wall($a,$a->profile['profile_uid'])) {
- $comment = replace_macros($template,array(
- '$id' => $rr['item_id'],
- '$parent' => $rr['parent'],
- '$profile_uid' => $a->profile['profile_uid']
- ));
- }
- else {
- $comment = '';
+ if((($x + 1) < count($r)) && ($r[$x+1]['parent'] != $rr['parent'])) {
+ $comment = replace_macros($template,array(
+ '$id' => $rr['item_id'],
+ '$parent' => $rr['parent'],
+ '$profile_uid' => $a->profile['profile_uid']
+ ));
+ }
}
$o .= item_display($a,$rr,$tpl,$comment);
}