Lack of interest Helper in XenForo_ControllerPublic_Forum

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Fuhrmann

Well-known member
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()
        );
 
Upvote 1
This suggestion has been closed. Votes are no longer accepted.
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.
 
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.
 
Top Bottom