diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-08-22 19:10:34 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-08-22 19:10:34 +0000 |
commit | eac93fa43009fed441c790b79f60b93dbdbb262e (patch) | |
tree | dcf494acb6ce151947a04bf44f8d9c17c56cd04a /includes/database/query.inc | |
parent | a9762cd3bf93ac8bbcafec23328c3ecde9d1498a (diff) | |
download | brdo-eac93fa43009fed441c790b79f60b93dbdbb262e.tar.gz brdo-eac93fa43009fed441c790b79f60b93dbdbb262e.tar.bz2 |
- Patch #496500 by Moshe Weitzman, Crell, Berdir: remove global placeholder counter so we can support Views caching.
Diffstat (limited to 'includes/database/query.inc')
-rw-r--r-- | includes/database/query.inc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/includes/database/query.inc b/includes/database/query.inc index b6b47f48d..6ca869e52 100644 --- a/includes/database/query.inc +++ b/includes/database/query.inc @@ -1161,13 +1161,6 @@ class DatabaseCondition implements QueryConditionInterface, Countable { } public function compile(DatabaseConnection $connection) { - // This value is static, so it will increment across the entire request - // rather than just this query. That is OK, because we only need definitive - // placeholder names if we're going to use them for _alter hooks, which we - // are not. The alter hook would intervene before compilation. - // $next_placeholder does not use drupal_static as it increments and should - // never be reset during a request. - static $next_placeholder = 1; if ($this->changed) { @@ -1220,7 +1213,7 @@ class DatabaseCondition implements QueryConditionInterface, Countable { } if ($operator['use_value']) { foreach ($condition['value'] as $value) { - $placeholder = ':db_condition_placeholder_' . $next_placeholder++; + $placeholder = ':db_condition_placeholder_' . $connection->getNextPlaceholder(); $arguments[$placeholder] = $value; $placeholders[] = $placeholder; } |