Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch adds an option to views_build_view that when called will only return the queries, but not actually run them. This is useful for modules that might want to simple run the summary count query without getting all the results back. It could also be useful for a module that wants to get a total number of nodes in a view, but then just load a page from that total.
Basically, all it does is return the $info array _before_ paging or running the query. It includes a change to the doc before the function.
Comment | File | Size | Author |
---|---|---|---|
views_queries_only0.patch | 1.14 KB | mfredrickson | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedlooks reasonable and simple.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedApplied. Thanks!
Comment #3
(not verified) CreditAttribution: commented