bart
Active member
When you don't use the download-function in the RM.
When you set a permission to download to "no" (not set).
And set the option "Require Downloading Before Rating" to "no".
Then you should be able to rate a resource, but you're not.
I traced the error to:
When you set a permission to download to "no" (not set).
And set the option "Require Downloading Before Rating" to "no".
Then you should be able to rate a resource, but you're not.
I traced the error to:
Code:
public function canRateResourceIfDownloaded(array $resource, array $category, &$errorPhraseKey = '', array $viewingUser = null, array $categoryPermissions = null)
{
$this->standardizeViewingUserReferenceForCategory($category, $viewingUser, $categoryPermissions);
if ($resource['resource_state'] != 'visible')
{
return false;
}
if (!$viewingUser['user_id'])
{
return false;
}
if ($viewingUser['user_id'] == $resource['user_id'])
{
return false;
}
if (!$this->canDownloadResource($resource, $category, $null, $viewingUser, $categoryPermissions))
{
!!!
if "requireDownloadToRate" is false, then this function should be bypassed.
!!!
return false;
}
return XenForo_Permission::hasContentPermission($categoryPermissions, 'rate');
}