• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Helper in XenForo_ControllerPublic_Forum

Fuhrmann

Well-known member
#1
PHP:
$ftpHelper = $this->getHelper('ForumThreadPost');
        $forum = $this->getHelper('ForumThreadPost')->assertForumValidAndViewable(
            $forumId ? $forumId : $forumName,
            $this->_getForumFetchOptions()
        );
Since the helper is already in the var $ftpHelper the line below could be:

PHP:
$forum = $ftpHelper->assertForumValidAndViewable(
            $forumId ? $forumId : $forumName,
            $this->_getForumFetchOptions()
        );
 

Fuhrmann

Well-known member
#5
There is something like this in the XenForo_ControllerPublic_Account:

PHP:
public function actionStopIgnoring()
{
    /* @var $ignoreModel XenForo_Model_UserIgnore */
    $ignoreModel = $this->getModelFromCache('XenForo_Model_UserIgnore');
    $userModel = $this->_getUserModel();
 
    $userId = $this->_input->filterSingle('user_id', XenForo_Input::UINT);
 
    if (empty($userId)|| !($user = $this->_getUserModel()->getUserById($userId)))
The $userModel is not used in this action.
 

Mike

XenForo developer
Staff member
#6
I doubt either will be changed with any urgency -- more like if we're in that code and it happens to get cleaned up. There's no real overhead to either.