r23726 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23725‎ | r23726 | r23727 >
Date:10:06, 5 July 2007
Author:proes
Status:old
Tags:
Comment:
Solved notice: Unknown dataset in addClassAttribute()
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php
@@ -1,8 +1,8 @@
22 <?php
33
44 require_once('Transaction.php');
 5+require_once('Wikidata.php');
56
6 -require_once('Wikidata.php');
77 class Expression {
88 public $id;
99 public $spelling;
@@ -41,7 +41,6 @@
4242 }
4343
4444 function getExpression($expressionId) {
45 -
4645 $dc=wdGetDataSetContext();
4746 $dbr =& wfGetDB(DB_SLAVE);
4847 $queryResult = $dbr->query("SELECT spelling, language_id " .
@@ -305,10 +304,11 @@
306305 function createClassAttribute($classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType) {
307306 $objectId = getClassAttributeId($classMeaningId, $levelMeaningId, $attributeMeaningId, $attributeType);
308307
 308+ $dc=wdGetDataSetContext();
 309+
309310 if ($objectId == 0)
310311 $objectId = newObjectId("{$dc}_class_attributes");
311312
312 - $dc=wdGetDataSetContext();
313313 $dbr =& wfGetDB(DB_MASTER);
314314 $sql = "INSERT INTO {$dc}_class_attributes(object_id, class_mid, level_mid, attribute_mid, attribute_type, add_transaction_id) " .
315315 " VALUES ($objectId, $classMeaningId, $levelMeaningId, $attributeMeaningId, " . $dbr->addQuotes($attributeType) . ', ' . getUpdateTransactionId() . ')';

Status & tagging log