]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
* Add MIME types for file attachments
[friendica.git] / include / conversation.php
index 9420d8b74af67ded54cceef675ef98162a9b8c16..e659ca04d93e44b8c006755cccc2142aa538721c 100644 (file)
@@ -877,26 +877,21 @@ function format_like($cnt,$arr,$type,$id) {
        if($cnt == 1)
                $o .= (($type === 'like') ? sprintf( t('%s likes this.'), $arr[0]) : sprintf( t('%s doesn\'t like this.'), $arr[0])) . EOL ;
        else {
-               //$spanatts = 'class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');"';
+               $spanatts = "class=\"fakelink\" onclick=\"openClose('{$type}list-$id');\"";
                switch($type) {
                        case 'like':
-//                             $phrase = sprintf( t('<span  %1$s>%2$d people</span> like this.'), $spanatts, $cnt);
-                               $mood = t('like this');
+                               $phrase = sprintf( t('<span  %1$s>%2$d people</span> like this'), $spanatts, $cnt);
                                break;
                        case 'dislike':
-//                             $phrase = sprintf( t('<span  %1$s>%2$d people</span> don\'t like this.'), $spanatts, $cnt);
-                               $mood = t('don\'t like this');
+                               $phrase = sprintf( t('<span  %1$s>%2$d people</span> don\'t like this'), $spanatts, $cnt);
                                break;
                }
-               $tpl = get_markup_template("voting_fakelink.tpl");
-               $phrase = replace_macros($tpl, array(
-                       '$vote_id' => $type . 'list-' . $id,
-                       '$count' => $cnt,
-                       '$people' => t('people'),
-                       '$vote_mood' => $mood
+               $phrase .= EOL ;
+               $o .= replace_macros(get_markup_template('voting_fakelink.tpl'), array(
+                       '$phrase' => $phrase,
+                       '$type' => $type,
+                       '$id' => $id
                ));
-               $o .= $phrase;
-//             $o .= EOL ;
 
                $total = count($arr);
                if($total >= MAX_LIKERS)