Mark-H/VersionX2 — pull request #13 by adamlundrigan (2012-01-23 16:30:42+00:00)
Title: Filtering fails when no results returned

__Filtering fails when no results returned__

When the query in the resources getlist processor (core/components/versionx/processors/mgr/resources/getlist.php) returns no results, the processor uses ```$modx->error->failure```, which spits out this JSON:

```
{"success":false,"message":"No results found for your query.","total":0,"data":[],"object":[]}
```

It uses ```data``` as the rowset object, but ```MODx.grid.Grid``` is configured to use ```results```. The end result is that the grid isn't refreshed, and so rows from a previous filter (or initial load) remain in the grid.

Simplest fix is to remove the calls to ```$modx->error->failure``` and just return the expected structure, but with ```total``` = 0 and ```results``` as an empty array. The grid will then display the "no results" text, which I've also added to the grid in this PR.