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

Fixed Unnecessary Code in Controller

Jeremy

Well-known member
#1
This code isn't used in XenResource_ControllerPublic_Author::actionView():
PHP:
    // get average author rating
    $ratingSum = 0;
    $ratingCount = 0;
    foreach ($resources AS $resource)
    {
        $ratingSum += $resource['rating_sum'];
        $ratingCount += $resource['rating_count'];
    }
It exists right before the return, and $ratingSum and $ratingCount isn't used in the return value.