Révision 503b3f7b
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/entity/includes/entity.controller.inc | ||
---|---|---|
171 | 171 |
if ($this->revisionKey) { |
172 | 172 |
// Compare revision id of the base and revision table, if equal then this |
173 | 173 |
// is the default revision. |
174 |
$query->addExpression('base.' . $this->revisionKey . ' = revision.' . $this->revisionKey, $this->defaultRevisionKey);
|
|
174 |
$query->addExpression('CASE WHEN base.' . $this->revisionKey . ' = revision.' . $this->revisionKey . ' THEN 1 ELSE 0 END', $this->defaultRevisionKey);
|
|
175 | 175 |
} |
176 | 176 |
return $query; |
177 | 177 |
} |
... | ... | |
373 | 373 |
// Do nothing, in case invalid or no ids have been passed. |
374 | 374 |
return; |
375 | 375 |
} |
376 |
// This transaction causes troubles on MySQL, see |
|
377 |
// http://drupal.org/node/1007830. So we deactivate this by default until |
|
378 |
// is shipped in a point release. |
|
379 |
// $transaction = isset($transaction) ? $transaction : db_transaction(); |
|
376 |
$transaction = isset($transaction) ? $transaction : db_transaction(); |
|
380 | 377 |
|
381 | 378 |
try { |
382 | 379 |
$ids = array_keys($entities); |
... | ... | |
400 | 397 |
db_ignore_slave(); |
401 | 398 |
} |
402 | 399 |
catch (Exception $e) { |
403 |
if (isset($transaction)) { |
|
404 |
$transaction->rollback(); |
|
405 |
} |
|
400 |
$transaction->rollback(); |
|
406 | 401 |
watchdog_exception($this->entityType, $e); |
407 | 402 |
throw $e; |
408 | 403 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules