Not a bug XenForo_ControllerPublic_Post::actionReport

Fuhrmann

Well-known member
PHP:
if ($this->_request->isPost())
        {
            $message = $this->_input->filterSingle('message', XenForo_Input::STRING);
            if (!$message)
            {
                return $this->responseError(new XenForo_Phrase('please_enter_reason_for_reporting_this_message'));
            }
 
            /* @var $reportModel XenForo_Model_Report */
            $reportModel = XenForo_Model::create('XenForo_Model_Report');
            $reportModel->reportContent('post', $post, $message);


The create model process should'nt be :

PHP:
$this->getModelFromCache('XenForo_Model_Report');
?
 
In this instance, there isn't really a difference as it wouldn't be in the cache anyway. Strictly speaking, both approaches are valid and in theory you could intentionally use one over the other in particular situations.
 
Top Bottom