How to update this statement to PHP 5.4

In XenTrade_Controller_Public, does $this->hasPermission() usually have a $user? I should probably charge my computer... Lol.

What is XenTrade_Controller_Public? :P

Most of the permission check I saw uses a simple XenForo_Visitor::getInstance()->hasPermission(), it's that XenTrader has a complicated permission checking system (did not thoroughly read code) it has to call it instead of a simple hasPermission call like everybody else uses.
 
I'm on a phone. Give me a break. XenTrader_ControllerPublic_Index. I feel like I remember most don't have a $user passed. Quick glance I remember being confused on how it worked.
 
I'm on a phone. Give me a break. XenTrader_ControllerPublic_Index. I feel like I remember most don't have a $user passed. Quick glance I remember being confused on how it worked.

Just kidding. :p

Permission checking in XenTrader_ControllerPublic_Index calls _assertHasPermission in XenTrader_ControllerPublic_Abstract
_assertHasPermission in XenTrader_ControllerPublic_Abstract:

Code:
    protected function _assertHasPermission($permission = '', $user = null)
    {
        if (!$this->getModelFromCache('XenTrader_Model_Feedback')->hasPermission($permission, $user))
            throw $this->responseException($this->responseNoPermission());
    }

Yes, most of the calls didn't pass in the $user argument.
 
Made the change, which resolved the error, but when I go to /XenTrader/Leave-feedback I get an error saying I don't have permission. In addition to the fact that it still doesn't show the XenTrader tab in Navbar, UserProfiles or Under avatars in threads, so viewing a members feedback is very difficult let alone leaving it.

Any ideas?
 
Back
Top Bottom