Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php |
— | — | @@ -1,8 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | require_once('Transaction.php'); |
| 5 | +require_once('Wikidata.php'); |
5 | 6 | |
6 | | -require_once('Wikidata.php'); |
7 | 7 | class Expression { |
8 | 8 | public $id; |
9 | 9 | public $spelling; |
— | — | @@ -41,7 +41,6 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | function getExpression($expressionId) { |
45 | | - |
46 | 45 | $dc=wdGetDataSetContext(); |
47 | 46 | $dbr =& wfGetDB(DB_SLAVE); |
48 | 47 | $queryResult = $dbr->query("SELECT spelling, language_id " . |
— | — | @@ -305,10 +304,11 @@ |
306 | 305 | function createClassAttribute($classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType) { |
307 | 306 | $objectId = getClassAttributeId($classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType); |
308 | 307 | |
| 308 | + $dc=wdGetDataSetContext(); |
| 309 | + |
309 | 310 | if ($objectId == 0) |
310 | 311 | $objectId = newObjectId("{$dc}_class_attributes"); |
311 | 312 | |
312 | | - $dc=wdGetDataSetContext(); |
313 | 313 | $dbr =& wfGetDB(DB_MASTER); |
314 | 314 | $sql = "INSERT INTO {$dc}_class_attributes(object_id, class_mid, level_mid, attribute_mid, attribute_type, add_transaction_id) " . |
315 | 315 | " VALUES ($objectId, $classMeaningId, $levelMeaningId, $attributeMeaningId, " . $dbr->addQuotes($attributeType) . ', ' . getUpdateTransactionId() . ')'; |