Namespaces |
| namespace | moodlecore |
Variables |
if(isguestuser()) if(empty($CFG->
messaging)) | $usergroup = optional_param('usergroup', MESSAGE_VIEW_UNREAD_MESSAGES, PARAM_ALPHANUMEXT) |
| | $viewing = optional_param('viewing', $usergroup, PARAM_ALPHANUMEXT) |
| | $history = optional_param('history', MESSAGE_HISTORY_SHORT, PARAM_INT) |
| | $search = optional_param('search', '', PARAM_CLEAN) |
| | $user1id = optional_param('user1', $USER->id, PARAM_INT) |
| | $user2id = optional_param('user2', 0, PARAM_INT) |
| | $addcontact = optional_param('addcontact', 0, PARAM_INT) |
| | $removecontact = optional_param('removecontact', 0, PARAM_INT) |
| | $blockcontact = optional_param('blockcontact', 0, PARAM_INT) |
| | $unblockcontact = optional_param('unblockcontact', 0, PARAM_INT) |
| | $advancedsearch = optional_param('advanced', 0, PARAM_INT) |
| | $page = optional_param('page', 0, PARAM_INT) |
| | $url = new moodle_url('/message/index.php') |
| | $context = get_context_instance(CONTEXT_SYSTEM) |
| | $user1 = null |
| | $currentuser = true |
| | $showcontactactionlinks = true |
| | $user2 = null |
if($user1->id!=$USER->id
&&(!empty($user2)&&$user2->id!=$USER->
id)&&!has_capability('moodle/site:readallmessages',
$context)) if($addcontact and
confirm_sesskey()) if($removecontact
and confirm_sesskey()) if($blockcontact
and confirm_sesskey()) if($unblockcontact
and confirm_sesskey()) | $messageerror = null |
| | Process any contact maintenance requests there may be.
|
if($currentuser &&!empty($user2)&&has_capability('moodle/site:sendmessage',
$context)) | $strmessages = get_string('messages', 'message') |
| | $countunread = 0 |
| | $countunreadtotal = 0 |
| | $viewingnewmessages = false |
if($countunreadtotal==0
&&$viewing==MESSAGE_VIEW_UNREAD_MESSAGES
&&empty($user2)) | $blockedusers = message_get_blocked_users($user1, $user2) |
| | $countblocked = count($blockedusers) |
if(!empty($user2)) else if($viewing==MESSAGE_VIEW_SEARCH)
else if($viewing==MESSAGE_VIEW_RECENT_CONVERSATIONS)
else | if ($viewing==MESSAGE_VIEW_RECENT_NOTIFICATIONS) |