]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Merge remote-tracking branch 'upstream/master'
[friendica.git] / include / conversation.php
index 7c4e606a72e4b50b0f8b9f7b2854a68ae71ba833..cc66d380b7561463670beca0c3e8203a729b41f6 100644 (file)
@@ -896,26 +896,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)