public static function update_conversation_name(int $conversationid, string $name) {
        global $DB;

        if ($conversation = $DB->get_record('message_conversations', array('id' => $conversationid))) {
            if ($name <> $conversation->name) {
                $conversation->name = $name;
                $conversation->timemodified = time();
                $DB->update_record('message_conversations', $conversation);
            }
        }
    }
public static function update_conversation_name(int $conversationid, string $name) {
        global $DB;

        if ($conversation = $DB->get_record('message_conversations', array('id' => $conversationid))) {
            if ($name <> $conversation->name) {
                $conversation->name = $name;
                $conversation->timemodified = time();
                $DB->update_record('message_conversations', $conversation);
            }
        }
    }
public static function update_conversation_name ( int $ conversationid , string $ name ) { global $ DB ; if ( $ conversation = $ DB -> get_record ( 'message_conversations' , array ( 'id' => $ conversationid ) ) ) { if ( $ name <> $ conversation -> name ) { $ conversation -> name = $ name ; $ conversation -> timemodified = time ( ) ; $ DB -> update_record ( 'message_conversations' , $ conversation ) ; } } }
Update the name of a conversation.

@param int $conversationid The id of a conversation.
@param string $name The main name of the area
@return void
Update the name of a conversation .