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

Not a Bug XenForo_ControllerPublic_Page::actionIndex()

Discussion in 'Resolved Bug Reports' started by Fuhrmann, Dec 6, 2011.

  1. Fuhrmann

    Fuhrmann Well-Known Member


    The $nodeModel in the line 13 is not used in the whole action:

    public function actionIndex()
    $nodeName $this->_input->filterSingle('node_name'XenForo_Input::STRING);
    $page $this->_getPageOrError($nodeName);
    $pageModel $this->_getPageModel();
    $nodeModel $this->_getNodeModel();
            if (
    $pageModel->logVisit($pageXenForo_Visitor::getInstance()->toArray(), XenForo_Application::$time);
    $nodeBreadCrumbs $this->_getNodeModel()->getNodeBreadCrumbs($pagefalse);
  2. Mike

    Mike XenForo Developer Staff Member

    As there's no down side (and really, it just makes it easier in the future), not a bug. I wouldn't bother reporting things like this TBH.
  3. Fuhrmann

    Fuhrmann Well-Known Member

    Ok, then! :)

    This just dont make sense to me: why put the model into a variable and then a few lines after call to the same function instead of the var?
  4. Robbo

    Robbo Well-Known Member

    Yeah I have noticed a fair few things like this that I have been tempted to post :censored:
    Fuhrmann likes this.
  5. Jeremy

    Jeremy Well-Known Member

    Most of those functions call for a cached version, and if its not available, creates it and places it into the cache. So you actually only receive 1 instance (if I remember the code correctly).
    Fuhrmann likes this.

Share This Page