aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/conversation.php')
-rwxr-xr-xinclude/conversation.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 526c6ea00..4b2ca316b 100755
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -375,7 +375,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$comments[$item['parent']] = 1;
else
$comments[$item['parent']] += 1;
- }
+ } elseif(! x($comments,$item['parent']))
+ $comments[$item['parent']] = 0; // avoid notices later on
}
// map all the like/dislike activities for each parent item
@@ -915,7 +916,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
$o .= replace_macros($tpl,array(
'$return_path' => $a->cmd,
'$action' => $a->get_baseurl().'/item',
- '$share' => (($x['button']) ? $x['button'] : t('Share')),
+ '$share' => (x($x,'button') ? $x['button'] : t('Share')),
'$upload' => t('Upload photo'),
'$shortupload' => t('upload photo'),
'$attach' => t('Attach file'),
@@ -980,8 +981,8 @@ function conv_sort($arr,$order) {
usort($parents,'sort_thr_commented');
if(count($parents))
- foreach($parents as $x)
- $x['children'] = array();
+ foreach($parents as $i=>$_x)
+ $parents[$i]['children'] = array();
foreach($arr as $x) {
if($x['id'] != $x['parent']) {