From ef735275deff78006a38175f6ae6595178e04670 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 8 Aug 2016 12:15:23 +0800 Subject: [PATCH] MDL-54687 core_message: removed 'conversationsselected' variable --- message/classes/api.php | 2 +- .../classes/output/messagearea/contacts.php | 10 +---- message/externallib.php | 2 - .../message_area_contacts_area.mustache | 45 ++----------------- 4 files changed, 6 insertions(+), 53 deletions(-) diff --git a/message/classes/api.php b/message/classes/api.php index da0f61abc81..3f1eb8c05ac 100644 --- a/message/classes/api.php +++ b/message/classes/api.php @@ -81,7 +81,7 @@ class api { } } - return new \core_message\output\messagearea\contacts($userid, 0, $arrcontacts, false); + return new \core_message\output\messagearea\contacts($userid, 0, $arrcontacts); } /** diff --git a/message/classes/output/messagearea/contacts.php b/message/classes/output/messagearea/contacts.php index 5b946253f0a..f01df4ae0e7 100644 --- a/message/classes/output/messagearea/contacts.php +++ b/message/classes/output/messagearea/contacts.php @@ -51,24 +51,17 @@ class contacts implements templatable, renderable { */ protected $contacts; - /** - * Determines if the conversations have been selected. - */ - protected $conversationsselected; - /** * Constructor. * * @param int $userid The id of the user the contacts belong to * @param int $otheruserid The id of the user we are viewing * @param \core_message\output\messagearea\contact[] $contacts - * @param bool $conversationsselected */ - public function __construct($userid, $otheruserid, $contacts, $conversationsselected = true) { + public function __construct($userid, $otheruserid, $contacts) { $this->userid = $userid; $this->otheruserid = $otheruserid; $this->contacts = $contacts; - $this->conversationsselected = $conversationsselected; } public function export_for_template(\renderer_base $output) { @@ -84,7 +77,6 @@ class contacts implements templatable, renderable { } $data->contacts[] = $contactdata; } - $data->conversationsselected = $this->conversationsselected; return $data; } diff --git a/message/externallib.php b/message/externallib.php index d48470b30cb..c38c553dfb2 100644 --- a/message/externallib.php +++ b/message/externallib.php @@ -475,8 +475,6 @@ class core_message_external extends external_api { return new external_function_parameters( array( 'userid' => new external_value(PARAM_INT, 'The id of the user who we are viewing conversations for'), - 'conversationsselected' => new external_value(PARAM_BOOL, 'Determines if conversations were selected, - otherwise contacts were'), 'contacts' => new external_multiple_structure( new external_single_structure( array( diff --git a/message/templates/message_area_contacts_area.mustache b/message/templates/message_area_contacts_area.mustache index 6b941d82e88..ef11da4e336 100644 --- a/message/templates/message_area_contacts_area.mustache +++ b/message/templates/message_area_contacts_area.mustache @@ -4,54 +4,17 @@ -
- +
{{> core_message/message_area_contacts }}
{{! Hidden div to load the other tabs items in via JS when appropriate. }} - +
-