Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php |
— | — | @@ -450,6 +450,15 @@ |
451 | 451 | " WHERE spelling=BINARY " . $dbr->addQuotes( $spelling ) . |
452 | 452 | " AND {$dc}_expression.remove_transaction_id IS NULL " ; |
453 | 453 | |
| 454 | + // needed because expression.remove_transaction_id is not updated automatically |
| 455 | + $sql .= " AND EXISTS (" . |
| 456 | + "SELECT * " . |
| 457 | + " FROM {$dc}_syntrans " . |
| 458 | + " WHERE {$dc}_syntrans.expression_id={$dc}_expression.expression_id" . |
| 459 | + " AND {$dc}_syntrans.remove_transaction_id IS NULL " . |
| 460 | + ")"; |
| 461 | + |
| 462 | + |
454 | 463 | if ( $viewInformation->expressionLanguageId != 0 ) { |
455 | 464 | // display the expression in that language |
456 | 465 | $sql .= " AND language_id=" . $viewInformation->expressionLanguageId ; |