From: moodler Date: Fri, 17 Oct 2003 08:55:16 +0000 (+0000) Subject: Made comments link smaller, and also prints "1 comment" and "2 comments" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c1e97fe5916d874564a5d9d6c9744e9510a5567b;p=moodle.git Made comments link smaller, and also prints "1 comment" and "2 comments" --- diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index a947486343..70a1fc64e6 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -182,7 +182,7 @@ function glossary_get_entries($glossaryid, $entrylist) { AND id IN ($entrylist)"); } -function glossary_print_entry($course, $cm, $glossary, $entry,$currentview="",$cat="") { +function glossary_print_entry($course, $cm, $glossary, $entry, $currentview="",$cat="") { global $THEME, $USER, $CFG; $permissiongranted = 0; @@ -238,8 +238,14 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview echo ""; echo "
"; $count = count_records("glossary_comments","entryid",$entry->id); - if ( $count ) { - echo "id&eid=$entry->id\">$count " . get_string("comments","glossary") . ""; + if ($count) { + echo "id&eid=$entry->id\">$count "; + if ($count == 1) { + print_string("comment", "glossary"); + } else { + print_string("comments", "glossary"); + } + echo ""; } echo "";