1. 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

Discussion in 'Resource Manager Resolved Bugs' started by Nobita.Kun, Feb 14, 2014.

  1. Nobita.Kun

    Nobita.Kun Well-Known Member

    As title. When try to delete an category all resources which has `deleted` or `moderated` still exists.
    Because in ControllerAdmin_Category line 211:
    PHP:
    $resources $this->_getResourceModel()->getResources(array('resource_category_id' => $id), array('limit' => 100));
    And in Model_Resource line 259 to 267:
    PHP:
    if (isset($conditions['deleted']) || isset($conditions['moderated']))
            {
                
    $sqlConditions[] = $this->prepareStateLimitFromConditions($conditions'resource''resource_state');
            }
            else
            {
                
    // 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....
    :)
     
  2. Mike

    Mike XenForo Developer Staff Member

    Fixed as well, thanks.
     
    Nobita.Kun likes this.

Share This Page