r23727 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23726‎ | r23727 | r23728 >
Date:10:14, 5 July 2007
Author:mulligen
Status:old
Tags:
Comment:
small bug fixes on findCollection (added an additional limit 1) and on getDefinedMeaningFromCollection (relation contentsr was misspelled)
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php
@@ -598,7 +598,7 @@
599599 $dc=wdGetDataSetContext();
600600 $dbr = &wfGetDB(DB_SLAVE);
601601 $queryResult = $dbr->query("SELECT member_mid FROM {$dc}_collection_contents WHERE collection_id=$collectionId AND internal_member_id=". $dbr->addQuotes($internalMemberId) .
602 - " AND " .getLatestTransactionRestriction("{$dc}_collection_contentsr"));
 602+ " AND " .getLatestTransactionRestriction("{$dc}_collection_contents"));
603603
604604 if ($definedMeaningObject = $dbr->fetchObject($queryResult))
605605 return $definedMeaningObject->member_mid;
@@ -1002,7 +1002,8 @@
10031003 $query = "SELECT collection_id, collection_mid, collection_type FROM {$dc}_collection_ns" .
10041004 " WHERE ".getLatestTransactionRestriction("{$dc}_collection_ns") .
10051005 " AND collection_mid = (SELECT defined_meaning_id FROM {$dc}_syntrans WHERE expression_id = " .
1006 - "(SELECT expression_id FROM {$dc}_expression_ns WHERE spelling LIKE " . $dbr->addQuotes($name) . " limit 1))";
 1006+ "(SELECT expression_id FROM {$dc}_expression_ns WHERE spelling LIKE " . $dbr->addQuotes($name) . " limit 1) limit 1)";
 1007+ echo $query;
10071008 $queryResult = $dbr->query($query);
10081009
10091010 if ($collectionObject = $dbr->fetchObject($queryResult))

Status & tagging log