Then you didn't do it right, because it skips all filters, e.g. running a search is like displaying completely everything
Try to delete all the code between
$arrFilters = array();
and
// --- Task order ---------------------------------------------------------
inclusive. So all you have left is
$objItemList = new ItemStats();
$pSort = ($_REQUEST['sort'])?$_REQUEST['sort']:
alternatively, when you deleted that part, search for any occurrence of
$objItemList->addWhere - there shouldn't be any left