]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Diabook - move pause icon.
[friendica.git] / include / conversation.php
index 43d20a40144c7e1560886bf2f25c6c706bea454f..1de77feb1b1aec9c14dd0281a83abd7ece7c4de3 100644 (file)
@@ -865,11 +865,15 @@ function format_like($cnt,$arr,$type,$id) {
                $total = count($arr);
                if($total >= MAX_LIKERS)
                        $arr = array_slice($arr, 0, MAX_LIKERS - 1);
-               if($total < MAX_LIKERS)
-                       $arr[count($arr)-1] = t('and') . ' ' . $arr[count($arr)-1];
-               $str = implode(', ', $arr);
-               if($total >= MAX_LIKERS)
+               if($total < MAX_LIKERS) {
+                       $last = t('and') . ' ' . $arr[count($arr)-1];
+                       $arr2 = array_slice($arr, 0, -1);
+                       $str = implode(', ', $arr2) . ' ' . $last;
+               }
+               if($total >= MAX_LIKERS) {
+                       $str = implode(', ', $arr);
                        $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS );
+               }
                $str = (($type === 'like') ? sprintf( t('%s like this.'), $str) : sprintf( t('%s don\'t like this.'), $str));
                $o .= "\t" . '<div id="' . $type . 'list-' . $id . '" style="display: none;" >' . $str . '</div>';
        }