]> git.mxchange.org Git - friendica.git/commitdiff
rename $item_result to $result
authorDomovoy <domovoy@errlock.org>
Sun, 12 Aug 2012 14:32:02 +0000 (16:32 +0200)
committerDomovoy <domovoy@errlock.org>
Sun, 12 Aug 2012 14:32:02 +0000 (16:32 +0200)
object/Item.php

index 0ddafff2a9bf48905080d3aa0602d2aadd79db23..ecf7aba596d39f777450cbfebe43eb268753e3b8 100644 (file)
@@ -249,42 +249,40 @@ class Item extends BaseObject {
                $arr = array('item' => $item, 'output' => $tmp_item);
                call_hooks('display_item', $arr);
 
-               $item_result = $arr['output'];
+               $result = $arr['output'];
 
-               $item_result['children'] = array();
+               $result['children'] = array();
                $children = $this->get_children();
                $nb_children = count($children);
                if($nb_children > 0) {
                        foreach($this->get_children() as $child) {
-                               $item_result['children'][] = $child->get_template_data($alike, $dlike, $thread_level + 1);
+                               $result['children'][] = $child->get_template_data($alike, $dlike, $thread_level + 1);
                        }
                        // Collapse
                        if(($nb_children > 2) || ($thread_level > 1)) {
-                               $item_result['children'][0]['comment_firstcollapsed'] = true;
-                               $item_result['children'][0]['num_comments'] = sprintf( tt('%d comment','%d comments',$total_children),$total_children );
-                               $item_result['children'][0]['hide_text'] = t('show more');
+                               $result['children'][0]['comment_firstcollapsed'] = true;
+                               $result['children'][0]['num_comments'] = sprintf( tt('%d comment','%d comments',$total_children),$total_children );
+                               $result['children'][0]['hide_text'] = t('show more');
                                if($thread_level > 1) {
-                                       $item_result['children'][$nb_children - 1]['comment_lastcollapsed'] = true;
+                                       $result['children'][$nb_children - 1]['comment_lastcollapsed'] = true;
                                }
                                else {
-                                       $item_result['children'][$nb_children - 3]['comment_lastcollapsed'] = true;
+                                       $result['children'][$nb_children - 3]['comment_lastcollapsed'] = true;
                                }
                        }
                }
                
-               $item_result['private'] = $item['private'];
-               $item_result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : '');
+               $result['private'] = $item['private'];
+               $result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : '');
 
                if(get_config('system','thread_allow')) {
-                       $item_result['flatten'] = false;
-                       $item_result['threaded'] = true;
+                       $result['flatten'] = false;
+                       $result['threaded'] = true;
                }
                else {
-                       $item_result['flatten'] = true;
-                       $item_result['threaded'] = false;
+                       $result['flatten'] = true;
+                       $result['threaded'] = false;
                }
-               
-               $result = $item_result;
 
                return $result;
        }