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

Fixed Delete category don't delete deleted resource or moderated resource


Formerly Nobita.Kun
As title. When try to delete an category all resources which has `deleted` or `moderated` still exists.
Because in ControllerAdmin_Category line 211:
$resources = $this->_getResourceModel()->getResources(array('resource_category_id' => $id), array('limit' => 100));
And in Model_Resource line 259 to 267:
if (isset($conditions['deleted']) || isset($conditions['moderated']))
            $sqlConditions[] = $this->prepareStateLimitFromConditions($conditions, 'resource', 'resource_state');
            // sanity check: only get visible resources unless we've explicitly said to get something else
            $sqlConditions[] = "resource.resource_state = 'visible'";
Its always include `resource_state` = 'visible` if you don't include special conditions. So....