]> git.mxchange.org Git - friendica.git/commitdiff
Use constant instead of hardcoded string for ACTIVITY_POST
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 19 Nov 2017 13:41:33 +0000 (08:41 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 19 Nov 2017 13:41:33 +0000 (08:41 -0500)
include/conversation.php

index 31ab4eadecbcd19ae5f588b25464dfd142318486..2e6da4ce9004d301cf1a7e42a8a9dde870c37cb4 100644 (file)
@@ -1459,7 +1459,7 @@ function smart_flatten_conversation(array $parent)
                if (isset($child['children']) && count($child['children'])) {
                        // This helps counting only the regular posts
                        $count_post_closure = function($var) {
-                               return $var['verb'] === 'http://activitystrea.ms/schema/1.0/post';
+                               return $var['verb'] === ACTIVITY_POST;
                        };
 
                        $child_post_count = count(array_filter($child['children'], $count_post_closure));
@@ -1471,7 +1471,7 @@ function smart_flatten_conversation(array $parent)
 
                                // Searches the post item in the children
                                $j = 0;
-                               while($child['children'][$j]['verb'] !== 'http://activitystrea.ms/schema/1.0/post' && $j < count($child['children'])) {
+                               while($child['children'][$j]['verb'] !== ACTIVITY_POST && $j < count($child['children'])) {
                                        $j ++;
                                }