From: jerome Date: Fri, 9 Jan 2009 00:56:45 +0000 (+0000) Subject: online user block MDL-15325 optimize the display of the message icon/link (instantiat... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=59eaa9ac4949bbcca7e5bf25362c8089197d0384;p=moodle.git online user block MDL-15325 optimize the display of the message icon/link (instantiation out of a loop), merged from 1.9 --- diff --git a/blocks/online_users/block_online_users.php b/blocks/online_users/block_online_users.php index 7c65c47732..5d2a5c6b82 100644 --- a/blocks/online_users/block_online_users.php +++ b/blocks/online_users/block_online_users.php @@ -140,6 +140,12 @@ class block_online_users extends block_base { //Accessibility: Don't want 'Alt' text for the user picture; DO want it for the envelope/message link (existing lang string). //Accessibility: Converted
to
'; } - if (!empty($USER->id) and ($USER->id != $user->id) and !empty($CFG->messaging) and - has_capability('moodle/site:sendmessage', $context) and - !isguest() and $user->username != 'guest') { // Only when logged in and messaging active etc + if ($canshowicon and ($USER->id != $user->id) and $user->username != 'guest') { // Only when logged in and messaging active etc $this->content->text .= '
' .''. get_string('messageselectadd') .'
'; }