Index: trunk/extensions/Wikidata/OmegaWiki/SpecialNeedsTranslation.php |
— | — | @@ -45,7 +45,8 @@ |
46 | 46 | |
47 | 47 | protected function showExpressionsNeedingTranslation($sourceLanguageId, $destinationLanguageId,$collectionId) { |
48 | 48 | global |
49 | | - $definedMeaningIdAttribute, $expressionIdAttribute, $expressionAttribute, $expressionStructure, $spellingAttribute, $languageAttribute; |
| 49 | + $definedMeaningIdAttribute, $expressionIdAttribute, $expressionAttribute, $expressionStructure, $omegaWikiAttributes; |
| 50 | + $o=$omegaWikiAttributes; |
50 | 51 | |
51 | 52 | $dc=wdGetDataSetContext(); |
52 | 53 | require_once("Transaction.php"); |
— | — | @@ -87,15 +88,15 @@ |
88 | 89 | |
89 | 90 | while ($row = $dbr->fetchObject($queryResult)) { |
90 | 91 | $expressionRecord = new ArrayRecord($expressionStructure); |
91 | | - $expressionRecord->setAttributeValue($languageAttribute, $row->source_language_id); |
92 | | - $expressionRecord->setAttributeValue($spellingAttribute, $row->source_spelling); |
| 92 | + $expressionRecord->language = $row->source_language_id; |
| 93 | + $expressionRecord->spelling = $row->source_spelling; |
93 | 94 | |
94 | 95 | $recordSet->addRecord(array($row->source_defined_meaning_id, $row->source_expression_id, $expressionRecord, getDefinedMeaningDefinition($row->source_defined_meaning_id))); |
95 | 96 | } |
96 | 97 | |
97 | 98 | $expressionEditor = new RecordTableCellEditor($expressionAttribute); |
98 | | - $expressionEditor->addEditor(new LanguageEditor($languageAttribute, new SimplePermissionController(false), false)); |
99 | | - $expressionEditor->addEditor(new SpellingEditor($spellingAttribute, new SimplePermissionController(false), false)); |
| 99 | + $expressionEditor->addEditor(new LanguageEditor($o->language, new SimplePermissionController(false), false)); |
| 100 | + $expressionEditor->addEditor(new SpellingEditor($o->spelling, new SimplePermissionController(false), false)); |
100 | 101 | |
101 | 102 | $editor = new RecordSetTableEditor(null, new SimplePermissionController(false), new ShowEditFieldChecker(true), new AllowAddController(false), false, false, null); |
102 | 103 | $editor->addEditor($expressionEditor); |
Index: trunk/extensions/Wikidata/OmegaWiki/Controller.php |
— | — | @@ -442,7 +442,7 @@ |
443 | 443 | $translatedTextAttribute; |
444 | 444 | |
445 | 445 | if ($this->filterLanguageId == 0) |
446 | | - $expressionLanguageId = $record->getAttributeValue($expressionAttribute)->languageAttribute; |
| 446 | + $expressionLanguageId = $record->getAttributeValue($expressionAttribute)->language; |
447 | 447 | else |
448 | 448 | $expressionLanguageId = $this->filterLanguageId; |
449 | 449 | |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php |
— | — | @@ -129,8 +129,10 @@ |
130 | 130 | function initializeAttributes() { |
131 | 131 | global |
132 | 132 | $operationAttribute, $isLatestAttribute, $definedMeaningIdAttribute, $definedMeaningReferenceAttribute, |
133 | | - $languageAttribute, $textAttribute, $definedMeaningReferenceStructure, $rollBackStructure, $rollBackAttribute; |
| 133 | + $omegaWikiAttributes, $definedMeaningReferenceStructure, $rollBackStructure, $rollBackAttribute; |
134 | 134 | |
| 135 | + $o=$omegaWikiAttributes; |
| 136 | + |
135 | 137 | $operationAttribute = new Attribute('operation', 'Operation', 'text'); |
136 | 138 | $isLatestAttribute = new Attribute('is-latest', 'Is latest', 'boolean'); |
137 | 139 | |
— | — | @@ -143,7 +145,7 @@ |
144 | 146 | |
145 | 147 | $addTransactionIdAttribute = new Attribute('add-transaction-id', 'Add transaction ID', 'identifier'); |
146 | 148 | |
147 | | - $translatedContentHistoryStructure = new Structure($addTransactionIdAttribute, $textAttribute, $recordLifeSpanAttribute); |
| 149 | + $translatedContentHistoryStructure = new Structure($addTransactionIdAttribute, $o->text, $recordLifeSpanAttribute); |
148 | 150 | $translatedContentHistoryKeyStructure = new Structure($addTransactionIdAttribute); |
149 | 151 | $translatedContentHistoryAttribute = new Attribute('translated-content-history', 'History', $translatedContentHistoryStructure); |
150 | 152 | $translatedContentIdAttribute = new Attribute('translated-content-id', 'Translated content ID', 'object-id'); |
— | — | @@ -162,8 +164,8 @@ |
163 | 165 | $definedMeaningIdAttribute, |
164 | 166 | $definedMeaningReferenceAttribute, |
165 | 167 | $translatedContentIdAttribute, |
166 | | - $languageAttribute, |
167 | | - $textAttribute, |
| 168 | + $o->language, |
| 169 | + $o->text, |
168 | 170 | $operationAttribute, |
169 | 171 | $isLatestAttribute |
170 | 172 | ); |
— | — | @@ -264,14 +266,16 @@ |
265 | 267 | $updatedLinkAttribute = new Attribute('updated-link', 'Link properties', $updatedLinkStructure); |
266 | 268 | |
267 | 269 | global |
268 | | - $updatedTextAttribute, $updatedTextStructure, $textAttribute; |
| 270 | + $updatedTextAttribute, $updatedTextStructure, $omegaWikiAttributes; |
269 | 271 | |
| 272 | + $o=$omegaWikiAttributes; |
| 273 | + |
270 | 274 | $updatedTextStructure = new Structure( |
271 | 275 | $rollBackAttribute, |
272 | 276 | $valueIdAttribute, |
273 | 277 | $objectIdAttribute, |
274 | 278 | $attributeAttribute, |
275 | | - $textAttribute, |
| 279 | + $o->text, |
276 | 280 | $operationAttribute, |
277 | 281 | $isLatestAttribute |
278 | 282 | ); |
— | — | @@ -306,8 +310,8 @@ |
307 | 311 | $objectIdAttribute, |
308 | 312 | $attributeAttribute, |
309 | 313 | $translatedContentIdAttribute, |
310 | | - $languageAttribute, |
311 | | - $textAttribute, |
| 314 | + $o->language, |
| 315 | + $o->text, |
312 | 316 | $operationAttribute, |
313 | 317 | $isLatestAttribute |
314 | 318 | ); |
— | — | @@ -364,8 +368,8 @@ |
365 | 369 | $definedMeaningReferenceAttribute, |
366 | 370 | $translatedContentIdAttribute, |
367 | 371 | $sourceAttribute, |
368 | | - $languageAttribute, |
369 | | - $textAttribute, |
| 372 | + $o->language, |
| 373 | + $o->text, |
370 | 374 | $operationAttribute, |
371 | 375 | $isLatestAttribute |
372 | 376 | ); |
— | — | @@ -499,7 +503,7 @@ |
500 | 504 | function getTranslatedContentHistory($translatedContentId, $languageId, $isLatest) { |
501 | 505 | global |
502 | 506 | $translatedContentHistoryStructure, $translatedContentHistoryKeyStructure, |
503 | | - $textAttribute, $addTransactionIdAttribute, $recordLifeSpanAttribute; |
| 507 | + $addTransactionIdAttribute, $recordLifeSpanAttribute; |
504 | 508 | |
505 | 509 | $dc=wdGetDataSetContext(); |
506 | 510 | $recordSet = new ArrayRecordSet($translatedContentHistoryStructure, $translatedContentHistoryKeyStructure); |
— | — | @@ -517,7 +521,7 @@ |
518 | 522 | |
519 | 523 | while ($row = $dbr->fetchObject($queryResult)) { |
520 | 524 | $record = new ArrayRecord($translatedContentHistoryStructure); |
521 | | - $record->setAttributeValue($textAttribute, $row->text_text); |
| 525 | + $record->text = $row->text_text; |
522 | 526 | $record->setAttributeValue($addTransactionIdAttribute, (int) $row->add_transaction_id); |
523 | 527 | $record->setAttributeValue($recordLifeSpanAttribute, getRecordLifeSpanTuple((int) $row->add_transaction_id, (int) $row->remove_transaction_id)); |
524 | 528 | |
— | — | @@ -530,10 +534,10 @@ |
531 | 535 | |
532 | 536 | function getUpdatedTextRecord($text, $history) { |
533 | 537 | global |
534 | | - $updatedTextStructure, $textAttribute, $translatedContentHistoryAttribute; |
| 538 | + $updatedTextStructure, $translatedContentHistoryAttribute; |
535 | 539 | |
536 | 540 | $result = new ArrayRecord($updatedTextStructure); |
537 | | - $result->setAttributeValue($textAttribute, $text); |
| 541 | + $result->text = $text; |
538 | 542 | $result->setAttributeValue($translatedContentHistoryAttribute, $history); |
539 | 543 | |
540 | 544 | return $result; |
— | — | @@ -542,10 +546,12 @@ |
543 | 547 | function getUpdatedDefinedMeaningDefinitionRecordSet($transactionId) { |
544 | 548 | |
545 | 549 | global |
546 | | - $languageAttribute, $textAttribute, $definedMeaningIdAttribute, |
| 550 | + $omegaWikiAttributes, $definedMeaningIdAttribute, |
547 | 551 | $definedMeaningReferenceAttribute, $updatedDefinitionStructure, $translatedContentIdAttribute, |
548 | 552 | $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $rollBackTranslatedContentStructure; |
549 | 553 | |
| 554 | + $o=$omegaWikiAttributes; |
| 555 | + |
550 | 556 | $dc=wdGetDataSetContext(); |
551 | 557 | |
552 | 558 | $dbr = &wfGetDB(DB_SLAVE); |
— | — | @@ -560,15 +566,15 @@ |
561 | 567 | " AND " . getAtTransactionRestriction("{$dc}_defined_meaning", $transactionId) |
562 | 568 | ); |
563 | 569 | |
564 | | - $recordSet = new ArrayRecordSet($updatedDefinitionStructure, new Structure($definedMeaningIdAttribute, $languageAttribute)); |
| 570 | + $recordSet = new ArrayRecordSet($updatedDefinitionStructure, new Structure($definedMeaningIdAttribute, $o->language)); |
565 | 571 | |
566 | 572 | while ($row = $dbr->fetchObject($queryResult)) { |
567 | 573 | $record = new ArrayRecord($updatedDefinitionStructure); |
568 | 574 | $record->setAttributeValue($definedMeaningIdAttribute, $row->defined_meaning_id); |
569 | 575 | $record->setAttributeValue($definedMeaningReferenceAttribute, getDefinedMeaningReferenceRecord($row->defined_meaning_id)); |
570 | 576 | $record->setAttributeValue($translatedContentIdAttribute, $row->translated_content_id); |
571 | | - $record->setAttributeValue($languageAttribute, $row->language_id); |
572 | | - $record->setAttributeValue($textAttribute, $row->text_text); |
| 577 | + $record->language = $row->language_id; |
| 578 | + $record->text = $row->text_text; |
573 | 579 | $record->setAttributeValue($operationAttribute, $row->operation); |
574 | 580 | $record->setAttributeValue($isLatestAttribute, $row->is_latest); |
575 | 581 | $record->setAttributeValue($rollBackTranslatedContentAttribute, simpleRecord($rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest)))); |
— | — | @@ -618,10 +624,12 @@ |
619 | 625 | |
620 | 626 | function getUpdatedAlternativeDefinitionTextRecordSet($transactionId) { |
621 | 627 | global |
622 | | - $languageAttribute, $textAttribute, $definedMeaningIdAttribute, $sourceAttribute, |
| 628 | + $omegaWikiAttributes, $definedMeaningIdAttribute, $sourceAttribute, |
623 | 629 | $definedMeaningReferenceAttribute, $updatedAlternativeDefinitionTextStructure, $translatedContentIdAttribute, |
624 | 630 | $rollBackTranslatedContentStructure, $rollBackTranslatedContentAttribute, $operationAttribute, $isLatestAttribute; |
625 | 631 | |
| 632 | + $o=$omegaWikiAttributes; |
| 633 | + |
626 | 634 | $dc=wdGetDataSetContext(); |
627 | 635 | $dbr = &wfGetDB(DB_SLAVE); |
628 | 636 | $queryResult = $dbr->query( |
— | — | @@ -635,7 +643,7 @@ |
636 | 644 | " AND " . getAtTransactionRestriction("{$dc}_alt_meaningtexts", $transactionId) |
637 | 645 | ); |
638 | 646 | |
639 | | - $recordSet = new ArrayRecordSet($updatedAlternativeDefinitionTextStructure, new Structure($translatedContentIdAttribute, $languageAttribute)); |
| 647 | + $recordSet = new ArrayRecordSet($updatedAlternativeDefinitionTextStructure, new Structure($translatedContentIdAttribute, $o->language)); |
640 | 648 | |
641 | 649 | while ($row = $dbr->fetchObject($queryResult)) { |
642 | 650 | $record = new ArrayRecord($updatedAlternativeDefinitionTextStructure); |
— | — | @@ -643,8 +651,8 @@ |
644 | 652 | $record->setAttributeValue($definedMeaningReferenceAttribute, getDefinedMeaningReferenceRecord($row->meaning_mid)); |
645 | 653 | $record->setAttributeValue($translatedContentIdAttribute, $row->translated_content_id); |
646 | 654 | $record->setAttributeValue($sourceAttribute, getDefinedMeaningReferenceRecord($row->source_id)); |
647 | | - $record->setAttributeValue($languageAttribute, $row->language_id); |
648 | | - $record->setAttributeValue($textAttribute, $row->text_text); |
| 655 | + $record->language = $row->language_id; |
| 656 | + $record->text = $row->text_text; |
649 | 657 | $record->setAttributeValue($operationAttribute, $row->operation); |
650 | 658 | $record->setAttributeValue($isLatestAttribute, $row->is_latest); |
651 | 659 | $record->setAttributeValue($rollBackTranslatedContentAttribute, simpleRecord($rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest)))); |
— | — | @@ -654,14 +662,15 @@ |
655 | 663 | return $recordSet; |
656 | 664 | } |
657 | 665 | |
658 | | -function getUpdatedSyntransesRecordSet($transactionId) { |
| 666 | +function getUpdatedSyntransesRecordSet($transactionId, $dc=null) { |
659 | 667 | global |
660 | 668 | $updatedSyntransesStructure, $definedMeaningIdAttribute, $definedMeaningReferenceAttribute, |
661 | | - $expressionAttribute, $expressionStructure, $languageAttribute, $spellingAttribute, $syntransIdAttribute, |
| 669 | + $expressionAttribute, $expressionStructure, $omegaWikiAttributes, $syntransIdAttribute, |
662 | 670 | $expressionIdAttribute, $identicalMeaningAttribute, |
663 | 671 | $isLatestAttribute, $operationAttribute, $rollBackAttribute, $rollBackStructure; |
664 | 672 | |
665 | | - $dc=wdGetDataSetContext(); |
| 673 | + $o=$omegaWikiAttributes; |
| 674 | + $dc=wdGetDataSetContext($dc); |
666 | 675 | |
667 | 676 | $dbr = &wfGetDB(DB_SLAVE); |
668 | 677 | $queryResult = $dbr->query( |
— | — | @@ -678,8 +687,8 @@ |
679 | 688 | |
680 | 689 | while ($row = $dbr->fetchObject($queryResult)) { |
681 | 690 | $expressionRecord = new ArrayRecord($expressionStructure); |
682 | | - $expressionRecord->setAttributeValue($languageAttribute, $row->language_id); |
683 | | - $expressionRecord->setAttributeValue($spellingAttribute, $row->spelling); |
| 691 | + $expressionRecord->language = $row->language_id; |
| 692 | + $expressionRecord->spelling = $row->spelling; |
684 | 693 | |
685 | 694 | $record = new ArrayRecord($updatedSyntransesStructure); |
686 | 695 | $record->setAttributeValue($syntransIdAttribute, $row->syntrans_sid); |
— | — | @@ -902,7 +911,7 @@ |
903 | 912 | |
904 | 913 | function getUpdatedTextRecordSet($transactionId) { |
905 | 914 | global |
906 | | - $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $textAttribute, |
| 915 | + $objectIdAttribute, $valueIdAttribute, $attributeAttribute, |
907 | 916 | $updatedTextStructure, |
908 | 917 | $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure; |
909 | 918 | |
— | — | @@ -923,7 +932,7 @@ |
924 | 933 | $record->setAttributeValue($valueIdAttribute, $row->value_id); |
925 | 934 | $record->setAttributeValue($objectIdAttribute, $row->object_id); |
926 | 935 | $record->setAttributeValue($attributeAttribute, getDefinedMeaningReferenceRecord($row->attribute_mid)); |
927 | | - $record->setAttributeValue($textAttribute, $row->text); |
| 936 | + $record->text= $row->text; |
928 | 937 | $record->setAttributeValue($operationAttribute, $row->operation); |
929 | 938 | $record->setAttributeValue($isLatestAttribute, $row->is_latest); |
930 | 939 | $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation))); |
— | — | @@ -974,10 +983,12 @@ |
975 | 984 | |
976 | 985 | function getUpdatedTranslatedTextRecordSet($transactionId) { |
977 | 986 | global |
978 | | - $languageAttribute, $textAttribute, $objectIdAttribute, $valueIdAttribute, $attributeAttribute, |
| 987 | + $objectAttributeValues, $objectIdAttribute, $valueIdAttribute, $attributeAttribute, |
979 | 988 | $updatedTranslatedTextStructure, $translatedContentIdAttribute, |
980 | 989 | $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $rollBackTranslatedContentStructure; |
981 | 990 | |
| 991 | + $o=$omegaWikiAttributes; |
| 992 | + |
982 | 993 | $dc=wdGetDataSetContext(); |
983 | 994 | $dbr = &wfGetDB(DB_SLAVE); |
984 | 995 | $queryResult = $dbr->query( |
— | — | @@ -991,7 +1002,7 @@ |
992 | 1003 | " AND " . getAtTransactionRestriction("{$dc}_translated_content_attribute_values", $transactionId) |
993 | 1004 | ); |
994 | 1005 | |
995 | | - $recordSet = new ArrayRecordSet($updatedTranslatedTextStructure, new Structure($valueIdAttribute, $languageAttribute)); |
| 1006 | + $recordSet = new ArrayRecordSet($updatedTranslatedTextStructure, new Structure($valueIdAttribute, $o->language)); |
996 | 1007 | |
997 | 1008 | while ($row = $dbr->fetchObject($queryResult)) { |
998 | 1009 | $record = new ArrayRecord($updatedTranslatedTextStructure); |
— | — | @@ -999,8 +1010,8 @@ |
1000 | 1011 | $record->setAttributeValue($objectIdAttribute, $row->object_id); |
1001 | 1012 | $record->setAttributeValue($attributeAttribute, getDefinedMeaningReferenceRecord($row->attribute_mid)); |
1002 | 1013 | $record->setAttributeValue($translatedContentIdAttribute, $row->translated_content_id); |
1003 | | - $record->setAttributeValue($languageAttribute, $row->language_id); |
1004 | | - $record->setAttributeValue($textAttribute, $row->text_text); |
| 1014 | + $record->language = $row->language_id; |
| 1015 | + $record->text = $row->text_text; |
1005 | 1016 | $record->setAttributeValue($operationAttribute, $row->operation); |
1006 | 1017 | $record->setAttributeValue($isLatestAttribute, $row->is_latest); |
1007 | 1018 | $record->setAttributeValue($rollBackTranslatedContentAttribute, simpleRecord($rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest)))); |
— | — | @@ -1012,10 +1023,12 @@ |
1013 | 1024 | |
1014 | 1025 | function getTranslatedContentHistorySelector($attribute) { |
1015 | 1026 | global |
1016 | | - $textAttribute, $recordLifeSpanAttribute; |
1017 | | - |
| 1027 | + $omegaWikiAttributes, $recordLifeSpanAttribute; |
| 1028 | + |
| 1029 | + $o=$omegaWikiAttributes; |
| 1030 | + |
1018 | 1031 | $result = createSuggestionsTableViewer($attribute); |
1019 | | - $result->addEditor(createLongTextViewer($textAttribute)); |
| 1032 | + $result->addEditor(createLongTextViewer($o->text)); |
1020 | 1033 | $result->addEditor(createTableLifeSpanEditor($recordLifeSpanAttribute)); |
1021 | 1034 | |
1022 | 1035 | $result = new RecordSetRecordSelector($result); |
— | — | @@ -1025,9 +1038,10 @@ |
1026 | 1039 | |
1027 | 1040 | function getUpdatedDefinedMeaningDefinitionEditor($attribute, $showRollBackOptions) { |
1028 | 1041 | global |
1029 | | - $definedMeaningReferenceAttribute, $languageAttribute, $textAttribute, |
| 1042 | + $definedMeaningReferenceAttribute, $omegaWikiAttributes, |
1030 | 1043 | $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $translatedContentHistoryAttribute; |
1031 | 1044 | |
| 1045 | + $o=$omegaWikiAttributes; |
1032 | 1046 | $editor = createTableViewer($attribute); |
1033 | 1047 | |
1034 | 1048 | if ($showRollBackOptions) { |
— | — | @@ -1038,8 +1052,8 @@ |
1039 | 1053 | } |
1040 | 1054 | |
1041 | 1055 | $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute)); |
1042 | | - $editor->addEditor(createLanguageViewer($languageAttribute)); |
1043 | | - $editor->addEditor(createLongTextViewer($textAttribute)); |
| 1056 | + $editor->addEditor(createLanguageViewer($o->language)); |
| 1057 | + $editor->addEditor(createLongTextViewer($o->text)); |
1044 | 1058 | $editor->addEditor(createShortTextViewer($operationAttribute)); |
1045 | 1059 | $editor->addEditor(createBooleanViewer($isLatestAttribute)); |
1046 | 1060 | |
— | — | @@ -1067,8 +1081,10 @@ |
1068 | 1082 | |
1069 | 1083 | function getUpdatedAlternativeDefinitionTextEditor($attribute, $showRollBackOptions) { |
1070 | 1084 | global |
1071 | | - $definedMeaningReferenceAttribute, $languageAttribute, $textAttribute, $sourceAttribute, |
| 1085 | + $definedMeaningReferenceAttribute, $omegaWikiAttributes, $sourceAttribute, |
1072 | 1086 | $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $translatedContentHistoryAttribute; |
| 1087 | + |
| 1088 | + $o=$omegaWikiAttributes; |
1073 | 1089 | |
1074 | 1090 | $editor = createTableViewer($attribute); |
1075 | 1091 | |
— | — | @@ -1080,8 +1096,8 @@ |
1081 | 1097 | } |
1082 | 1098 | |
1083 | 1099 | $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute)); |
1084 | | - $editor->addEditor(createLanguageViewer($languageAttribute)); |
1085 | | - $editor->addEditor(createLongTextViewer($textAttribute)); |
| 1100 | + $editor->addEditor(createLanguageViewer($o->language)); |
| 1101 | + $editor->addEditor(createLongTextViewer($o->text)); |
1086 | 1102 | $editor->addEditor(createDefinedMeaningReferenceViewer($sourceAttribute)); |
1087 | 1103 | $editor->addEditor(createShortTextViewer($operationAttribute)); |
1088 | 1104 | $editor->addEditor(createBooleanViewer($isLatestAttribute)); |
— | — | @@ -1187,9 +1203,11 @@ |
1188 | 1204 | |
1189 | 1205 | function getUpdatedTextEditor($attribute, $showRollBackOptions) { |
1190 | 1206 | global |
1191 | | - $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $textAttribute, |
| 1207 | + $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $omegaWikiAttributes, |
1192 | 1208 | $rollBackAttribute, $operationAttribute, $isLatestAttribute; |
1193 | 1209 | |
| 1210 | + $o=$omegaWikiAttributes; |
| 1211 | + |
1194 | 1212 | $editor = createTableViewer($attribute); |
1195 | 1213 | |
1196 | 1214 | if ($showRollBackOptions) |
— | — | @@ -1197,7 +1215,7 @@ |
1198 | 1216 | |
1199 | 1217 | $editor->addEditor(new ObjectPathEditor($objectIdAttribute)); |
1200 | 1218 | $editor->addEditor(createDefinedMeaningReferenceViewer($attributeAttribute)); |
1201 | | - $editor->addEditor(createLongTextViewer($textAttribute)); |
| 1219 | + $editor->addEditor(createLongTextViewer($o->text)); |
1202 | 1220 | $editor->addEditor(createShortTextViewer($operationAttribute)); |
1203 | 1221 | $editor->addEditor(createBooleanViewer($isLatestAttribute)); |
1204 | 1222 | |
— | — | @@ -1225,9 +1243,10 @@ |
1226 | 1244 | |
1227 | 1245 | function getUpdatedTranslatedTextEditor($attribute, $showRollBackOptions) { |
1228 | 1246 | global |
1229 | | - $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $languageAttribute, $textAttribute, |
| 1247 | + $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $omegaWikiAttributes, |
1230 | 1248 | $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $translatedContentHistoryAttribute; |
1231 | 1249 | |
| 1250 | + $o=$omegaWikiAttributes; |
1232 | 1251 | $editor = createTableViewer($attribute); |
1233 | 1252 | |
1234 | 1253 | if ($showRollBackOptions) { |
— | — | @@ -1239,8 +1258,8 @@ |
1240 | 1259 | |
1241 | 1260 | $editor->addEditor(new ObjectPathEditor($objectIdAttribute)); |
1242 | 1261 | $editor->addEditor(createDefinedMeaningReferenceViewer($attributeAttribute)); |
1243 | | - $editor->addEditor(createLanguageViewer($languageAttribute)); |
1244 | | - $editor->addEditor(createLongTextViewer($textAttribute)); |
| 1262 | + $editor->addEditor(createLanguageViewer($o->language)); |
| 1263 | + $editor->addEditor(createLongTextViewer($o->text)); |
1245 | 1264 | $editor->addEditor(createShortTextViewer($operationAttribute)); |
1246 | 1265 | $editor->addEditor(createBooleanViewer($isLatestAttribute)); |
1247 | 1266 | |
— | — | @@ -1384,7 +1403,7 @@ |
1385 | 1404 | |
1386 | 1405 | function rollBackDefinitions($idStack, $definitions) { |
1387 | 1406 | global |
1388 | | - $definedMeaningIdAttribute, $languageAttribute, $translatedContentIdAttribute, |
| 1407 | + $definedMeaningIdAttribute, $translatedContentIdAttribute, |
1389 | 1408 | $isLatestAttribute, $operationAttribute, $rollBackTranslatedContentAttribute; |
1390 | 1409 | |
1391 | 1410 | $definitionsKeyStructure = $definitions->getKey(); |
— | — | @@ -1393,7 +1412,7 @@ |
1394 | 1413 | $definitionRecord = $definitions->getRecord($i); |
1395 | 1414 | |
1396 | 1415 | $definedMeaningId = $definitionRecord->getAttributeValue($definedMeaningIdAttribute); |
1397 | | - $languageId = $definitionRecord->getAttributeValue($languageAttribute); |
| 1416 | + $languageId = $definitionRecord->language; |
1398 | 1417 | $isLatest = $definitionRecord->getAttributeValue($isLatestAttribute); |
1399 | 1418 | |
1400 | 1419 | if ($isLatest) { |
— | — | @@ -1414,7 +1433,7 @@ |
1415 | 1434 | |
1416 | 1435 | function rollBackTranslatedTexts($idStack, $translatedTexts) { |
1417 | 1436 | global |
1418 | | - $valueIdAttribute, $languageAttribute, $translatedContentIdAttribute, |
| 1437 | + $valueIdAttribute, $translatedContentIdAttribute, |
1419 | 1438 | $isLatestAttribute, $operationAttribute, $rollBackTranslatedContentAttribute; |
1420 | 1439 | |
1421 | 1440 | $translatedTextsKeyStructure = $translatedTexts->getKey(); |
— | — | @@ -1423,7 +1442,7 @@ |
1424 | 1443 | $translatedTextRecord = $translatedTexts->getRecord($i); |
1425 | 1444 | |
1426 | 1445 | $valueId = $translatedTextRecord->getAttributeValue($valueIdAttribute); |
1427 | | - $languageId = $translatedTextRecord->getAttributeValue($languageAttribute); |
| 1446 | + $languageId = $translatedTextRecord->language; |
1428 | 1447 | $isLatest = $translatedTextRecord->getAttributeValue($isLatestAttribute); |
1429 | 1448 | |
1430 | 1449 | if ($isLatest) { |
— | — | @@ -1685,7 +1704,7 @@ |
1686 | 1705 | |
1687 | 1706 | function rollBackTextAttributes($idStack, $textAttributes) { |
1688 | 1707 | global |
1689 | | - $isLatestAttribute, $operationAttribute, $rollBackAttribute, $textAttribute, |
| 1708 | + $isLatestAttribute, $operationAttribute, $rollBackAttribute, |
1690 | 1709 | $valueIdAttribute, $objectIdAttribute, $attributeAttribute, $translatedContentIdAttribute; |
1691 | 1710 | |
1692 | 1711 | $textAttributesKeyStructure = $textAttributes->getKey(); |
— | — | @@ -1704,7 +1723,7 @@ |
1705 | 1724 | $valueId, |
1706 | 1725 | $textAttributeRecord->getAttributeValue($objectIdAttribute), |
1707 | 1726 | getMeaningId($textAttributeRecord, $attributeAttribute), |
1708 | | - $textAttributeRecord->getAttributeValue($textAttribute), |
| 1727 | + $textAttributeRecord->text, |
1709 | 1728 | $textAttributeRecord->getAttributeValue($operationAttribute) |
1710 | 1729 | ); |
1711 | 1730 | |
— | — | @@ -1723,7 +1742,7 @@ |
1724 | 1743 | function rollBackSyntranses($idStack, $syntranses) { |
1725 | 1744 | global |
1726 | 1745 | $isLatestAttribute, $operationAttribute, $rollBackAttribute, $syntransIdAttribute, $identicalMeaningAttribute, |
1727 | | - $spellingAttribute, $languageAttribute, $expressionAttribute, $definedMeaningIdAttribute, $expressionIdAttribute; |
| 1746 | + $expressionAttribute, $definedMeaningIdAttribute, $expressionIdAttribute; |
1728 | 1747 | |
1729 | 1748 | $syntransesKeyStructure = $syntranses->getKey(); |
1730 | 1749 | |
— | — | @@ -1759,7 +1778,7 @@ |
1760 | 1779 | |
1761 | 1780 | function rollBackAlternativeDefinitionTexts($idStack, $alternativeDefinitionTexts) { |
1762 | 1781 | global |
1763 | | - $definedMeaningIdAttribute, $languageAttribute, $translatedContentIdAttribute, |
| 1782 | + $definedMeaningIdAttribute, $translatedContentIdAttribute, |
1764 | 1783 | $isLatestAttribute, $operationAttribute, $rollBackTranslatedContentAttribute; |
1765 | 1784 | |
1766 | 1785 | $alternativeDefinitionTextsKeyStructure = $alternativeDefinitionTexts->getKey(); |
— | — | @@ -1768,7 +1787,7 @@ |
1769 | 1788 | $alternativeDefinitionTextRecord = $alternativeDefinitionTexts->getRecord($i); |
1770 | 1789 | |
1771 | 1790 | $translatedContentId = $alternativeDefinitionTextRecord->getAttributeValue($translatedContentIdAttribute); |
1772 | | - $languageId = $alternativeDefinitionTextRecord->getAttributeValue($languageAttribute); |
| 1791 | + $languageId = $alternativeDefinitionTextRecord->language; |
1773 | 1792 | $isLatest = $alternativeDefinitionTextRecord->getAttributeValue($isLatestAttribute); |
1774 | 1793 | |
1775 | 1794 | if ($isLatest) { |