Elgg/Elgg — pull request #5971 by jdalsem (2013-08-28 08:03:41+00:00)
Title: Detect pagination needs

This is probably a long standing issue, but is easily fixed. The following situation will show the problem.

Pagination will show up even if it is not needed if you do the following:

```php
elgg_list_entities(array("type" => "object", "subtype" => "blog", "limit" => false));
```

Even with limit is false (or 0, whatever your preference), you will get pagination, because pagination is defaulted to true and doesn't handle this well.

So solution is easy, if you start at 0 (`!$offset`) and have no limit (`!$limit`) we set pagination to false.

This fix saves you the trouble of adding `"pagination" => false` to all unlimited list_entities.

Real life problem here: https://github.com/ColdTrick/profile_manager/issues/9