Commit 0c912b0c authored by dawehner's avatar dawehner

Issue #1046170 (follow up) by agentrickard: Provide a better documentation for the problem.

parent 5a46b695
......@@ -81,6 +81,7 @@ Fix fieldsets in field handler.
#1069100 by paranojik: remove legacy code from views_plugin_row_comment_view:pre_render().
#741234 by voxpelli: Arguments should check for NULL along with empty string to find empty values.
#1046170 by agentrickard, blackice2999, dereine: Execute preExecute before generate the countQuery to fix pagers with node_access.
#1046170 (follow up) by agentrickard: Provide a better documentation for the problem.
Views 3.x-7.x-alpha1 (05-Jan-2011)
==================================
......
......@@ -1274,12 +1274,15 @@ class views_plugin_query_default extends views_plugin_query {
if ($query) {
$additional_arguments = module_invoke_all('views_query_substitutions', $view);
// Count queries must be tagged to pre_execute; if not, then
// hook_query_node_access_alter() may munge the count by
// Count queries must be run through the preExecute() method.
// If not, then hook_query_node_access_alter() may munge the count by
// adding a distinct against an empty query string
// (e.g. COUNT DISTINCT(1) ...) and no pager will return.
// See pager.inc > PagerDefault::execute()
// http://api.drupal.org/api/drupal/includes--pager.inc/function/PagerDefault::execute/7
// See http://drupal.org/node/1046170.
$count_query->preExecute();
// Build the count query.
$count_query = $count_query->countQuery();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment