Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php |
— | — | @@ -598,7 +598,7 @@ |
599 | 599 | $dc=wdGetDataSetContext(); |
600 | 600 | $dbr = &wfGetDB(DB_SLAVE); |
601 | 601 | $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")); |
603 | 603 | |
604 | 604 | if ($definedMeaningObject = $dbr->fetchObject($queryResult)) |
605 | 605 | return $definedMeaningObject->member_mid; |
— | — | @@ -1002,7 +1002,8 @@ |
1003 | 1003 | $query = "SELECT collection_id, collection_mid, collection_type FROM {$dc}_collection_ns" . |
1004 | 1004 | " WHERE ".getLatestTransactionRestriction("{$dc}_collection_ns") . |
1005 | 1005 | " 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; |
1007 | 1008 | $queryResult = $dbr->query($query); |
1008 | 1009 | |
1009 | 1010 | if ($collectionObject = $dbr->fetchObject($queryResult)) |