Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php |
— | — | @@ -195,8 +195,8 @@ |
196 | 196 | $subject = $data->getSubject(); |
197 | 197 | $this->deleteSubject($subject); |
198 | 198 | // 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) { |
201 | 201 | $db->insert( $db->tableName('smw_relations'), |
202 | 202 | array( 'subject_id' => $subject->getArticleID(), |
203 | 203 | 'subject_namespace' => $subject->getNamespace(), |
— | — | @@ -209,8 +209,8 @@ |
210 | 210 | } |
211 | 211 | |
212 | 212 | //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); |
215 | 215 | foreach($attributeValueArray as $value) { |
216 | 216 | // DEBUG echo "in storeAttributes, considering $value, getXSDValue=" . $value->getXSDValue() . "<br />\n" ; |
217 | 217 | if ($value->getXSDValue()!==false) { |
— | — | @@ -229,11 +229,11 @@ |
230 | 230 | } |
231 | 231 | |
232 | 232 | //special properties |
233 | | - foreach (SMWSemanticData::$semdata->getSpecialProperties() as $special) { |
| 233 | + foreach ($data->getSpecialProperties() as $special) { |
234 | 234 | if ($special == SMW_SP_IMPORTED_FROM) { // don't store this, just used for display; TODO: filtering it here is bad |
235 | 235 | continue; |
236 | 236 | } |
237 | | - $valueArray = SMWSemanticData::$semdata->getSpecialValues($special); |
| 237 | + $valueArray = $data->getSpecialValues($special); |
238 | 238 | foreach($valueArray as $value) { |
239 | 239 | if ($value instanceof SMWDataValue) { |
240 | 240 | if ($value->getXSDValue() !== false) { // filters out error-values etc. |