original_string: protected function get_discussion($discussionid) {
          global $DB;
  
          if (empty($this->discussionsdata[$discussionid])) {
              $this->discussionsdata[$discussionid] = $DB->get_record('forum_discussions',
                  array('id' => $discussionid), '*', MUST_EXIST);
          }
          return $this->discussionsdata[$discussionid];
      }
code: protected function get_discussion($discussionid) {
          global $DB;
  
          if (empty($this->discussionsdata[$discussionid])) {
              $this->discussionsdata[$discussionid] = $DB->get_record('forum_discussions',
                  array('id' => $discussionid), '*', MUST_EXIST);
          }
          return $this->discussionsdata[$discussionid];
      }
code_tokens: protected function get_discussion ( $ discussionid ) { global $ DB ; if ( empty ( $ this -> discussionsdata [ $ discussionid ] ) ) { $ this -> discussionsdata [ $ discussionid ] = $ DB -> get_record ( 'forum_discussions' , array ( 'id' => $ discussionid ) , '*' , MUST_EXIST ) ; } return $ this -> discussionsdata [ $ discussionid ] ; }
docstring: Returns the discussion checking the internal cache.
  
  @throws \dml_missing_record_exception
  @param int $discussionid
  @return stdClass
docstring_tokens: Returns the discussion checking the internal cache .