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

Fixed Moving Featured Resources

S

Syndol

Guest
#1
When a featured resource is moved to a new category it no longer is featured even though it is still in the feature table.
Changing the condition in the Category datawriter resourceUpdate() function from:
Code:
if ($resource->isUpdate() && $resource->isChanged('resource_state'))
{
    $this->updateFeaturedCount();
}
to:
Code:
if ($resource->isUpdate() && ($resource->isChanged('resource_state') || $resource->isChanged('resource_category_id')))
{
    $this->updateFeaturedCount();
}
seems to fix this.