r18267 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18266‎ | r18267 | r18268 >
Date:20:31, 11 December 2006
Author:sburke
Status:old
Tags:
Comment:
Fix removed attributes being used
Modified paths:
  • /trunk/extensions/Wikidata/WiktionaryZ/SpecialSuggest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/WiktionaryZ/SpecialSuggest.php
@@ -147,12 +147,15 @@
148148
149149 function getSQLToSelectPossibleAttributes($objectId, $attributesLevel) {
150150 $dbr = & wfGetDB(DB_SLAVE);
151 - return 'SELECT attribute_mid, spelling
 151+ $sql = 'SELECT attribute_mid, spelling
152152 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)
153153 INNER JOIN uw_syntrans ON uw_class_attributes.attribute_mid = uw_syntrans.defined_meaning_id)
154154 INNER JOIN uw_expression_ns ON uw_syntrans.expression_id = uw_expression_ns.expression_id
155155 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;
157160 }
158161
159162 function getSQLForCollectionOfType($collectionType) {

Status & tagging log