Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php |
— | — | @@ -393,7 +393,8 @@ |
394 | 394 | |
395 | 395 | function getTransactionRecordSet($fromTransactionId, $transactionCount, $userName) { |
396 | 396 | global |
397 | | - $transactionAttribute, $transactionIdAttribute, $transactionsTable, $updatesInTransactionAttribute; |
| 397 | + $transactionAttribute, $transactionIdAttribute, $transactionsTable, $updatesInTransactionAttribute; |
| 398 | + |
398 | 399 | $dc=wdGetDataSetContext(); |
399 | 400 | $queryTransactionInformation = new QueryLatestTransactionInformation(); |
400 | 401 | |
— | — | @@ -610,7 +611,9 @@ |
611 | 612 | $recordSet->add($record); |
612 | 613 | } |
613 | 614 | |
614 | | - expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $alternativeDefinitionTextAttribute, 0, new QueryLatestTransactionInformation()); |
| 615 | + $viewInformation = new ViewInformation(); |
| 616 | + $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation(); |
| 617 | + expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $alternativeDefinitionTextAttribute, $viewInformation); |
615 | 618 | |
616 | 619 | return $recordSet; |
617 | 620 | } |
— | — | @@ -953,7 +956,9 @@ |
954 | 957 | $recordSet->add($record); |
955 | 958 | } |
956 | 959 | |
957 | | - expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $translatedTextTextAttribute, 0, new QueryLatestTransactionInformation()); |
| 960 | + $viewInformation = new ViewInformation(); |
| 961 | + $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation(); |
| 962 | + expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $translatedTextTextAttribute, $viewInformation); |
958 | 963 | |
959 | 964 | return $recordSet; |
960 | 965 | } |
— | — | @@ -1084,9 +1089,12 @@ |
1085 | 1090 | |
1086 | 1091 | if ($showRollBackOptions) |
1087 | 1092 | $editor->addEditor(new RollbackEditor($rollBackAttribute, false)); |
| 1093 | + |
| 1094 | + $viewInformation = new ViewInformation(); |
| 1095 | + $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation(); |
1088 | 1096 | |
1089 | 1097 | $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute)); |
1090 | | - $editor->addEditor(getExpressionTableCellEditor($expressionAttribute, 0)); |
| 1098 | + $editor->addEditor(getExpressionTableCellEditor($expressionAttribute, $viewInformation)); |
1091 | 1099 | $editor->addEditor(new BooleanEditor($identicalMeaningAttribute, new SimplePermissionController(false), false, false)); |
1092 | 1100 | $editor->addEditor(createShortTextViewer($operationAttribute)); |
1093 | 1101 | $editor->addEditor(createBooleanViewer($isLatestAttribute)); |
Index: trunk/extensions/Wikidata/OmegaWiki/Transaction.php |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | |
222 | 222 | global |
223 | 223 | $transactionIdAttribute, $userAttribute, $userIPAttribute, $timestampAttribute, |
224 | | - $transactionStructure, $summaryAttribute, |
| 224 | + $transactionStructure, $transactionAttribute, $summaryAttribute, |
225 | 225 | $addTransactionAttribute, $removeTransactionAttribute, |
226 | 226 | $recordLifeSpanAttribute, $recordLifeSpanStructure; |
227 | 227 | |
— | — | @@ -230,6 +230,7 @@ |
231 | 231 | $timestampAttribute = new Attribute('timestamp', 'Time', 'timestamp'); |
232 | 232 | $summaryAttribute = new Attribute('summary', 'Summary', 'text'); |
233 | 233 | $transactionStructure = new Structure($transactionIdAttribute, $userAttribute, $userIPAttribute, $timestampAttribute, $summaryAttribute); |
| 234 | +$transactionAttribute = new Attribute('transaction', 'Transaction', $transactionStructure); |
234 | 235 | |
235 | 236 | $addTransactionAttribute = new Attribute('add-transaction', 'Added', $transactionStructure); |
236 | 237 | $removeTransactionAttribute = new Attribute('remove-transaction', 'Removed', $transactionStructure); |
— | — | @@ -256,7 +257,7 @@ |
257 | 258 | return "Unknown"; |
258 | 259 | } |
259 | 260 | |
260 | | -function expandUserIDsInRecordSet($recordSet, $userIDAttribute, $userIPAttribute) { |
| 261 | +function expandUserIDsInRecordSet(RecordSet $recordSet, Attribute $userIDAttribute, Attribute $userIPAttribute) { |
261 | 262 | for ($i = 0; $i < $recordSet->getRecordCount(); $i++) { |
262 | 263 | $record = $recordSet->getRecord($i); |
263 | 264 | $record->setAttributeValue( |
— | — | @@ -269,7 +270,7 @@ |
270 | 271 | } |
271 | 272 | } |
272 | 273 | |
273 | | -function expandTransactionIdsInRecordSet($recordSet, $transactionIdAttribute, $transactionAttribute) { |
| 274 | +function expandTransactionIdsInRecordSet(RecordSet $recordSet, Attribute $transactionIdAttribute, Attribute $transactionAttribute) { |
274 | 275 | for ($i = 0; $i < $recordSet->getRecordCount(); $i++) { |
275 | 276 | $record = $recordSet->getRecord($i); |
276 | 277 | $record->setAttributeValue( |