r18630 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18629‎ | r18630 | r18631 >
Date:11:49, 29 December 2006
Author:proes
Status:old
Tags:
Comment:
Work around for removing warning in fetching attribute suggestions. Should be solved in a better way.
Modified paths:
  • /trunk/extensions/Wikidata/WiktionaryZ/SpecialSuggest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/WiktionaryZ/SpecialSuggest.php
@@ -111,6 +111,7 @@
112112 $orderBy = $rowText;
113113
114114 $sql .= $searchCondition . " ORDER BY $orderBy LIMIT 10";
 115+
115116 $queryResult = $dbr->query($sql);
116117 $idAttribute = new Attribute("id", "ID", "id");
117118
@@ -151,7 +152,7 @@
152153 }
153154
154155 function getSQLToSelectPossibleAttributes($objectId, $attributesLevel, $attributesType) {
155 - global $wgDefaultClassMids;
 156+// global $wgDefaultClassMids;
156157
157158 $dbr = & wfGetDB(DB_SLAVE);
158159 $sql = 'SELECT attribute_mid,spelling' .
@@ -165,8 +166,8 @@
166167 ' AND uw_class_attributes.attribute_type LIKE ' . $dbr->addQuotes($attributesType) .
167168 ' AND ((uw_class_membership.class_member_mid = ' . $objectId .
168169 ' AND ' . getLatestTransactionRestriction('uw_class_membership') . ')';
169 - foreach ($wgDefaultClassMids as $mid)
170 - $sql .= ' OR uw_class_attributes.class_mid = ' . $mid;
 170+// foreach ($wgDefaultClassMids as $mid)
 171+// $sql .= ' OR uw_class_attributes.class_mid = ' . $mid;
171172 $sql .= ')';
172173 return $sql;
173174 }