Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php |
— | — | @@ -32,10 +32,10 @@ |
33 | 33 | initializeOmegaWikiAttributes(false, false); |
34 | 34 | initializeAttributes(); |
35 | 35 | |
36 | | - $fromTransactionId = (int) $_GET['from-transaction']; |
37 | | - $transactionCount = (int) $_GET['transaction-count']; |
38 | | - $userName = "" . $_GET['user-name']; |
39 | | - $showRollBackOptions = isset($_GET['show-roll-back-options']); |
| 36 | + @$fromTransactionId = (int) $_GET['from-transaction']; # FIXME - check parameter |
| 37 | + @$transactionCount = (int) $_GET['transaction-count']; # FIXME - check parameter |
| 38 | + @$userName = "" . $_GET['user-name']; # FIXME - check parameter |
| 39 | + @$showRollBackOptions = isset($_GET['show-roll-back-options']); # FIXME - check parameter |
40 | 40 | |
41 | 41 | if (isset($_POST['roll-back'])) { |
42 | 42 | $fromTransactionId = (int) $_POST['from-transaction']; |
— | — | @@ -477,7 +477,7 @@ |
478 | 478 | $updatedAlternativeDefinitionsAttribute, $updatedAlternativeDefinitionTextAttribute, |
479 | 479 | $updatedTranslatedTextPropertyAttribute; |
480 | 480 | |
481 | | - $record = new ArrayRecord($updatesInTransactionAttribute->type->getStructure()); |
| 481 | + $record = new ArrayRecord($updatesInTransactionAttribute->type->getAttributes()); |
482 | 482 | $record->setAttributeValue($updatedDefinitionAttribute, getUpdatedDefinedMeaningDefinitionRecordSet($transactionId)); |
483 | 483 | $record->setAttributeValue($updatedAlternativeDefinitionsAttribute, getUpdatedAlternativeDefinitionsRecordSet($transactionId)); |
484 | 484 | $record->setAttributeValue($updatedAlternativeDefinitionTextAttribute, getUpdatedAlternativeDefinitionTextRecordSet($transactionId)); |
— | — | @@ -551,7 +551,7 @@ |
552 | 552 | "SELECT defined_meaning_id, translated_content_id, language_id, text_text, " . |
553 | 553 | getOperationSelectColumn("{$dc}_translated_content", $transactionId) . ', ' . |
554 | 554 | getIsLatestSelectColumn("{$dc}_translated_content", array('translated_content_id', 'language_id'), $transactionId) . |
555 | | - " FROM {$dc}_defined_meaning, {$dc}_translated_content, text " . |
| 555 | + " FROM {$dc}_defined_meaning, {$dc}_translated_content, {$dc}_text " . |
556 | 556 | " WHERE {$dc}_defined_meaning.meaning_text_tcid={$dc}_translated_content.translated_content_id ". |
557 | 557 | " AND {$dc}_translated_content.text_id={$dc}_text.text_id " . |
558 | 558 | " AND " . getInTransactionRestriction("${dc}_translated_content", $transactionId) . |
— | — | @@ -624,7 +624,7 @@ |
625 | 625 | "SELECT meaning_mid, translated_content_id, source_id, language_id, text_text, " . |
626 | 626 | getOperationSelectColumn("{$dc}_translated_content", $transactionId) . ', ' . |
627 | 627 | getIsLatestSelectColumn("{$dc}_translated_content", array('translated_content_id', 'language_id'), $transactionId) . |
628 | | - " FROM {$dc}_alt_meaningtexts, {$dc}_translated_content, text " . |
| 628 | + " FROM {$dc}_alt_meaningtexts, {$dc}_translated_content, {$dc}_text " . |
629 | 629 | " WHERE {$dc}_alt_meaningtexts.meaning_text_tcid={$dc}_translated_content.translated_content_id ". |
630 | 630 | " AND {$dc}_translated_content.text_id={$dc}_text.text_id " . |
631 | 631 | " AND " . getInTransactionRestriction("{$dc}_translated_content", $transactionId) . |
— | — | @@ -829,7 +829,7 @@ |
830 | 830 | getOperationSelectColumn("{$dc}_class_attributes", $transactionId) . ', ' . |
831 | 831 | getIsLatestSelectColumn("{$dc}_class_attributes", array('object_id'), $transactionId) . |
832 | 832 | " FROM {$dc}_class_attributes " . |
833 | | - " WHERE " . getInTransactionRestriction('{$dc}_class_attributes', $transactionId) |
| 833 | + " WHERE " . getInTransactionRestriction("{$dc}_class_attributes", $transactionId) |
834 | 834 | ); |
835 | 835 | |
836 | 836 | $recordSet = new ArrayRecordSet($updatedClassAttributesStructure, new Structure($classAttributeIdAttribute)); |
— | — | @@ -898,7 +898,7 @@ |
899 | 899 | getOperationSelectColumn("{$dc}_text_attribute_values", $transactionId) . ', ' . |
900 | 900 | getIsLatestSelectColumn("{$dc}_text_attribute_values", array('value_id'), $transactionId) . |
901 | 901 | " FROM {$dc}_text_attribute_values " . |
902 | | - " WHERE " . getInTransactionRestriction('{$dc}_text_attribute_values', $transactionId) |
| 902 | + " WHERE " . getInTransactionRestriction("{$dc}_text_attribute_values", $transactionId) |
903 | 903 | ); |
904 | 904 | |
905 | 905 | $recordSet = new ArrayRecordSet($updatedTextStructure, new Structure($valueIdAttribute)); |
— | — | @@ -967,7 +967,7 @@ |
968 | 968 | "SELECT value_id, object_id, attribute_mid, translated_content_id, language_id, text_text, " . |
969 | 969 | getOperationSelectColumn("{$dc}_translated_content", $transactionId) . ', ' . |
970 | 970 | getIsLatestSelectColumn("{$dc}_translated_content", array('translated_content_id', 'language_id'), $transactionId) . |
971 | | - " FROM {$dc}_translated_content_attribute_values, {$dc}_translated_content, text " . |
| 971 | + " FROM {$dc}_translated_content_attribute_values, {$dc}_translated_content, {$dc}_text " . |
972 | 972 | " WHERE {$dc}_translated_content_attribute_values.value_tcid={$dc}_translated_content.translated_content_id ". |
973 | 973 | " AND {$dc}_translated_content.text_id={$dc}_text.text_id " . |
974 | 974 | " AND " . getInTransactionRestriction("{$dc}_translated_content", $transactionId) . |
— | — | @@ -1448,7 +1448,7 @@ |
1449 | 1449 | $dbr = &wfGetDB(DB_SLAVE); |
1450 | 1450 | $queryResult = $dbr->query( |
1451 | 1451 | "SELECT text_text " . |
1452 | | - " FROM {$dc}_translated_content, text " . |
| 1452 | + " FROM {$dc}_translated_content, {$dc}_text " . |
1453 | 1453 | " WHERE {$dc}_translated_content.translated_content_id=$translatedContentId " . |
1454 | 1454 | " AND {$dc}_translated_content.text_id={$dc}_text.text_id " . |
1455 | 1455 | " AND {$dc}_translated_content.add_transaction_id=$addTransactionId"); |
Index: trunk/extensions/Wikidata/OmegaWiki/Record.php |
— | — | @@ -35,7 +35,8 @@ |
36 | 36 | } |
37 | 37 | |
38 | 38 | public function setAttributeValue($attribute, $value) { |
39 | | - $this->values[$attribute->id] = $value; |
| 39 | + #FIXME: check if valid |
| 40 | + @$this->values[$attribute->id] = $value; |
40 | 41 | } |
41 | 42 | |
42 | 43 | public function getType() { |
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php |
— | — | @@ -61,8 +61,10 @@ |
62 | 62 | } |
63 | 63 | |
64 | 64 | public function pushAttribute($attribute) { |
65 | | - $this->pushId($attribute->id); |
66 | | - $this->pushClass($attribute->id); |
| 65 | + # FIXME: check attribute id existence |
| 66 | + @$id=$attribute->id; |
| 67 | + $this->pushId($id); |
| 68 | + $this->pushClass($id); |
67 | 69 | } |
68 | 70 | |
69 | 71 | public function popKey() { |