MDL-36941 core_message: fixed minor CiBoT complaints
authorMark Nelson <markn@moodle.com>
Mon, 12 Mar 2018 05:10:39 +0000 (13:10 +0800)
committerMark Nelson <markn@moodle.com>
Fri, 23 Mar 2018 04:30:31 +0000 (12:30 +0800)
message/classes/api.php

index 0ffb93b..39a4461 100644 (file)
@@ -789,7 +789,7 @@ class api {
         $conversationid = null;
         $ignoremessages = false;
         if (!empty($fromuserid)) {
-            $conversationid = \core_message\api::get_conversation_between_users([$touserid, $fromuserid]);
+            $conversationid = self::get_conversation_between_users([$touserid, $fromuserid]);
             if (!$conversationid) { // If there is no conversation between the users then there are no messages to mark.
                 $ignoremessages = true;
             }
@@ -797,16 +797,16 @@ class api {
 
         if (!empty($type)) {
             if ($type == MESSAGE_TYPE_NOTIFICATION) {
-                \core_message\api::mark_all_notifications_as_read($touserid, $fromuserid);
+                self::mark_all_notifications_as_read($touserid, $fromuserid);
             } else if ($type == MESSAGE_TYPE_MESSAGE) {
                 if (!$ignoremessages) {
-                    \core_message\api::mark_all_messages_as_read($touserid, $conversationid);
+                    self::mark_all_messages_as_read($touserid, $conversationid);
                 }
             }
         } else { // We want both.
-            \core_message\api::mark_all_notifications_as_read($touserid, $fromuserid);
+            self::mark_all_notifications_as_read($touserid, $fromuserid);
             if (!$ignoremessages) {
-                \core_message\api::mark_all_messages_as_read($touserid, $conversationid);
+                self::mark_all_messages_as_read($touserid, $conversationid);
             }
         }
     }