From 634379299f7ab35bf64504718a77d00767fa2dfa Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 4 Jan 2009 19:56:51 +0000 Subject: - Patch #320591 by Moshe, Crell et al: tag specific alter hook for database queries. --- includes/database/select.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes/database/select.inc') diff --git a/includes/database/select.inc b/includes/database/select.inc index a8e763146..532b2e5a1 100644 --- a/includes/database/select.inc +++ b/includes/database/select.inc @@ -291,7 +291,13 @@ class SelectQuery extends Query implements QueryConditionInterface, QueryAlterab } public function execute() { + // Modules may alter all queries or only those having a particular tag. drupal_alter('query', $this); + if (isset($this->alterTags)) { + foreach ($this->alterTags as $tag => $value) { + drupal_alter("query_$tag", $this); + } + } $args = $this->getArguments(); -- cgit v1.2.3