- Patch #634098 by asimmonds: fixed broken pager on /taxonomy/term/* pages.

merge-requests/26/head
Dries Buytaert 2010-01-03 06:53:19 +00:00
parent 7edad0db9e
commit 29e02b45c6
1 changed files with 1 additions and 1 deletions

View File

@ -156,6 +156,7 @@ function taxonomy_select_nodes($tid, $pager = TRUE, $limit = FALSE, $order = arr
}
$query = db_select('taxonomy_index', 't');
$query->addTag('node_access');
$query->condition('tid', $tid);
if ($pager) {
$count_query = clone $query;
$count_query->addExpression('COUNT(t.nid)');
@ -171,7 +172,6 @@ function taxonomy_select_nodes($tid, $pager = TRUE, $limit = FALSE, $order = arr
$query->range(0, $limit);
}
}
$query->condition('tid', $tid);
$query->addField('t', 'nid');
$query->addField('t', 'tid');
foreach ($order as $field => $direction) {