r20390 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20389‎ | r20390 | r20391 >
Date:14:02, 13 March 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Fixed more copy'n'paste bugs
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php
@@ -195,8 +195,8 @@
196196 $subject = $data->getSubject();
197197 $this->deleteSubject($subject);
198198 // relations
199 - foreach(SMWSemanticData::$semdata->getRelations() as $relation) {
200 - foreach(SMWSemanticData::$semdata->getRelationObjects($relation) as $object) {
 199+ foreach($data->getRelations() as $relation) {
 200+ foreach($data->getRelationObjects($relation) as $object) {
201201 $db->insert( $db->tableName('smw_relations'),
202202 array( 'subject_id' => $subject->getArticleID(),
203203 'subject_namespace' => $subject->getNamespace(),
@@ -209,8 +209,8 @@
210210 }
211211
212212 //attributes
213 - foreach(SMWSemanticData::$semdata->getAttributes() as $attribute) {
214 - $attributeValueArray = SMWSemanticData::$semdata->getAttributeValues($attribute);
 213+ foreach($data->getAttributes() as $attribute) {
 214+ $attributeValueArray = $data->getAttributeValues($attribute);
215215 foreach($attributeValueArray as $value) {
216216 // DEBUG echo "in storeAttributes, considering $value, getXSDValue=" . $value->getXSDValue() . "<br />\n" ;
217217 if ($value->getXSDValue()!==false) {
@@ -229,11 +229,11 @@
230230 }
231231
232232 //special properties
233 - foreach (SMWSemanticData::$semdata->getSpecialProperties() as $special) {
 233+ foreach ($data->getSpecialProperties() as $special) {
234234 if ($special == SMW_SP_IMPORTED_FROM) { // don't store this, just used for display; TODO: filtering it here is bad
235235 continue;
236236 }
237 - $valueArray = SMWSemanticData::$semdata->getSpecialValues($special);
 237+ $valueArray = $data->getSpecialValues($special);
238238 foreach($valueArray as $value) {
239239 if ($value instanceof SMWDataValue) {
240240 if ($value->getXSDValue() !== false) { // filters out error-values etc.

Status & tagging log