r23691 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23690‎ | r23691 | r23692 >
Date:22:55, 3 July 2007
Author:proes
Status:old
Tags:
Comment:
Fixed Special:Transaction
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Transaction.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php
@@ -393,7 +393,8 @@
394394
395395 function getTransactionRecordSet($fromTransactionId, $transactionCount, $userName) {
396396 global
397 - $transactionAttribute, $transactionIdAttribute, $transactionsTable, $updatesInTransactionAttribute;
 397+ $transactionAttribute, $transactionIdAttribute, $transactionsTable, $updatesInTransactionAttribute;
 398+
398399 $dc=wdGetDataSetContext();
399400 $queryTransactionInformation = new QueryLatestTransactionInformation();
400401
@@ -610,7 +611,9 @@
611612 $recordSet->add($record);
612613 }
613614
614 - expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $alternativeDefinitionTextAttribute, 0, new QueryLatestTransactionInformation());
 615+ $viewInformation = new ViewInformation();
 616+ $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation();
 617+ expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $alternativeDefinitionTextAttribute, $viewInformation);
615618
616619 return $recordSet;
617620 }
@@ -953,7 +956,9 @@
954957 $recordSet->add($record);
955958 }
956959
957 - expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $translatedTextTextAttribute, 0, new QueryLatestTransactionInformation());
 960+ $viewInformation = new ViewInformation();
 961+ $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation();
 962+ expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $translatedTextTextAttribute, $viewInformation);
958963
959964 return $recordSet;
960965 }
@@ -1084,9 +1089,12 @@
10851090
10861091 if ($showRollBackOptions)
10871092 $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1093+
 1094+ $viewInformation = new ViewInformation();
 1095+ $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation();
10881096
10891097 $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute));
1090 - $editor->addEditor(getExpressionTableCellEditor($expressionAttribute, 0));
 1098+ $editor->addEditor(getExpressionTableCellEditor($expressionAttribute, $viewInformation));
10911099 $editor->addEditor(new BooleanEditor($identicalMeaningAttribute, new SimplePermissionController(false), false, false));
10921100 $editor->addEditor(createShortTextViewer($operationAttribute));
10931101 $editor->addEditor(createBooleanViewer($isLatestAttribute));
Index: trunk/extensions/Wikidata/OmegaWiki/Transaction.php
@@ -220,7 +220,7 @@
221221
222222 global
223223 $transactionIdAttribute, $userAttribute, $userIPAttribute, $timestampAttribute,
224 - $transactionStructure, $summaryAttribute,
 224+ $transactionStructure, $transactionAttribute, $summaryAttribute,
225225 $addTransactionAttribute, $removeTransactionAttribute,
226226 $recordLifeSpanAttribute, $recordLifeSpanStructure;
227227
@@ -230,6 +230,7 @@
231231 $timestampAttribute = new Attribute('timestamp', 'Time', 'timestamp');
232232 $summaryAttribute = new Attribute('summary', 'Summary', 'text');
233233 $transactionStructure = new Structure($transactionIdAttribute, $userAttribute, $userIPAttribute, $timestampAttribute, $summaryAttribute);
 234+$transactionAttribute = new Attribute('transaction', 'Transaction', $transactionStructure);
234235
235236 $addTransactionAttribute = new Attribute('add-transaction', 'Added', $transactionStructure);
236237 $removeTransactionAttribute = new Attribute('remove-transaction', 'Removed', $transactionStructure);
@@ -256,7 +257,7 @@
257258 return "Unknown";
258259 }
259260
260 -function expandUserIDsInRecordSet($recordSet, $userIDAttribute, $userIPAttribute) {
 261+function expandUserIDsInRecordSet(RecordSet $recordSet, Attribute $userIDAttribute, Attribute $userIPAttribute) {
261262 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
262263 $record = $recordSet->getRecord($i);
263264 $record->setAttributeValue(
@@ -269,7 +270,7 @@
270271 }
271272 }
272273
273 -function expandTransactionIdsInRecordSet($recordSet, $transactionIdAttribute, $transactionAttribute) {
 274+function expandTransactionIdsInRecordSet(RecordSet $recordSet, Attribute $transactionIdAttribute, Attribute $transactionAttribute) {
274275 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
275276 $record = $recordSet->getRecord($i);
276277 $record->setAttributeValue(

Status & tagging log