New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elgg_list_entities does COUNT queries when pagination off #9403

Closed
mrclay opened this Issue Feb 20, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@mrclay
Member

mrclay commented Feb 20, 2016

The current views (lists and pagination) will handle passing a null in for count in this case, but plugins may have overridden these views and expect count to be present. In 3.0 we could warn devs that these views may receive a null count.

@hypeJunction

This comment has been minimized.

Contributor

hypeJunction commented Feb 23, 2016

IMO, we should move away from this pattern:

$options['count'] = true;
$count = elgg_get_entities($options);
$options['count'] = false;
$entities = elgg_get_entities($options);
// then somewhere down the pipe 'count' becomes $count in $vars
$vars = $options;
$vars['count'] = $count;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment