Thanks for this module, I've used and customized it quite a bit in a recent project. :)

Though I haven't used the max items feature, I think there is a bug in it.

Instead of this:

if (!empty($max_items) && count($oids) == $max_items)

I think you wanted this:

if (!empty($max_items) && count($oids) > $max_items)

A few extra stuff:

1. I think it would be really friendly to only display this message to admins (i.e. user_access('administer views') check).

2. I don't think the code actually limits the amount of total results. Either the message should be updated to be just a notification about exceeding $max_limits or $oids should be actually reduced, e.g. with array_slice.

3. Moving this entire logic into its own method would make the already pretty long get_oids() method a bit easier to read. Also people extending this class will need to worry about a bit less code.

I'd be happy to update the patch if you think any of these make sense.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

progpapa created an issue. See original summary.

progpapa’s picture

Status: Active » Needs review
FileSize
700 bytes

patch attached