Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php |
— | — | @@ -154,7 +154,6 @@ |
155 | 155 | } |
156 | 156 | $db->freeResult($res); |
157 | 157 | } else { |
158 | | - |
159 | 158 | if ($value instanceof SMWDataValue) { |
160 | 159 | if ($value->getXSDValue() !== false) { // filters out error-values etc. |
161 | 160 | $stringvalue = $value->getXSDValue(); |
— | — | @@ -196,7 +195,7 @@ |
197 | 196 | |
198 | 197 | $id = SMWDataValueFactory::getAttributeObjectTypeID($attribute); |
199 | 198 | switch ($id) { |
200 | | - case 'text': // long text attribute |
| 199 | + case '_txt': // long text attribute |
201 | 200 | $res = $db->select( $db->tableName('smw_longstrings'), |
202 | 201 | 'value_blob', |
203 | 202 | 'subject_id=' . $db->addQuotes($subject->getArticleID()) . |
— | — | @@ -272,7 +271,7 @@ |
273 | 272 | $result = array(); |
274 | 273 | $id = SMWDataValueFactory::getAttributeObjectTypeID($attribute); |
275 | 274 | switch ($id) { |
276 | | - case 'text': |
| 275 | + case '_txt': |
277 | 276 | $res = $db->select( $db->tableName('smw_longstrings'), |
278 | 277 | 'DISTINCT subject_id', |
279 | 278 | $sql, 'SMW::getAllAttributeSubjects', |
— | — | @@ -483,7 +482,7 @@ |
484 | 483 | $attributeValueArray = $data->getAttributeValues($attribute); |
485 | 484 | foreach($attributeValueArray as $value) { |
486 | 485 | if ($value->isValid()) { |
487 | | - if ($value->getTypeID() !== 'text') { |
| 486 | + if ($value->getTypeID() !== '_txt') { |
488 | 487 | $up_attributes[] = |
489 | 488 | array( 'subject_id' => $subject->getArticleID(), |
490 | 489 | 'subject_namespace' => $subject->getNamespace(), |
— | — | @@ -493,7 +492,7 @@ |
494 | 493 | 'value_datatype' => $value->getTypeID(), |
495 | 494 | 'value_xsd' => $value->getXSDValue(), |
496 | 495 | 'value_num' => $value->getNumericValue() ); |
497 | | - } elseif ($value->getTypeID() !== 'text') { // f.k.a. "Relation" |
| 496 | + } elseif ($value->getTypeID() !== '_wpg') { // f.k.a. "Relation" |
498 | 497 | $up_relations[] = |
499 | 498 | array( 'subject_id' => $subject->getArticleID(), |
500 | 499 | 'subject_namespace' => $subject->getNamespace(), |
— | — | @@ -1176,7 +1175,7 @@ |
1177 | 1176 | } |
1178 | 1177 | } elseif ($description instanceof SMWValueDescription) { |
1179 | 1178 | switch ($description->getDatavalue()->getTypeID()) { |
1180 | | - case 'text': // actually this should not happen; we cannot do anything here |
| 1179 | + case '_txt': // actually this should not happen; we cannot do anything here |
1181 | 1180 | break; |
1182 | 1181 | default: |
1183 | 1182 | if ( $this->addJoin('ATTS', $from, $db, $curtables) ) { |
— | — | @@ -1255,7 +1254,7 @@ |
1256 | 1255 | } elseif ($description instanceof SMWSomeAttribute) { |
1257 | 1256 | $id = SMWDataValueFactory::getAttributeObjectTypeID($description->getAttribute()); |
1258 | 1257 | switch ($id) { |
1259 | | - case 'text': |
| 1258 | + case '_txt': |
1260 | 1259 | $table = 'TEXT'; |
1261 | 1260 | $sub = false; //no recursion: we do not support further conditions on text-type values |
1262 | 1261 | break; |