diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-14 22:07:57 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-14 22:07:57 +0000 |
commit | 0c33e8638845d4e8617d92776e95eac86c3e2e2a (patch) | |
tree | 74caee22e14bde6f53d84f9ca11b889a19e1206d /modules/system | |
parent | 4575c982a2348cc2f9f5c6f6ee5531fe5a40f644 (diff) | |
download | brdo-0c33e8638845d4e8617d92776e95eac86c3e2e2a.tar.gz brdo-0c33e8638845d4e8617d92776e95eac86c3e2e2a.tar.bz2 |
#885014 by bojanz, chx: Fixed add missing pager and tablesort query support to EntityFieldQuery.
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.api.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index e7a5f06b6..8a67cddff 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -350,6 +350,13 @@ function hook_entity_delete($entity, $type) { * engines. Also, the default implementation presumes entities are stored in * SQL, but the execute callback could instead query any other entity storage, * local or remote. + * + * Note the $query->altered attribute which is TRUE in case the query has + * already been altered once. This happens with cloned queries. + * If there is a pager, then such a cloned query will be executed to count + * all elements. This query can be detected by checking for + * ($query->pager && $query->count), allowing the driver to return 0 from + * the count query and disable the pager. */ function hook_entity_query_alter($query) { $query->executeCallback = 'my_module_query_callback'; |