Index: trunk/extensions/Wikidata/WiktionaryZ/SpecialSuggest.php |
— | — | @@ -147,12 +147,15 @@ |
148 | 148 | |
149 | 149 | function getSQLToSelectPossibleAttributes($objectId, $attributesLevel) { |
150 | 150 | $dbr = & wfGetDB(DB_SLAVE); |
151 | | - return 'SELECT attribute_mid, spelling |
| 151 | + $sql = 'SELECT attribute_mid, spelling |
152 | 152 | FROM ((uw_class_membership INNER JOIN (uw_class_attributes INNER JOIN bootstrapped_defined_meanings ON uw_class_attributes.level_mid = bootstrapped_defined_meanings.defined_meaning_id)ON uw_class_membership.class_mid = uw_class_attributes.class_mid) |
153 | 153 | INNER JOIN uw_syntrans ON uw_class_attributes.attribute_mid = uw_syntrans.defined_meaning_id) |
154 | 154 | INNER JOIN uw_expression_ns ON uw_syntrans.expression_id = uw_expression_ns.expression_id |
155 | 155 | WHERE bootstrapped_defined_meanings.name = ' . $dbr->addQuotes($attributesLevel) . |
156 | | - ' AND uw_class_membership.class_member_mid = ' . $objectId; |
| 156 | + ' AND ' . getLatestTransactionRestriction('uw_class_membership') . |
| 157 | + ' AND ' . getLatestTransactionRestriction('uw_class_attributes') . |
| 158 | + ' AND uw_class_membership.class_member_mid = ' . $objectId; |
| 159 | + return $sql; |
157 | 160 | } |
158 | 161 | |
159 | 162 | function getSQLForCollectionOfType($collectionType) { |