summaryrefslogtreecommitdiff
path: root/includes/database/query.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-22 19:10:34 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-22 19:10:34 +0000
commiteac93fa43009fed441c790b79f60b93dbdbb262e (patch)
treedcf494acb6ce151947a04bf44f8d9c17c56cd04a /includes/database/query.inc
parenta9762cd3bf93ac8bbcafec23328c3ecde9d1498a (diff)
downloadbrdo-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.inc9
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;
}