r24799 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24798‎ | r24799 | r24800 >
Date:22:54, 14 August 2007
Author:kim
Status:old
Tags:
Comment:
Using metaprogramming to change code. Bulk edit.
Basics seem to work (load+submit of dm+expr, SpecialSuggest)
Please test some more in case there are lurking bugs
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/Controller.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/NeedsTranslationTo.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Search.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialNeedsTranslation.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Transaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataBootstrappedMeanings.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/converter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php
@@ -137,12 +137,12 @@
138138 }
139139
140140 protected function getIdStack($definedMeaningId) {
141 - global
142 - $definedMeaningIdAttribute;
 141+
 142+ $o=OmegaWikiAttributes::getInstance();
143143
144 - $definedMeaningIdStructure = new Structure($definedMeaningIdAttribute);
 144+ $definedMeaningIdStructure = new Structure($o->definedMeaningId);
145145 $definedMeaningIdRecord = new ArrayRecord($definedMeaningIdStructure, $definedMeaningIdStructure);
146 - $definedMeaningIdRecord->setAttributeValue($definedMeaningIdAttribute, $definedMeaningId);
 146+ $definedMeaningIdRecord->definedMeaningId = $definedMeaningId;
147147
148148 $idStack = new IdStack("defined-meaning");
149149 $idStack->pushKey($definedMeaningIdRecord);
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php
@@ -233,11 +233,11 @@
234234 }
235235
236236 function getWordsSearchResultAsRecordSet($queryResult) {
237 - global
238 - $definedMeaningIdAttribute;
 237+
 238+ $o=OmegaWikiAttributes::getInstance();
239239
240240 $dbr =& wfGetDB(DB_SLAVE);
241 - $recordSet = new ArrayRecordSet(new Structure($definedMeaningIdAttribute, $this->expressionAttribute, $this->meaningAttribute), new Structure($definedMeaningIdAttribute));
 241+ $recordSet = new ArrayRecordSet(new Structure($o->definedMeaningId, $this->expressionAttribute, $this->meaningAttribute), new Structure($o->definedMeaningId));
242242
243243 while ($row = $dbr->fetchObject($queryResult)) {
244244 $expressionRecord = new ArrayRecord($this->expressionStructure);
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataBootstrappedMeanings.php
@@ -6,7 +6,7 @@
77 $definitionMeaningName,
88 $relationMeaningName,
99 $synTransMeaningName,
10 -
 10+
1111 $classAttributeLevels;
1212
1313 $definedMeaningMeaningName = "DefinedMeaning";
Index: trunk/extensions/Wikidata/OmegaWiki/converter.php
@@ -56,11 +56,11 @@
5757 protected $attributes = array();
5858
5959 public function __construct($attribute) {
60 - global
61 - $expressionAttribute;
 60+
 61+ $o=OmegaWikiAttributes::getInstance();
6262
6363 parent::__construct($attribute);
64 - $this->structure = new Structure($expressionAttribute);
 64+ $this->structure = new Structure($o->expression);
6565 }
6666
6767 public function getStructure() {
@@ -70,8 +70,8 @@
7171 public function convert($record) {
7272 $dc=wdGetDataSetContext();
7373
74 - global
75 - $expressionAttribute, $expressionIdAttribute, $languageAttribute, $spellingAttribute;
 74+
 75+ $o=OmegaWikiAttributes::getInstance();
7676
7777 $dbr =& wfGetDB(DB_SLAVE);
7878 $expressionId = $record->getAttributeValue($this->attribute);
@@ -79,12 +79,12 @@
8080 " AND ". getLatestTransactionRestriction("{$dc}_expression_ns"));
8181 $expression = $dbr->fetchObject($queryResult);
8282
83 - $expressionRecord = new ArrayRecord(new Structure($languageAttribute, $spellingAttribute));
84 - $expressionRecord->setAttributeValue($languageAttribute, $expression->language_id);
85 - $expressionRecord->setAttributeValue($spellingAttribute, $expression->spelling);
 83+ $expressionRecord = new ArrayRecord(new Structure($o->language, $o->spelling));
 84+ $expressionRecord->language = $expression->language_id;
 85+ $expressionRecord->spelling = $expression->spelling;
8686
8787 $result = new ArrayRecord($this->structure);
88 - $result->setAttributeValue($expressionAttribute, $expressionRecord);
 88+ $result->expression = $expressionRecord;
8989
9090 return $result;
9191 }
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialNeedsTranslation.php
@@ -44,9 +44,9 @@
4545 }
4646
4747 protected function showExpressionsNeedingTranslation($sourceLanguageId, $destinationLanguageId,$collectionId) {
48 - global
49 - $definedMeaningIdAttribute, $expressionIdAttribute, $expressionAttribute, $expressionStructure;
 48+
5049 $o=OmegaWikiAttributes::getInstance();
 50+ $o=OmegaWikiAttributes::getInstance();
5151
5252 $dc=wdGetDataSetContext();
5353 require_once("Transaction.php");
@@ -84,17 +84,17 @@
8585
8686 $queryResult = $dbr->query($sql);
8787 $definitionAttribute = new Attribute("definition", "Definition", "definition");
88 - $recordSet = new ArrayRecordSet(new Structure($definedMeaningIdAttribute, $expressionIdAttribute, $expressionAttribute, $definitionAttribute), new Structure($definedMeaningIdAttribute, $expressionIdAttribute));
 88+ $recordSet = new ArrayRecordSet(new Structure($o->definedMeaningId, $o->expressionId, $o->expression, $definitionAttribute), new Structure($o->definedMeaningId, $o->expressionId));
8989
9090 while ($row = $dbr->fetchObject($queryResult)) {
91 - $expressionRecord = new ArrayRecord($expressionStructure);
 91+ $expressionRecord = new ArrayRecord($o->expressionStructure);
9292 $expressionRecord->language = $row->source_language_id;
9393 $expressionRecord->spelling = $row->source_spelling;
9494
9595 $recordSet->addRecord(array($row->source_defined_meaning_id, $row->source_expression_id, $expressionRecord, getDefinedMeaningDefinition($row->source_defined_meaning_id)));
9696 }
9797
98 - $expressionEditor = new RecordTableCellEditor($expressionAttribute);
 98+ $expressionEditor = new RecordTableCellEditor($o->expression);
9999 $expressionEditor->addEditor(new LanguageEditor($o->language, new SimplePermissionController(false), false));
100100 $expressionEditor->addEditor(new SpellingEditor($o->spelling, new SimplePermissionController(false), false));
101101
Index: trunk/extensions/Wikidata/OmegaWiki/NeedsTranslationTo.php
@@ -47,8 +47,8 @@
4848 }
4949
5050 protected function showExpressionsNeedingTranslation($sourceLanguageId, $destinationLanguageId) {
51 - global
52 - $definedMeaningIdAttribute, $expressionIdAttribute, $expressionAttribute, $expressionStructure;
 51+
 52+ $o=OmegaWikiAttributes::getInstance();
5353
5454 $dc=wdGetDataSetContext();
5555 $o=OmegaWikiAttributes::getInstance();
@@ -69,17 +69,17 @@
7070 " LIMIT 100");
7171
7272 $definitionAttribute = new Attribute("definition", "Definition", "definition");
73 - $recordSet = new ArrayRecordSet(new Structure($definedMeaningIdAttribute, $expressionIdAttribute, $expressionAttribute, $definitionAttribute), new Structure($definedMeaningIdAttribute, $expressionIdAttribute));
 73+ $recordSet = new ArrayRecordSet(new Structure($o->definedMeaningId, $o->expressionId, $o->expression, $definitionAttribute), new Structure($o->definedMeaningId, $o->expressionId));
7474
7575 while ($row = $dbr->fetchObject($queryResult)) {
76 - $expressionRecord = new ArrayRecord($expressionStructure);
 76+ $expressionRecord = new ArrayRecord($o->expressionStructure);
7777 $expressionRecord->language = $row->source_language_id;
7878 $expressionRecord->spelling = $row->source_spelling;
7979
8080 $recordSet->addRecord(array($row->source_defined_meaning_id, $row->source_expression_id, $expressionRecord, getDefinedMeaningDefinition($row->source_defined_meaning_id)));
8181 }
8282
83 - $expressionEditor = new RecordTableCellEditor($expressionAttribute);
 83+ $expressionEditor = new RecordTableCellEditor($o->expression);
8484 $expressionEditor->addEditor(new LanguageEditor($o->language, new SimplePermissionController(false), false));
8585 $expressionEditor->addEditor(new SpellingEditor($spellingAttribute, new SimplePermissionController(false), false));
8686
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
@@ -38,7 +38,8 @@
3939
4040 function getSuggestions() {
4141
42 - global $idAttribute;
 42+
 43+ $o=OmegaWikiAttributes::getInstance();
4344 global $wgUser;
4445 $dc=wdGetDataSetContext();
4546 @$search = ltrim($_GET['search-text']);
@@ -143,7 +144,7 @@
144145 //wfdebug("]]]".$sql."\n");
145146 $queryResult = $dbr->query($sql);
146147
147 - $idAttribute = new Attribute("id", "ID", "id");
 148+ $o->id = new Attribute("id", "ID", "id");
148149
149150 # == Process query
150151 switch($query) {
@@ -339,9 +340,11 @@
340341 }
341342
342343 function getSQLForLevels($language="<ANY>") {
 344+
343345 global
344 - $definedMeaningTable, $expressionTable, $bootstrappedDefinedMeaningsTable, $classAttributeLevels;
 346+ $definedMeaningTable, $expressionTable, $bootstrappedDefinedMeaningsTable;
345347
 348+ $o=OmegaWikiAttributes::getInstance();
346349 // TO DO: Add support for multiple languages here
347350 return
348351 selectLatest(
@@ -356,15 +359,15 @@
357360 }
358361
359362 function getRelationTypeAsRecordSet($queryResult) {
360 - global
361 - $idAttribute;
 363+
 364+ $o=OmegaWikiAttributes::getInstance();
362365
363366 $dbr =& wfGetDB(DB_SLAVE);
364367
365368 $relationTypeAttribute = new Attribute("relation-type", "Relation type", "short-text");
366369 $collectionAttribute = new Attribute("collection", "Collection", "short-text");
367370
368 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $relationTypeAttribute, $collectionAttribute), new Structure($idAttribute));
 371+ $recordSet = new ArrayRecordSet(new Structure($o->id, $relationTypeAttribute, $collectionAttribute), new Structure($o->id));
369372
370373 while ($row = $dbr->fetchObject($queryResult))
371374 $recordSet->addRecord(array($row->member_mid, $row->spelling, definedMeaningExpression($row->collection_mid)));
@@ -377,14 +380,14 @@
378381 }
379382
380383 function getClassAsRecordSet($queryResult) {
381 - global
382 - $idAttribute;
 384+
 385+ $o=OmegaWikiAttributes::getInstance();
383386
384387 $dbr =& wfGetDB(DB_SLAVE);
385388 $classAttribute = new Attribute("class", "Class", "short-text");
386389 $collectionAttribute = new Attribute("collection", "Collection", "short-text");
387390
388 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $classAttribute, $collectionAttribute), new Structure($idAttribute));
 391+ $recordSet = new ArrayRecordSet(new Structure($o->id, $classAttribute, $collectionAttribute), new Structure($o->id));
389392
390393 while ($row = $dbr->fetchObject($queryResult))
391394 $recordSet->addRecord(array($row->member_mid, $row->spelling, definedMeaningExpression($row->collection_mid)));
@@ -397,13 +400,13 @@
398401 }
399402
400403 function getTextAttributeAsRecordSet($queryResult) {
401 - global
402 - $idAttribute;
 404+
 405+ $o=OmegaWikiAttributes::getInstance();
403406
404407 $dbr =& wfGetDB(DB_SLAVE);
405408
406409 $textAttributeAttribute = new Attribute("text-attribute", "Text attribute", "short-text");
407 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $textAttributeAttribute), new Structure($idAttribute));
 410+ $recordSet = new ArrayRecordSet(new Structure($o->id, $textAttributeAttribute), new Structure($o->id));
408411
409412 while ($row = $dbr->fetchObject($queryResult))
410413 $recordSet->addRecord(array($row->attribute_mid, $row->spelling));
@@ -415,13 +418,13 @@
416419 }
417420
418421 function getLinkAttributeAsRecordSet($queryResult) {
419 - global
420 - $idAttribute;
 422+
 423+ $o=OmegaWikiAttributes::getInstance();
421424
422425 $dbr =& wfGetDB(DB_SLAVE);
423426
424427 $linkAttributeAttribute = new Attribute("link-attribute", "Link attribute", "short-text");
425 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $linkAttributeAttribute), new Structure($idAttribute));
 428+ $recordSet = new ArrayRecordSet(new Structure($o->id, $linkAttributeAttribute), new Structure($o->id));
426429
427430 while ($row = $dbr->fetchObject($queryResult))
428431 $recordSet->addRecord(array($row->attribute_mid, $row->spelling));
@@ -433,13 +436,13 @@
434437 }
435438
436439 function getTranslatedTextAttributeAsRecordSet($queryResult) {
437 - global
438 - $idAttribute;
 440+
 441+ $o=OmegaWikiAttributes::getInstance();
439442
440443 $dbr =& wfGetDB(DB_SLAVE);
441444 $translatedTextAttributeAttribute = new Attribute("translated-text-attribute", "Translated text attribute", "short-text");
442445
443 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $translatedTextAttributeAttribute), new Structure($idAttribute));
 446+ $recordSet = new ArrayRecordSet(new Structure($o->id, $translatedTextAttributeAttribute), new Structure($o->id));
444447
445448 while ($row = $dbr->fetchObject($queryResult))
446449 $recordSet->addRecord(array($row->attribute_mid, $row->spelling));
@@ -451,13 +454,13 @@
452455 }
453456
454457 function getOptionAttributeAsRecordSet($queryResult) {
455 - global
456 - $idAttribute;
 458+
 459+ $o=OmegaWikiAttributes::getInstance();
457460
458461 $dbr =& wfGetDB(DB_SLAVE);
459462
460463 $optionAttributeAttribute = new Attribute("option-attribute", "Option attribute", "short-text");
461 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $optionAttributeAttribute), new Structure($idAttribute));
 464+ $recordSet = new ArrayRecordSet(new Structure($o->id, $optionAttributeAttribute), new Structure($o->id));
462465
463466 while ($row = $dbr->fetchObject($queryResult))
464467 $recordSet->addRecord(array($row->attribute_mid, $row->spelling));
@@ -469,9 +472,9 @@
470473 }
471474
472475 function getDefinedMeaningAsRecordSet($queryResult) {
473 - global
474 - $idAttribute;
475476
 477+ $o=OmegaWikiAttributes::getInstance();
 478+
476479 $dbr =& wfGetDB(DB_SLAVE);
477480 $spellingAttribute = new Attribute("spelling", "Spelling", "short-text");
478481 $languageAttribute = new Attribute("language", "Language", "language");
@@ -480,7 +483,7 @@
481484 $definedMeaningAttribute = new Attribute(null, "Defined meaning", $expressionStructure);
482485 $definitionAttribute = new Attribute("definition", "Definition", "definition");
483486
484 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $definedMeaningAttribute, $definitionAttribute), new Structure($idAttribute));
 487+ $recordSet = new ArrayRecordSet(new Structure($o->id, $definedMeaningAttribute, $definitionAttribute), new Structure($o->id));
485488
486489 while ($row = $dbr->fetchObject($queryResult)) {
487490 $definedMeaningRecord = new ArrayRecord($expressionStructure);
@@ -502,13 +505,13 @@
503506 }
504507
505508 function getClassAttributeLevelAsRecordSet($queryResult) {
506 - global
507 - $idAttribute;
 509+
 510+ $o=OmegaWikiAttributes::getInstance();
508511
509512 $dbr =& wfGetDB(DB_SLAVE);
510513
511514 $classAttributeLevelAttribute = new Attribute("class-attribute-level", "Level", "short-text");
512 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $classAttributeLevelAttribute), new Structure($idAttribute));
 515+ $recordSet = new ArrayRecordSet(new Structure($o->id, $classAttributeLevelAttribute), new Structure($o->id));
513516
514517 while ($row = $dbr->fetchObject($queryResult))
515518 $recordSet->addRecord(array($row->defined_meaning_id, $row->spelling));
@@ -520,13 +523,13 @@
521524 }
522525
523526 function getCollectionAsRecordSet($queryResult) {
524 - global
525 - $idAttribute;
526527
 528+ $o=OmegaWikiAttributes::getInstance();
 529+
527530 $dbr =& wfGetDB(DB_SLAVE);
528531 $collectionAttribute = new Attribute("collection", "Collection", "short-text");
529532
530 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $collectionAttribute), new Structure($idAttribute));
 533+ $recordSet = new ArrayRecordSet(new Structure($o->id, $collectionAttribute), new Structure($o->id));
531534
532535 while ($row = $dbr->fetchObject($queryResult))
533536 $recordSet->addRecord(array($row->collection_id, $row->spelling));
@@ -538,13 +541,13 @@
539542 }
540543
541544 function getLanguageAsRecordSet($queryResult) {
542 - global
543 - $idAttribute;
544545
 546+ $o=OmegaWikiAttributes::getInstance();
 547+
545548 $dbr =& wfGetDB(DB_SLAVE);
546549 $languageAttribute = new Attribute("language", "Language", "short-text");
547550
548 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $languageAttribute), new Structure($idAttribute));
 551+ $recordSet = new ArrayRecordSet(new Structure($o->id, $languageAttribute), new Structure($o->id));
549552
550553 while ($row = $dbr->fetchObject($queryResult)) {
551554 $recordSet->addRecord(array($row->row_id, $row->language_name));
@@ -556,8 +559,8 @@
557560 }
558561
559562 function getTransactionAsRecordSet($queryResult) {
560 - global
561 - $idAttribute;
 563+
 564+ $o=OmegaWikiAttributes::getInstance();
562565
563566 $dbr =& wfGetDB(DB_SLAVE);
564567
@@ -565,14 +568,14 @@
566569 $timestampAttribute = new Attribute("timestamp", "Time", "timestamp");
567570 $summaryAttribute = new Attribute("summary", "Summary", "short-text");
568571
569 - $recordSet = new ArrayRecordSet(new Structure($idAttribute, $userAttribute, $timestampAttribute, $summaryAttribute), new Structure($idAttribute));
 572+ $recordSet = new ArrayRecordSet(new Structure($o->id, $userAttribute, $timestampAttribute, $summaryAttribute), new Structure($o->id));
570573
571574 while ($row = $dbr->fetchObject($queryResult))
572575 $recordSet->addRecord(array($row->transaction_id, getUserLabel($row->user_id, $row->user_ip), $row->time, $row->comment));
573576
574577 $editor = createSuggestionsTableViewer(null);
575578 $editor->addEditor(createShortTextViewer($timestampAttribute));
576 - $editor->addEditor(createShortTextViewer($idAttribute));
 579+ $editor->addEditor(createShortTextViewer($o->id));
577580 $editor->addEditor(createShortTextViewer($userAttribute));
578581 $editor->addEditor(createShortTextViewer($summaryAttribute));
579582
Index: trunk/extensions/Wikidata/OmegaWiki/Controller.php
@@ -42,9 +42,9 @@
4343
4444 class DefinedMeaningDefinitionController implements UpdateController {
4545 public function add($keyPath, $record) {
46 - global
47 - $definedMeaningIdAttribute;
48 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
 46+
 47+ $o=OmegaWikiAttributes::getInstance();
 48+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
4949 $languageId = $record->language;
5050 $text = $record->text;
5151
@@ -53,19 +53,19 @@
5454 }
5555
5656 public function remove($keyPath) {
57 - global
58 - $definedMeaningIdAttribute;
5957
60 - $definedMeaningId = $keyPath->peek(1)->getAttributeValue($definedMeaningIdAttribute);
 58+ $o=OmegaWikiAttributes::getInstance();
 59+
 60+ $definedMeaningId = $keyPath->peek(1)->definedMeaningId;
6161 $languageId = $keyPath->peek(0)->language;
6262 removeDefinedMeaningDefinition($definedMeaningId, $languageId);
6363 }
6464
6565 public function update($keyPath, $record) {
66 - global
67 - $definedMeaningIdAttribute;
6866
69 - $definedMeaningId = $keyPath->peek(1)->getAttributeValue($definedMeaningIdAttribute);
 67+ $o=OmegaWikiAttributes::getInstance();
 68+
 69+ $definedMeaningId = $keyPath->peek(1)->definedMeaningId;
7070 $languageId = $keyPath->peek(0)->language;
7171 $text = $record->text;
7272
@@ -82,10 +82,10 @@
8383 }
8484
8585 public function update($keyPath, $value) {
86 - global
87 - $definedMeaningIdAttribute;
8886
89 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
 87+ $o=OmegaWikiAttributes::getInstance();
 88+
 89+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
9090
9191 if ($value != "")
9292 updateOrAddDefinedMeaningDefinition($definedMeaningId, $this->filterLanguageId, $value);
@@ -100,14 +100,13 @@
101101 }
102102
103103 public function add($keyPath, $record) {
104 - global
105 - $definedMeaningIdAttribute, $alternativeDefinitionAttribute,
106 - $sourceAttribute;
107104
108 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
109 - $alternativeDefinition = $record->getAttributeValue($alternativeDefinitionAttribute);
110 - $sourceId = $record->getAttributeValue($sourceAttribute);
 105+ $o=OmegaWikiAttributes::getInstance();
111106
 107+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
 108+ $alternativeDefinition = $record->alternativeDefinition;
 109+ $sourceId = $record->source;
 110+
112111 if ($this->filterLanguageId == 0) {
113112 if ($alternativeDefinition->getRecordCount() > 0) {
114113 $definitionRecord = $alternativeDefinition->getRecord(0);
@@ -124,11 +123,11 @@
125124 }
126125
127126 public function remove($keyPath) {
128 - global
129 - $definedMeaningIdAttribute, $definitionIdAttribute;
130127
131 - $definedMeaningId = $keyPath->peek(1)->getAttributeValue($definedMeaningIdAttribute);
132 - $definitionId = $keyPath->peek(0)->getAttributeValue($definitionIdAttribute);
 128+ $o=OmegaWikiAttributes::getInstance();
 129+
 130+ $definedMeaningId = $keyPath->peek(1)->definedMeaningId;
 131+ $definitionId = $keyPath->peek(0)->definitionId;
133132 removeDefinedMeaningAlternativeDefinition($definedMeaningId, $definitionId);
134133 }
135134
@@ -138,10 +137,10 @@
139138
140139 class DefinedMeaningAlternativeDefinitionController implements UpdateController {
141140 public function add($keyPath, $record) {
142 - global
143 - $expressionIdAttribute, $definitionIdAttribute ;
144141
145 - $definitionId = $keyPath->peek(0)->getAttributeValue($definitionIdAttribute);
 142+ $o=OmegaWikiAttributes::getInstance();
 143+
 144+ $definitionId = $keyPath->peek(0)->definitionId;
146145 $languageId = $record->language;
147146 $text = $record->text;
148147
@@ -150,20 +149,20 @@
151150 }
152151
153152 public function remove($keyPath) {
154 - global
155 - $definitionIdAttribute;
156153
157 - $definitionId = $keyPath->peek(1)->getAttributeValue($definitionIdAttribute);
 154+ $o=OmegaWikiAttributes::getInstance();
 155+
 156+ $definitionId = $keyPath->peek(1)->definitionId;
158157 $languageId = $keyPath->peek(0)->language;
159158
160159 removeTranslatedText($definitionId, $languageId);
161160 }
162161
163162 public function update($keyPath, $record) {
164 - global
165 - $definitionIdAttribute;
166163
167 - $definitionId = $keyPath->peek(1)->getAttributeValue($definitionIdAttribute);
 164+ $o=OmegaWikiAttributes::getInstance();
 165+
 166+ $definitionId = $keyPath->peek(1)->definitionId;
168167 $languageId = $keyPath->peek(0)->language;
169168 $text = $record->text;
170169
@@ -180,11 +179,11 @@
181180 }
182181
183182 public function update($keyPath, $value) {
184 - global
185 - $definitionIdAttribute;
186183
187 - $definitionId = $keyPath->peek(0)->getAttributeValue($definitionIdAttribute);
 184+ $o=OmegaWikiAttributes::getInstance();
188185
 186+ $definitionId = $keyPath->peek(0)->definitionId;
 187+
189188 if ($value != "")
190189 updateTranslatedText($definitionId, $this->filterLanguageId, $value);
191190 }
@@ -198,22 +197,22 @@
199198 }
200199
201200 public function add($keyPath, $record) {
202 - global
203 - $definedMeaningIdAttribute, $expressionAttribute, $spellingAttribute, $identicalMeaningAttribute;
204201
205 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
206 - $expressionValue = $record->getAttributeValue($expressionAttribute);
 202+ $o=OmegaWikiAttributes::getInstance();
 203+
 204+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
 205+ $expressionValue = $record->expression;
207206
208207 if ($this->filterLanguageId == 0) {
209208 $languageId = $expressionValue->language;
210 - $spelling = $expressionValue->getAttributeValue($spellingAttribute);
 209+ $spelling = $expressionValue->spelling;
211210 }
212211 else {
213212 $languageId = $this->filterLanguageId;
214213 $spelling = $expressionValue;
215214 }
216215
217 - $identicalMeaning = $record->getAttributeValue($identicalMeaningAttribute);
 216+ $identicalMeaning = $record->identicalMeaning;
218217
219218 if ($languageId != 0 && $spelling != '') {
220219 $expression = findOrCreateExpression($spelling, $languageId);
@@ -222,44 +221,44 @@
223222 }
224223
225224 public function remove($keyPath) {
226 - global
227 - $definedMeaningIdAttribute, $syntransIdAttribute;
228225
229 - $definedMeaningId = $keyPath->peek(1)->getAttributeValue($definedMeaningIdAttribute);
230 - $syntransId = $keyPath->peek(0)->getAttributeValue($syntransIdAttribute);
 226+ $o=OmegaWikiAttributes::getInstance();
 227+
 228+ $definedMeaningId = $keyPath->peek(1)->definedMeaningId;
 229+ $syntransId = $keyPath->peek(0)->syntransId;
231230 removeSynonymOrTranslationWithId($syntransId);
232231 }
233232
234233 public function update($keyPath, $record) {
235 - global
236 - $definedMeaningIdAttribute, $syntransIdAttribute, $identicalMeaningAttribute;
237234
238 - $definedMeaningId = $keyPath->peek(1)->getAttributeValue($definedMeaningIdAttribute);
239 - $syntransId = $keyPath->peek(0)->getAttributeValue($syntransIdAttribute);
240 - $identicalMeaning = $record->getAttributeValue($identicalMeaningAttribute);
 235+ $o=OmegaWikiAttributes::getInstance();
 236+
 237+ $definedMeaningId = $keyPath->peek(1)->definedMeaningId;
 238+ $syntransId = $keyPath->peek(0)->syntransId;
 239+ $identicalMeaning = $record->identicalMeaning;
241240 updateSynonymOrTranslationWithId($syntransId, $identicalMeaning);
242241 }
243242 }
244243
245244 class ClassAttributesController implements UpdateController {
246245 public function add($keyPath, $record) {
247 - global
248 - $definedMeaningIdAttribute, $classAttributeLevelAttribute, $classAttributeAttributeAttribute, $classAttributeTypeAttribute;
249246
250 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
251 - $attributeLevelId = $record->getAttributeValue($classAttributeLevelAttribute);
252 - $attributeMeaningId = $record->getAttributeValue($classAttributeAttributeAttribute);
253 - $attributeType = $record->getAttributeValue($classAttributeTypeAttribute);
 247+ $o=OmegaWikiAttributes::getInstance();
254248
 249+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
 250+ $attributeLevelId = $record->classAttributeLevel;
 251+ $attributeMeaningId = $record->classAttributeAttribute;
 252+ $attributeType = $record->classAttributeType;
 253+
255254 if (($attributeLevelId != 0) && ($attributeMeaningId != 0))
256255 addClassAttribute($definedMeaningId, $attributeLevelId, $attributeMeaningId, $attributeType);
257256 }
258257
259258 public function remove($keyPath) {
260 - global
261 - $classAttributeIdAttribute;
 259+
 260+ $o=OmegaWikiAttributes::getInstance();
262261
263 - $classAttributeId = $keyPath->peek(0)->getAttributeValue($classAttributeIdAttribute);
 262+ $classAttributeId = $keyPath->peek(0)->classAttributeId;
264263 removeClassAttributeWithId($classAttributeId);
265264 }
266265
@@ -269,22 +268,22 @@
270269
271270 class DefinedMeaningRelationController implements UpdateController {
272271 public function add($keyPath, $record) {
273 - global
274 - $definedMeaningIdAttribute, $relationTypeAttribute, $otherDefinedMeaningAttribute;
275272
276 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
277 - $relationTypeId = $record->getAttributeValue($relationTypeAttribute);
278 - $otherDefinedMeaningId = $record->getAttributeValue($otherDefinedMeaningAttribute);
 273+ $o=OmegaWikiAttributes::getInstance();
279274
 275+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
 276+ $relationTypeId = $record->relationType;
 277+ $otherDefinedMeaningId = $record->otherDefinedMeaning;
 278+
280279 if ($relationTypeId != 0 && $otherDefinedMeaningId != 0)
281280 addRelation($definedMeaningId, $relationTypeId, $otherDefinedMeaningId);
282281 }
283282
284283 public function remove($keyPath) {
285 - global
286 - $relationIdAttribute;
 284+
 285+ $o=OmegaWikiAttributes::getInstance();
287286
288 - $relationId = $keyPath->peek(0)->getAttributeValue($relationIdAttribute);
 287+ $relationId = $keyPath->peek(0)->relationId;
289288 removeRelationWithId($relationId);
290289 }
291290
@@ -304,10 +303,10 @@
305304 }
306305
307306 public function add($keyPath, $record) {
308 - global
309 - $definedMeaningIdAttribute;
310307
311 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
 308+ $o=OmegaWikiAttributes::getInstance();
 309+
 310+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
312311 $otherDefinedMeaningId = $record->getAttributeValue($this->otherDefinedMeaningAttribute);
313312
314313 if ($otherDefinedMeaningId != 0)
@@ -325,12 +324,12 @@
326325
327326 class DefinedMeaningClassMembershipController implements UpdateController {
328327 public function add($keyPath, $record) {
329 - global
330 - $definedMeaningIdAttribute, $classAttribute;
331328
332 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
333 - $classId = $record->getAttributeValue($classAttribute);
 329+ $o=OmegaWikiAttributes::getInstance();
334330
 331+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
 332+ $classId = $record->class;
 333+
335334 if ($classId != 0)
336335 addClassMembership($definedMeaningId, $classId);
337336 }
@@ -343,10 +342,10 @@
344343 // $classId = $keyPath->peek(0)->getAttributeValue($classAttribute);
345344 //
346345 // removeClassMembership($definedMeaningId, $classId);
347 - global
348 - $classMembershipIdAttribute;
 346+
 347+ $o=OmegaWikiAttributes::getInstance();
349348
350 - removeClassMembershipWithId($keyPath->peek(0)->getAttributeValue($classMembershipIdAttribute));
 349+ removeClassMembershipWithId($keyPath->peek(0)->classMembershipId);
351350 }
352351
353352 public function update($keyPath, $record) {
@@ -355,35 +354,35 @@
356355
357356 class DefinedMeaningCollectionController implements UpdateController {
358357 public function add($keyPath, $record) {
359 - global
360 - $expressionIdAttribute, $definedMeaningIdAttribute, $collectionMeaningAttribute, $sourceIdentifierAttribute;
361358
362 - $definedMeaningId = $keyPath->peek(0)->getAttributeValue($definedMeaningIdAttribute);
363 - $collectionMeaningId = $record->getAttributeValue($collectionMeaningAttribute);
364 - $internalId = $record->getAttributeValue($sourceIdentifierAttribute);
 359+ $o=OmegaWikiAttributes::getInstance();
 360+
 361+ $definedMeaningId = $keyPath->peek(0)->definedMeaningId;
 362+ $collectionMeaningId = $record->collectionMeaning;
 363+ $internalId = $record->sourceIdentifier;
365364
366365 if ($collectionMeaningId != 0)
367366 addDefinedMeaningToCollectionIfNotPresent($definedMeaningId, $collectionMeaningId, $internalId);
368367 }
369368
370369 public function remove($keyPath) {
371 - global
372 - $definedMeaningIdAttribute, $collectionIdAttribute;
373370
374 - $definedMeaningId = $keyPath->peek(1)->getAttributeValue($definedMeaningIdAttribute);
375 - $collectionId = $keyPath->peek(0)->getAttributeValue($collectionIdAttribute);
 371+ $o=OmegaWikiAttributes::getInstance();
376372
 373+ $definedMeaningId = $keyPath->peek(1)->definedMeaningId;
 374+ $collectionId = $keyPath->peek(0)->collectionId;
 375+
377376 removeDefinedMeaningFromCollection($definedMeaningId, $collectionId);
378377 }
379378
380379 public function update($keyPath, $record) {
381 - global
382 - $definedMeaningIdAttribute, $collectionIdAttribute, $sourceIdentifierAttribute;
383380
384 - $definedMeaningId = $keyPath->peek(1)->getAttributeValue($definedMeaningIdAttribute);
385 - $collectionId = $keyPath->peek(0)->getAttributeValue($collectionIdAttribute);
386 - $sourceId = $record->getAttributeValue($sourceIdentifierAttribute);
 381+ $o=OmegaWikiAttributes::getInstance();
387382
 383+ $definedMeaningId = $keyPath->peek(1)->definedMeaningId;
 384+ $collectionId = $keyPath->peek(0)->collectionId;
 385+ $sourceId = $record->sourceIdentifier;
 386+
388387 // if ($sourceId != "")
389388 updateDefinedMeaningInCollection($definedMeaningId, $collectionId, $sourceId);
390389 }
@@ -397,13 +396,13 @@
398397 }
399398
400399 public function add($keyPath, $record) {
401 - global
402 - $expressionIdAttribute, $definedMeaningAttribute, $definitionAttribute, $translatedTextAttribute;
403400
404 - $definition = $record->getAttributeValue($definedMeaningAttribute)->getAttributeValue($definitionAttribute);
405 - $translatedContent = $definition->getAttributeValue($translatedTextAttribute);
406 - $expressionId = $keyPath->peek(0)->getAttributeValue($expressionIdAttribute);
 401+ $o=OmegaWikiAttributes::getInstance();
407402
 403+ $definition = $record->definedMeaning->definition;
 404+ $translatedContent = $definition->translatedText;
 405+ $expressionId = $keyPath->peek(0)->expressionId;
 406+
408407 if ($this->filterLanguageId == 0) {
409408 if ($translatedContent->getRecordCount() > 0) {
410409 $definitionRecord = $translatedContent->getRecord(0);
@@ -436,23 +435,21 @@
437436 }
438437
439438 public function add($keyPath, $record) {
440 - global
441 - $expressionAttribute, $expressionMeaningsAttribute, $expressionExactMeaningsAttribute,
442 - $definedMeaningAttribute, $definitionAttribute,
443 - $translatedTextAttribute;
444439
 440+ $o=OmegaWikiAttributes::getInstance();
 441+
445442 if ($this->filterLanguageId == 0)
446 - $expressionLanguageId = $record->getAttributeValue($expressionAttribute)->language;
 443+ $expressionLanguageId = $record->expression->language;
447444 else
448445 $expressionLanguageId = $this->filterLanguageId;
449446
450 - $expressionMeanings = $record->getAttributeValue($expressionMeaningsAttribute)->getAttributeValue($expressionExactMeaningsAttribute);
 447+ $expressionMeanings = $record->expressionMeanings->expressionExactMeanings;
451448
452449 if ($expressionLanguageId != 0 && $expressionMeanings->getRecordCount() > 0) {
453450 $expressionMeaning = $expressionMeanings->getRecord(0);
454451
455 - $definition = $expressionMeaning->getAttributeValue($definedMeaningAttribute)->getAttributeValue($definitionAttribute);
456 - $translatedContent = $definition->getAttributeValue($translatedTextAttribute);
 452+ $definition = $expressionMeaning->definedMeaning->definition;
 453+ $translatedContent = $definition->translatedText;
457454
458455 if ($this->filterLanguageId == 0) {
459456 if ($translatedContent->getRecordCount() > 0) {
@@ -491,27 +488,27 @@
492489
493490 class TextAttributeValuesController extends ObjectAttributeValuesController {
494491 public function add($keyPath, $record) {
495 - global
496 - $textAttributeAttribute;
 492+
 493+ $o=OmegaWikiAttributes::getInstance();
497494 $objectId = $this->objectIdFetcher->fetch($keyPath);
498 - $textAttributeId = $record->getAttributeValue($textAttributeAttribute);
 495+ $textAttributeId = $record->textAttribute;
499496 $text = $record->text;
500497 if ($textAttributeId != 0 && $text != '')
501498 addTextAttributeValue($objectId, $textAttributeId, $text);
502499 }
503500
504501 public function remove($keyPath) {
505 - global
506 - $textAttributeIdAttribute;
507 - $textId = $keyPath->peek(0)->getAttributeValue($textAttributeIdAttribute);
 502+
 503+ $o=OmegaWikiAttributes::getInstance();
 504+ $textId = $keyPath->peek(0)->textAttributeId;
508505 removeTextAttributeValue($textId);
509506 }
510507
511508 public function update($keyPath, $record) {
512 - global
513 - $textAttributeIdAttribute, $textAttribute;
 509+
 510+ $o=OmegaWikiAttributes::getInstance();
514511
515 - $textId = $keyPath->peek(0)->getAttributeValue($textAttributeIdAttribute);
 512+ $textId = $keyPath->peek(0)->textAttributeId;
516513 $text = $record->text;
517514
518515 updateTextAttributeValue($text, $textId);
@@ -527,35 +524,35 @@
528525 }
529526
530527 public function add($keyPath, $record) {
531 - global
532 - $linkAttribute, $linkAttributeAttribute, $linkLabelAttribute, $linkURLAttribute;
 528+
 529+ $o=OmegaWikiAttributes::getInstance();
533530
534531 $objectId = $this->objectIdFetcher->fetch($keyPath);
535 - $linkAttributeId = $record->getAttributeValue($linkAttributeAttribute);
536 - $linkValue = $record->getAttributeValue($linkAttribute);
537 - $label = $linkValue->getAttributeValue($linkLabelAttribute);
538 - $url = $linkValue->getAttributeValue($linkURLAttribute);
 532+ $linkAttributeId = $record->linkAttribute;
 533+ $linkValue = $record->link;
 534+ $label = $linkValue->linkLabel;
 535+ $url = $linkValue->linkURL;
539536
540537 if ($linkAttributeId != 0 && $url != "")
541538 addLinkAttributeValue($objectId, $linkAttributeId, $this->validateURL($url), $label);
542539 }
543540
544541 public function remove($keyPath) {
545 - global
546 - $linkAttributeIdAttribute;
 542+
 543+ $o=OmegaWikiAttributes::getInstance();
547544
548 - $linkId = $keyPath->peek(0)->getAttributeValue($linkAttributeIdAttribute);
 545+ $linkId = $keyPath->peek(0)->linkAttributeId;
549546 removeLinkAttributeValue($linkId);
550547 }
551548
552549 public function update($keyPath, $record) {
553 - global
554 - $linkAttributeIdAttribute, $linkAttribute, $linkLabelAttribute, $linkURLAttribute;
 550+
 551+ $o=OmegaWikiAttributes::getInstance();
555552
556 - $linkId = $keyPath->peek(0)->getAttributeValue($linkAttributeIdAttribute);
557 - $linkValue = $record->getAttributeValue($linkAttribute);
558 - $label = $linkValue->getAttributeValue($linkLabelAttribute);
559 - $url = $linkValue->getAttributeValue($linkURLAttribute);
 553+ $linkId = $keyPath->peek(0)->linkAttributeId;
 554+ $linkValue = $record->link;
 555+ $label = $linkValue->linkLabel;
 556+ $url = $linkValue->linkURL;
560557
561558 if ($url != "") {
562559 updateLinkAttributeValue($linkId, $this->validateURL($url), $label);
@@ -573,13 +570,12 @@
574571 }
575572
576573 public function add($keyPath, $record) {
577 - global
578 - $translatedTextValueAttribute,
579 - $translatedTextAttributeAttribute;
580574
 575+ $o=OmegaWikiAttributes::getInstance();
 576+
581577 $objectId = $this->objectIdFetcher->fetch($keyPath);
582 - $textValue = $record->getAttributeValue($translatedTextValueAttribute);
583 - $textAttributeId = $record->getAttributeValue($translatedTextAttributeAttribute);
 578+ $textValue = $record->translatedTextValue;
 579+ $textAttributeId = $record->translatedTextAttribute;
584580
585581 if ($textAttributeId != 0) {
586582 if ($this->filterLanguageId == 0) {
@@ -599,10 +595,10 @@
600596 }
601597
602598 public function remove($keyPath) {
603 - global
604 - $translatedTextAttributeIdAttribute;
605599
606 - $valueId = $keyPath->peek(0)->getAttributeValue($translatedTextAttributeIdAttribute);
 600+ $o=OmegaWikiAttributes::getInstance();
 601+
 602+ $valueId = $keyPath->peek(0)->translatedTextAttributeId;
607603 removeTranslatedTextAttributeValue($valueId);
608604 }
609605
@@ -612,10 +608,10 @@
613609
614610 class TranslatedTextAttributeValueController implements UpdateController {
615611 public function add($keyPath, $record) {
616 - global
617 - $translatedTextAttributeIdAttribute;
618612
619 - $valueId = $keyPath->peek(0)->getAttributeValue($translatedTextAttributeIdAttribute);
 613+ $o=OmegaWikiAttributes::getInstance();
 614+
 615+ $valueId = $keyPath->peek(0)->translatedTextAttributeId;
620616 $languageId = $record->language;
621617 $text = $record->text;
622618 $translatedTextAttribute = getTranslatedTextAttribute($valueId);
@@ -625,10 +621,10 @@
626622 }
627623
628624 public function remove($keyPath) {
629 - global
630 - $translatedTextAttributeIdAttribute;
631625
632 - $valueId = $keyPath->peek(1)->getAttributeValue($translatedTextAttributeIdAttribute);
 626+ $o=OmegaWikiAttributes::getInstance();
 627+
 628+ $valueId = $keyPath->peek(1)->translatedTextAttributeId;
633629 $languageId = $keyPath->peek(0)->language;
634630 $translatedTextAttribute = getTranslatedTextAttribute($valueId);
635631
@@ -636,10 +632,10 @@
637633 }
638634
639635 public function update($keyPath, $record) {
640 - global
641 - $translatedTextAttributeIdAttribute;
642636
643 - $valueId = $keyPath->peek(1)->getAttributeValue($translatedTextAttributeIdAttribute);
 637+ $o=OmegaWikiAttributes::getInstance();
 638+
 639+ $valueId = $keyPath->peek(1)->translatedTextAttributeId;
644640 $languageId = $keyPath->peek(0)->language;
645641 $text = $record->text;
646642 $translatedTextAttribute = getTranslatedTextAttribute($valueId);
@@ -657,10 +653,10 @@
658654 }
659655
660656 public function update($keyPath, $value) {
661 - global
662 - $translatedTextAttributeIdAttribute ;
663657
664 - $valueId = $keyPath->peek(0)->getAttributeValue($translatedTextAttributeIdAttribute);
 658+ $o=OmegaWikiAttributes::getInstance();
 659+
 660+ $valueId = $keyPath->peek(0)->translatedTextAttributeId;
665661 $translatedTextAttribute = getTranslatedTextAttribute($valueId);
666662
667663 if ($value != "")
@@ -670,21 +666,21 @@
671667
672668 class OptionAttributeValuesController extends ObjectAttributeValuesController {
673669 public function add($keyPath, $record) {
674 - global
675 - $optionAttributeOptionAttribute;
676670
 671+ $o=OmegaWikiAttributes::getInstance();
 672+
677673 $objectId = $this->objectIdFetcher->fetch($keyPath);
678 - $optionId = $record->getAttributeValue($optionAttributeOptionAttribute);
 674+ $optionId = $record->optionAttributeOption;
679675
680676 if ($optionId)
681677 addOptionAttributeValue($objectId,$optionId);
682678 }
683679
684680 public function remove($keyPath) {
685 - global
686 - $optionAttributeIdAttribute;
687681
688 - $valueId = $keyPath->peek(0)->getAttributeValue($optionAttributeIdAttribute);
 682+ $o=OmegaWikiAttributes::getInstance();
 683+
 684+ $valueId = $keyPath->peek(0)->optionAttributeId;
689685 removeOptionAttributeValue($valueId);
690686 }
691687
@@ -693,11 +689,11 @@
694690
695691 class OptionAttributeOptionsController implements UpdateController {
696692 public function add($keyPath, $record) {
697 - global
698 - $classAttributeIdAttribute, $optionAttributeOptionAttribute;
699693
700 - $attributeId = $keyPath->peek(0)->getAttributeValue($classAttributeIdAttribute);
701 - $optionMeaningId = $record->getAttributeValue($optionAttributeOptionAttribute);
 694+ $o=OmegaWikiAttributes::getInstance();
 695+
 696+ $attributeId = $keyPath->peek(0)->classAttributeId;
 697+ $optionMeaningId = $record->optionAttributeOption;
702698 $languageId = $record->language;
703699
704700 if ($optionMeaningId)
@@ -705,10 +701,10 @@
706702 }
707703
708704 public function remove($keyPath) {
709 - global
710 - $optionAttributeOptionIdAttribute;
711705
712 - $optionId = $keyPath->peek(0)->getAttributeValue($optionAttributeOptionIdAttribute);
 706+ $o=OmegaWikiAttributes::getInstance();
 707+
 708+ $optionId = $keyPath->peek(0)->optionAttributeOptionId;
713709 removeOptionAttributeOption($optionId);
714710 }
715711
@@ -730,10 +726,10 @@
731727 }
732728
733729 protected function allowAnyChangeOfValue($value) {
734 - global
735 - $sourceAttribute;
 730+
 731+ $o=OmegaWikiAttributes::getInstance();
736732
737 - $source = $value->getAttributeValue($sourceAttribute);
 733+ $source = $value->source;
738734
739735 return $source == null || $source == 0;
740736 }
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php
@@ -127,39 +127,37 @@
128128 }
129129
130130 function initializeAttributes() {
131 - global
132 - $operationAttribute, $isLatestAttribute, $definedMeaningIdAttribute, $definedMeaningReferenceAttribute,
133 - $definedMeaningReferenceStructure, $rollBackStructure, $rollBackAttribute;
134131
135132 $o=OmegaWikiAttributes::getInstance();
136133
137 - $operationAttribute = new Attribute('operation', 'Operation', 'text');
138 - $isLatestAttribute = new Attribute('is-latest', 'Is latest', 'boolean');
 134+ $o=OmegaWikiAttributes::getInstance();
139135
140 - $rollBackStructure = new Structure($isLatestAttribute, $operationAttribute);
141 - $rollBackAttribute = new Attribute('roll-back', 'Roll back', $rollBackStructure);
 136+ $o->operation = new Attribute('operation', 'Operation', 'text');
 137+ $o->isLatest = new Attribute('is-latest', 'Is latest', 'boolean');
 138+
 139+ $o->rollBackStructure = new Structure($o->isLatest, $o->operation);
 140+ $o->rollBack = new Attribute('roll-back', 'Roll back', $o->rollBackStructure);
142141
143 - global
144 - $translatedContentHistoryStructure, $translatedContentHistoryKeyStructure, $translatedContentHistoryAttribute,
145 - $recordLifeSpanAttribute, $addTransactionIdAttribute, $translatedContentIdAttribute;
 142+
 143+ $o=OmegaWikiAttributes::getInstance();
146144
147 - $addTransactionIdAttribute = new Attribute('add-transaction-id', 'Add transaction ID', 'identifier');
 145+ $o->addTransactionId = new Attribute('add-transaction-id', 'Add transaction ID', 'identifier');
148146
149 - $translatedContentHistoryStructure = new Structure($addTransactionIdAttribute, $o->text, $recordLifeSpanAttribute);
150 - $translatedContentHistoryKeyStructure = new Structure($addTransactionIdAttribute);
151 - $translatedContentHistoryAttribute = new Attribute('translated-content-history', 'History', $translatedContentHistoryStructure);
152 - $translatedContentIdAttribute = new Attribute('translated-content-id', 'Translated content ID', 'object-id');
 147+ $o->translatedContentHistoryStructure = new Structure($o->addTransactionId, $o->text, $o->recordLifeSpan);
 148+ $o->translatedContentHistoryKeyStructure = new Structure($o->addTransactionId);
 149+ $o->translatedContentHistory = new Attribute('translated-content-history', 'History', $o->translatedContentHistoryStructure);
 150+ $o->translatedContentId = new Attribute('translated-content-id', 'Translated content ID', 'object-id');
153151
154 - global
155 - $rollBackTranslatedContentStructure, $rollBackTranslatedContentAttribute;
156152
157 - $rollBackTranslatedContentStructure = new Structure($isLatestAttribute, $operationAttribute, $translatedContentHistoryAttribute);
158 - $rollBackTranslatedContentAttribute = new Attribute('roll-back', 'Roll back', $rollBackTranslatedContentStructure);
 153+ $o=OmegaWikiAttributes::getInstance();
159154
160 - global
161 - $updatedDefinitionStructure, $updatedDefinitionAttribute;
 155+ $o->rollBackTranslatedContentStructure = new Structure($isLatestAttribute, $operationAttribute, $translatedContentHistoryAttribute);
 156+ $o->rollBackTranslatedContent = new Attribute('roll-back', 'Roll back', $o->rollBackTranslatedContentStructure);
 157+
 158+
 159+ $o=OmegaWikiAttributes::getInstance();
162160
163 - $updatedDefinitionStructure = new Structure(
 161+ $o->updatedDefinitionStructure = new Structure(
164162 $rollBackTranslatedContentAttribute,
165163 $definedMeaningIdAttribute,
166164 $definedMeaningReferenceAttribute,
@@ -170,107 +168,103 @@
171169 $isLatestAttribute
172170 );
173171
174 - $updatedDefinitionAttribute = new Attribute('updated-definition', 'Definition', $updatedDefinitionStructure);
 172+ $o->updatedDefinition = new Attribute('updated-definition', 'Definition', $o->updatedDefinitionStructure);
175173
176 - global
177 - $expressionAttribute, $expressionIdAttribute, $identicalMeaningAttribute, $syntransIdAttribute, $updatedSyntransesAttribute,
178 - $updatedSyntransesStructure;
179174
180 - $updatedSyntransesStructure = new Structure(
181 - $syntransIdAttribute,
 175+ $o=OmegaWikiAttributes::getInstance();
 176+
 177+ $o->updatedSyntransesStructure = new Structure(
 178+ $o->syntransId,
182179 $definedMeaningIdAttribute,
183180 $definedMeaningReferenceAttribute,
184 - $expressionIdAttribute,
185 - $expressionAttribute,
186 - $identicalMeaningAttribute,
 181+ $o->expressionId,
 182+ $o->expression,
 183+ $o->identicalMeaning,
187184 $operationAttribute
188185 );
189186
190 - $updatedSyntransesAttribute = new Attribute('updated-syntranses', 'Synonyms and translations', $updatedSyntransesStructure);
 187+ $o->updatedSyntranses = new Attribute('updated-syntranses', 'Synonyms and translations', $o->updatedSyntransesStructure);
191188
192 - global
193 - $relationIdAttribute, $firstMeaningAttribute, $secondMeaningAttribute, $relationTypeAttribute,
194 - $updatedRelationsStructure, $updatedRelationsAttribute;
 189+
 190+ $o=OmegaWikiAttributes::getInstance();
195191
196 - $firstMeaningAttribute = new Attribute('first-meaning', "First defined meaning", $definedMeaningReferenceStructure);
197 - $secondMeaningAttribute = new Attribute('second-meaning', "Second defined meaning", $definedMeaningReferenceStructure);
 192+ $o->firstMeaning = new Attribute('first-meaning', "First defined meaning", $definedMeaningReferenceStructure);
 193+ $o->secondMeaning = new Attribute('second-meaning', "Second defined meaning", $definedMeaningReferenceStructure);
198194
199 - $updatedRelationsStructure = new Structure(
 195+ $o->updatedRelationsStructure = new Structure(
200196 $rollBackAttribute,
201 - $relationIdAttribute,
202 - $firstMeaningAttribute,
203 - $relationTypeAttribute,
204 - $secondMeaningAttribute,
 197+ $o->relationId,
 198+ $o->firstMeaning,
 199+ $o->relationType,
 200+ $o->secondMeaning,
205201 $operationAttribute,
206202 $isLatestAttribute
207203 );
208204
209 - $updatedRelationsAttribute = new Attribute('updated-relations', 'Relations', $updatedRelationsStructure);
 205+ $o->updatedRelations = new Attribute('updated-relations', 'Relations', $o->updatedRelationsStructure);
210206
211 - global
212 - $classMembershipIdAttribute, $classAttribute, $classMemberAttribute,
213 - $updatedClassMembershipStructure, $updatedClassMembershipAttribute;
 207+
 208+ $o=OmegaWikiAttributes::getInstance();
214209
215 - $classMemberAttribute = new Attribute('class-member', 'Class member', $definedMeaningReferenceStructure);
 210+ $o->classMember = new Attribute('class-member', 'Class member', $definedMeaningReferenceStructure);
216211
217 - $updatedClassMembershipStructure = new Structure(
 212+ $o->updatedClassMembershipStructure = new Structure(
218213 $rollBackAttribute,
219 - $classMembershipIdAttribute,
220 - $classAttribute,
221 - $classMemberAttribute,
 214+ $o->classMembershipId,
 215+ $o->class,
 216+ $o->classMember,
222217 $operationAttribute,
223218 $isLatestAttribute
224219 );
225220
226 - $updatedClassMembershipAttribute = new Attribute('updated-class-membership', 'Class membership', $updatedClassMembershipStructure);
 221+ $o->updatedClassMembership = new Attribute('updated-class-membership', 'Class membership', $o->updatedClassMembershipStructure);
227222
228 - global
229 - $collectionIdAttribute, $collectionMeaningAttribute, $collectionMemberAttribute, $sourceIdentifierAttribute,
230 - $updatedCollectionMembershipStructure, $updatedCollectionMembershipAttribute, $collectionMemberIdAttribute;
 223+
 224+ $o=OmegaWikiAttributes::getInstance();
231225
232 - $collectionMemberAttribute = new Attribute('collection-member', 'Collection member', $definedMeaningReferenceStructure);
233 - $collectionMemberIdAttribute = new Attribute('collection-member-id', 'Collection member identifier', 'defined-meaning-id');
 226+ $o->collectionMember = new Attribute('collection-member', 'Collection member', $definedMeaningReferenceStructure);
 227+ $o->collectionMemberId = new Attribute('collection-member-id', 'Collection member identifier', 'defined-meaning-id');
234228
235 - $updatedCollectionMembershipStructure = new Structure(
 229+ $o->updatedCollectionMembershipStructure = new Structure(
236230 $rollBackAttribute,
237 - $collectionIdAttribute,
238 - $collectionMeaningAttribute,
239 - $collectionMemberIdAttribute,
240 - $collectionMemberAttribute,
241 - $sourceIdentifierAttribute,
 231+ $o->collectionId,
 232+ $o->collectionMeaning,
 233+ $o->collectionMemberId,
 234+ $o->collectionMember,
 235+ $o->sourceIdentifier,
242236 $operationAttribute
243237 );
244238
245 - $updatedCollectionMembershipAttribute = new Attribute('updated-collection-membership', 'Collection membership', $updatedCollectionMembershipStructure);
 239+ $o->updatedCollectionMembership = new Attribute('updated-collection-membership', 'Collection membership', $o->updatedCollectionMembershipStructure);
246240
247 - global
248 - $objectIdAttribute, $valueIdAttribute, $attributeAttribute;
 241+
 242+ $o=OmegaWikiAttributes::getInstance();
249243
250 - $objectIdAttribute = new Attribute('object-id', 'Object', 'object-id');
251 - $valueIdAttribute = new Attribute('value-id', 'Value identifier', 'object-id');
252 - $attributeAttribute = new Attribute('attribute', 'Attribute', $definedMeaningReferenceStructure);
 244+ $o->objectId = new Attribute('object-id', 'Object', 'object-id');
 245+ $o->valueId = new Attribute('value-id', 'Value identifier', 'object-id');
 246+ $o->attribute = new Attribute('attribute', 'Attribute', $definedMeaningReferenceStructure);
253247
254 - global
255 - $updatedLinkAttribute, $updatedLinkStructure, $linkAttribute;
 248+
 249+ $o=OmegaWikiAttributes::getInstance();
256250
257 - $updatedLinkStructure = new Structure(
 251+ $o->updatedLinkStructure = new Structure(
258252 $rollBackAttribute,
259253 $valueIdAttribute,
260254 $objectIdAttribute,
261255 $attributeAttribute,
262 - $linkAttribute,
 256+ $o->link,
263257 $operationAttribute,
264258 $isLatestAttribute
265259 );
266260
267 - $updatedLinkAttribute = new Attribute('updated-link', 'Link properties', $updatedLinkStructure);
 261+ $o->updatedLink = new Attribute('updated-link', 'Link properties', $o->updatedLinkStructure);
268262
269 - global
270 - $updatedTextAttribute, $updatedTextStructure;
 263+
 264+ $o=OmegaWikiAttributes::getInstance();
271265
272266 $o=OmegaWikiAttributes::getInstance();
273267
274 - $updatedTextStructure = new Structure(
 268+ $o->updatedTextStructure = new Structure(
275269 $rollBackAttribute,
276270 $valueIdAttribute,
277271 $objectIdAttribute,
@@ -280,31 +274,30 @@
281275 $isLatestAttribute
282276 );
283277
284 - $updatedTextAttribute = new Attribute('updated-text', 'Unstructured text properties', $updatedTextStructure);
 278+ $o->updatedText = new Attribute('updated-text', 'Unstructured text properties', $o->updatedTextStructure);
285279
286 - global
287 - $translatedTextStructure,
288 - $updatedTranslatedTextPropertyAttribute, $updatedTranslatedTextPropertyStructure, $translatedTextTextAttribute;
 280+
 281+ $o=OmegaWikiAttributes::getInstance();
289282
290 - $translatedTextTextAttribute = new Attribute('translated-text-property-text', 'Text', $translatedTextStructure);
 283+ $o->translatedTextText = new Attribute('translated-text-property-text', 'Text', $o->translatedTextStructure);
291284
292 - $updatedTranslatedTextPropertyStructure = new Structure(
 285+ $o->updatedTranslatedTextPropertyStructure = new Structure(
293286 $rollBackAttribute,
294287 $valueIdAttribute,
295288 $objectIdAttribute,
296289 $attributeAttribute,
297290 $translatedContentIdAttribute,
298 - $translatedTextTextAttribute,
 291+ $o->translatedTextText,
299292 $operationAttribute,
300293 $isLatestAttribute
301294 );
302295
303 - $updatedTranslatedTextPropertyAttribute = new Attribute('updated-translated-text-property', 'Text properties', $updatedTranslatedTextPropertyStructure);
 296+ $o->updatedTranslatedTextProperty = new Attribute('updated-translated-text-property', 'Text properties', $o->updatedTranslatedTextPropertyStructure);
304297
305 - global
306 - $updatedTranslatedTextStructure, $updatedTranslatedTextAttribute;
 298+
 299+ $o=OmegaWikiAttributes::getInstance();
307300
308 - $updatedTranslatedTextStructure = new Structure(
 301+ $o->updatedTranslatedTextStructure = new Structure(
309302 $rollBackTranslatedContentAttribute,
310303 $valueIdAttribute,
311304 $objectIdAttribute,
@@ -316,53 +309,51 @@
317310 $isLatestAttribute
318311 );
319312
320 - $updatedTranslatedTextAttribute = new Attribute('updated-translated-text', 'Texts', $updatedTranslatedTextStructure);
 313+ $o->updatedTranslatedText = new Attribute('updated-translated-text', 'Texts', $o->updatedTranslatedTextStructure);
321314
322 - global
323 - $updatedClassAttributesAttribute, $updatedClassAttributesStructure, $classAttributeId, $levelAttribute,
324 - $typeAttribute;
325315
326 - $classAttributeId = new Attribute('class-attribute-id', 'Class attribute id', 'object-id');
327 - $levelAttribute = new Attribute('level', 'Level', $definedMeaningReferenceStructure);
328 - $typeAttribute = new Attribute('type', 'Type', 'text');
 316+ $o=OmegaWikiAttributes::getInstance();
329317
330 - $updatedClassAttributesStructure = new Structure(
 318+ $o->classId = new Attribute('class-attribute-id', 'Class attribute id', 'object-id');
 319+ $o->level = new Attribute('level', 'Level', $definedMeaningReferenceStructure);
 320+ $o->type = new Attribute('type', 'Type', 'text');
 321+
 322+ $o->updatedClassAttributesStructure = new Structure(
331323 $rollBackAttribute,
332 - $classAttributeId,
333 - $classAttribute,
334 - $levelAttribute,
335 - $typeAttribute,
 324+ $o->classId,
 325+ $o->class,
 326+ $o->level,
 327+ $o->type,
336328 $attributeAttribute,
337329 $operationAttribute,
338330 $isLatestAttribute
339331 );
340332
341 - $updatedClassAttributesAttribute = new Attribute('updated-class-attributes', 'Class attributes', $updatedClassAttributesStructure);
 333+ $o->updatedClassAttributes = new Attribute('updated-class-attributes', 'Class attributes', $o->updatedClassAttributesStructure);
342334
343 - global
344 - $updatedAlternativeDefinitionsStructure, $updatedAlternativeDefinitionsAttribute, $sourceAttribute,
345 - $alternativeDefinitionTextAttribute;
346335
347 - $alternativeDefinitionTextAttribute = new Attribute('alternative-definition-text', 'Definition', $translatedTextStructure);
348 - $sourceAttribute = new Attribute('source', 'Source', $definedMeaningReferenceStructure);
 336+ $o=OmegaWikiAttributes::getInstance();
349337
350 - $updatedAlternativeDefinitionsStructure = new Structure(
 338+ $o->alternativeDefinitionText = new Attribute('alternative-definition-text', 'Definition', $translatedTextStructure);
 339+ $o->source = new Attribute('source', 'Source', $definedMeaningReferenceStructure);
 340+
 341+ $o->updatedAlternativeDefinitionsStructure = new Structure(
351342 $rollBackAttribute,
352343 $definedMeaningIdAttribute,
353344 $translatedContentIdAttribute,
354 - $alternativeDefinitionTextAttribute,
 345+ $o->alternativeDefinitionText,
355346 $definedMeaningReferenceAttribute,
356 - $sourceAttribute,
 347+ $o->source,
357348 $operationAttribute,
358349 $isLatestAttribute
359350 );
360351
361 - $updatedAlternativeDefinitionsAttribute = new Attribute('updated-alternative-definitions', 'Alternative definitions', $updatedAlternativeDefinitionsStructure);
 352+ $o->updatedAlternativeDefinitions = new Attribute('updated-alternative-definitions', 'Alternative definitions', $o->updatedAlternativeDefinitionsStructure);
362353
363 - global
364 - $updatedAlternativeDefinitionTextAttribute, $updatedAlternativeDefinitionTextStructure;
 354+
 355+ $o=OmegaWikiAttributes::getInstance();
365356
366 - $updatedAlternativeDefinitionTextStructure = new Structure(
 357+ $o->updatedAlternativeDefinitionTextStructure = new Structure(
367358 $rollBackTranslatedContentAttribute,
368359 $definedMeaningIdAttribute,
369360 $definedMeaningReferenceAttribute,
@@ -374,11 +365,11 @@
375366 $isLatestAttribute
376367 );
377368
378 - $updatedAlternativeDefinitionTextAttribute = new Attribute('updated-alternative-definition-text', 'Alternative definition text', $updatedAlternativeDefinitionTextStructure);
 369+ $o->updatedAlternativeDefinitionText = new Attribute('updated-alternative-definition-text', 'Alternative definition text', $o->updatedAlternativeDefinitionTextStructure);
379370
380 - global
381 - $updatesInTransactionAttribute;
382371
 372+ $o=OmegaWikiAttributes::getInstance();
 373+
383374 $updatesInTransactionStructure = new Structure(
384375 $updatedDefinitionAttribute,
385376 $updatedSyntransesAttribute,
@@ -390,12 +381,14 @@
391382 $updatedAlternativeDefinitionsAttribute
392383 );
393384
394 - $updatesInTransactionAttribute = new Attribute('updates-in-transaction', 'Updates in transaction', $updatesInTransactionStructure);
 385+ $o->updatesInTransaction = new Attribute('updates-in-transaction', 'Updates in transaction', $updatesInTransactionStructure);
395386 }
396387
397388 function getTransactionRecordSet($fromTransactionId, $transactionCount, $userName) {
 389+
 390+ $o=OmegaWikiAttributes::getInstance();
398391 global
399 - $transactionAttribute, $transactionIdAttribute, $transactionsTable, $updatesInTransactionAttribute;
 392+ $transactionsTable;
400393
401394 $dc=wdGetDataSetContext();
402395 $queryTransactionInformation = new QueryLatestTransactionInformation();
@@ -408,9 +401,9 @@
409402 $recordSet = queryRecordSet(
410403 'transaction-id',
411404 $queryTransactionInformation,
412 - $transactionIdAttribute,
 405+ $o->transactionId,
413406 new TableColumnsToAttributesMapping(
414 - new TableColumnsToAttribute(array('transaction_id'), $transactionIdAttribute)
 407+ new TableColumnsToAttribute(array('transaction_id'), $o->transactionId)
415408 ),
416409 $transactionsTable,
417410 $restrictions,
@@ -418,42 +411,37 @@
419412 $transactionCount
420413 );
421414
422 - $recordSet->getStructure()->addAttribute($transactionIdAttribute);
423 - expandTransactionIDsInRecordSet($recordSet, $transactionIdAttribute, $transactionAttribute);
 415+ $recordSet->getStructure()->addAttribute($o->transactionId);
 416+ expandTransactionIDsInRecordSet($recordSet, $o->transactionId, $o->transaction);
424417
425 - $recordSet->getStructure()->addAttribute($updatesInTransactionAttribute);
 418+ $recordSet->getStructure()->addAttribute($o->updatesInTransaction);
426419 expandUpdatesInTransactionInRecordSet($recordSet);
427420
428421 return $recordSet;
429422 }
430423
431424 function getTransactionOverview($recordSet, $showRollBackOptions) {
432 - global
433 - $transactionAttribute, $userAttribute, $timestampAttribute, $summaryAttribute,
434 - $updatesInTransactionAttribute, $updatedDefinitionAttribute, $updatedSyntransesAttribute,
435 - $updatedRelationsAttribute, $updatedClassMembershipAttribute, $updatedCollectionMembershipAttribute,
436 - $updatedLinkAttribute, $updatedTextAttribute, $updatedTranslatedTextAttribute, $updatedClassAttributesAttribute,
437 - $updatedAlternativeDefinitionsAttribute, $updatedAlternativeDefinitionTextAttribute,
438 - $updatedTranslatedTextPropertyAttribute;
439425
440 - $captionEditor = new RecordSpanEditor($transactionAttribute, ': ', ', ', false);
441 - $captionEditor->addEditor(new TimestampEditor($timestampAttribute, new SimplePermissionController(false), false));
442 - $captionEditor->addEditor(new UserEditor($userAttribute, new SimplePermissionController(false), false));
443 - $captionEditor->addEditor(new TextEditor($summaryAttribute, new SimplePermissionController(false), false));
 426+ $o=OmegaWikiAttributes::getInstance();
 427+
 428+ $captionEditor = new RecordSpanEditor($o->transaction, ': ', ', ', false);
 429+ $captionEditor->addEditor(new TimestampEditor($o->timestamp, new SimplePermissionController(false), false));
 430+ $captionEditor->addEditor(new UserEditor($o->user, new SimplePermissionController(false), false));
 431+ $captionEditor->addEditor(new TextEditor($o->summary, new SimplePermissionController(false), false));
444432
445 - $valueEditor = new RecordUnorderedListEditor($updatesInTransactionAttribute, 5);
446 - $valueEditor->addEditor(getUpdatedDefinedMeaningDefinitionEditor($updatedDefinitionAttribute, $showRollBackOptions));
447 - $valueEditor->addEditor(getUpdatedAlternativeDefinitionsEditor($updatedAlternativeDefinitionsAttribute, $showRollBackOptions));
448 - $valueEditor->addEditor(getUpdatedAlternativeDefinitionTextEditor($updatedAlternativeDefinitionTextAttribute, $showRollBackOptions));
449 - $valueEditor->addEditor(getUpdatedSyntransesEditor($updatedSyntransesAttribute, $showRollBackOptions));
450 - $valueEditor->addEditor(getUpdatedRelationsEditor($updatedRelationsAttribute, $showRollBackOptions));
451 - $valueEditor->addEditor(getUpdatedClassAttributesEditor($updatedClassAttributesAttribute, $showRollBackOptions));
452 - $valueEditor->addEditor(getUpdatedClassMembershipEditor($updatedClassMembershipAttribute, $showRollBackOptions));
453 - $valueEditor->addEditor(getUpdatedCollectionMembershipEditor($updatedCollectionMembershipAttribute, $showRollBackOptions));
454 - $valueEditor->addEditor(getUpdatedLinkEditor($updatedLinkAttribute, $showRollBackOptions));
455 - $valueEditor->addEditor(getUpdatedTextEditor($updatedTextAttribute, $showRollBackOptions));
456 - $valueEditor->addEditor(getUpdatedTranslatedTextPropertyEditor($updatedTranslatedTextPropertyAttribute, $showRollBackOptions));
457 - $valueEditor->addEditor(getUpdatedTranslatedTextEditor($updatedTranslatedTextAttribute, $showRollBackOptions));
 433+ $valueEditor = new RecordUnorderedListEditor($o->updatesInTransaction, 5);
 434+ $valueEditor->addEditor(getUpdatedDefinedMeaningDefinitionEditor($o->updatedDefinition, $showRollBackOptions));
 435+ $valueEditor->addEditor(getUpdatedAlternativeDefinitionsEditor($o->updatedAlternativeDefinitions, $showRollBackOptions));
 436+ $valueEditor->addEditor(getUpdatedAlternativeDefinitionTextEditor($o->updatedAlternativeDefinitionText, $showRollBackOptions));
 437+ $valueEditor->addEditor(getUpdatedSyntransesEditor($o->updatedSyntranses, $showRollBackOptions));
 438+ $valueEditor->addEditor(getUpdatedRelationsEditor($o->updatedRelations, $showRollBackOptions));
 439+ $valueEditor->addEditor(getUpdatedClassAttributesEditor($o->updatedClassAttributes, $showRollBackOptions));
 440+ $valueEditor->addEditor(getUpdatedClassMembershipEditor($o->updatedClassMembership, $showRollBackOptions));
 441+ $valueEditor->addEditor(getUpdatedCollectionMembershipEditor($o->updatedCollectionMembership, $showRollBackOptions));
 442+ $valueEditor->addEditor(getUpdatedLinkEditor($o->updatedLink, $showRollBackOptions));
 443+ $valueEditor->addEditor(getUpdatedTextEditor($o->updatedText, $showRollBackOptions));
 444+ $valueEditor->addEditor(getUpdatedTranslatedTextPropertyEditor($o->updatedTranslatedTextProperty, $showRollBackOptions));
 445+ $valueEditor->addEditor(getUpdatedTranslatedTextEditor($o->updatedTranslatedText, $showRollBackOptions));
458446
459447 $editor = new RecordSetListEditor(null, new SimplePermissionController(false), new ShowEditFieldChecker(true), new AllowAddController(false), false, false, null, 4, false);
460448 $editor->setCaptionEditor($captionEditor);
@@ -463,50 +451,42 @@
464452 }
465453
466454 function expandUpdatesInTransactionInRecordSet($recordSet) {
467 - global
468 - $transactionIdAttribute, $updatesInTransactionAttribute;
 455+
 456+ $o=OmegaWikiAttributes::getInstance();
469457
470458 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
471459 $record = $recordSet->getRecord($i);
472 - $record->setAttributeValue(
473 - $updatesInTransactionAttribute,
474 - getUpdatesInTransactionRecord($record->getAttributeValue($transactionIdAttribute))
475 - );
 460+ $record->updatesInTransaction = getUpdatesInTransactionRecord($record->transactionId);
476461 }
477462 }
478463
479464 function getUpdatesInTransactionRecord($transactionId) {
480 - global
481 - $updatesInTransactionAttribute, $updatedDefinitionAttribute, $updatedSyntransesAttribute,
482 - $updatedRelationsAttribute, $updatedClassMembershipAttribute, $updatedCollectionMembershipAttribute,
483 - $updatedLinkAttribute, $updatedTextAttribute, $updatedTranslatedTextAttribute, $updatedClassAttributesAttribute,
484 - $updatedAlternativeDefinitionsAttribute, $updatedAlternativeDefinitionTextAttribute,
485 - $updatedTranslatedTextPropertyAttribute;
 465+
 466+ $o=OmegaWikiAttributes::getInstance();
486467
487 - $record = new ArrayRecord($updatesInTransactionAttribute->type);
488 - $record->setAttributeValue($updatedDefinitionAttribute, getUpdatedDefinedMeaningDefinitionRecordSet($transactionId));
489 - $record->setAttributeValue($updatedAlternativeDefinitionsAttribute, getUpdatedAlternativeDefinitionsRecordSet($transactionId));
490 - $record->setAttributeValue($updatedAlternativeDefinitionTextAttribute, getUpdatedAlternativeDefinitionTextRecordSet($transactionId));
491 - $record->setAttributeValue($updatedSyntransesAttribute, getUpdatedSyntransesRecordSet($transactionId));
492 - $record->setAttributeValue($updatedRelationsAttribute, getUpdatedRelationsRecordSet($transactionId));
493 - $record->setAttributeValue($updatedClassMembershipAttribute, getUpdatedClassMembershipRecordSet($transactionId));
494 - $record->setAttributeValue($updatedCollectionMembershipAttribute, getUpdatedCollectionMembershipRecordSet($transactionId));
495 - $record->setAttributeValue($updatedLinkAttribute, getUpdatedLinkRecordSet($transactionId));
496 - $record->setAttributeValue($updatedTextAttribute, getUpdatedTextRecordSet($transactionId));
497 - $record->setAttributeValue($updatedTranslatedTextPropertyAttribute, getUpdatedTranslatedTextPropertyRecordSet($transactionId));
498 - $record->setAttributeValue($updatedTranslatedTextAttribute, getUpdatedTranslatedTextRecordSet($transactionId));
499 - $record->setAttributeValue($updatedClassAttributesAttribute, getUpdatedClassAttributesRecordSet($transactionId));
 468+ $record = new ArrayRecord($o->updatesInTransaction->type);
 469+ $record->updatedDefinition = getUpdatedDefinedMeaningDefinitionRecordSet($transactionId);
 470+ $record->updatedAlternativeDefinitions = getUpdatedAlternativeDefinitionsRecordSet($transactionId);
 471+ $record->updatedAlternativeDefinitionText = getUpdatedAlternativeDefinitionTextRecordSet($transactionId);
 472+ $record->updatedSyntranses = getUpdatedSyntransesRecordSet($transactionId);
 473+ $record->updatedRelations = getUpdatedRelationsRecordSet($transactionId);
 474+ $record->updatedClassMembership = getUpdatedClassMembershipRecordSet($transactionId);
 475+ $record->updatedCollectionMembership = getUpdatedCollectionMembershipRecordSet($transactionId);
 476+ $record->updatedLink = getUpdatedLinkRecordSet($transactionId);
 477+ $record->updatedText = getUpdatedTextRecordSet($transactionId);
 478+ $record->updatedTranslatedTextProperty = getUpdatedTranslatedTextPropertyRecordSet($transactionId);
 479+ $record->updatedTranslatedText = getUpdatedTranslatedTextRecordSet($transactionId);
 480+ $record->updatedClassAttributes = getUpdatedClassAttributesRecordSet($transactionId);
500481
501482 return $record;
502483 }
503484
504485 function getTranslatedContentHistory($translatedContentId, $languageId, $isLatest) {
505 - global
506 - $translatedContentHistoryStructure, $translatedContentHistoryKeyStructure,
507 - $addTransactionIdAttribute, $recordLifeSpanAttribute;
508486
 487+ $o=OmegaWikiAttributes::getInstance();
 488+
509489 $dc=wdGetDataSetContext();
510 - $recordSet = new ArrayRecordSet($translatedContentHistoryStructure, $translatedContentHistoryKeyStructure);
 490+ $recordSet = new ArrayRecordSet($o->translatedContentHistoryStructure, $o->translatedContentHistoryKeyStructure);
511491
512492 if ($isLatest) {
513493 $dbr = &wfGetDB(DB_SLAVE);
@@ -520,10 +500,10 @@
521501 );
522502
523503 while ($row = $dbr->fetchObject($queryResult)) {
524 - $record = new ArrayRecord($translatedContentHistoryStructure);
 504+ $record = new ArrayRecord($o->translatedContentHistoryStructure);
525505 $record->text = $row->text_text;
526 - $record->setAttributeValue($addTransactionIdAttribute, (int) $row->add_transaction_id);
527 - $record->setAttributeValue($recordLifeSpanAttribute, getRecordLifeSpanTuple((int) $row->add_transaction_id, (int) $row->remove_transaction_id));
 506+ $record->addTransactionId = (int) $row->add_transaction_id;
 507+ $record->recordLifeSpan = getRecordLifeSpanTuple((int) $row->add_transaction_id, (int) $row->remove_transaction_id);
528508
529509 $recordSet->add($record);
530510 }
@@ -533,25 +513,23 @@
534514 }
535515
536516 function getUpdatedTextRecord($text, $history) {
537 - global
538 - $updatedTextStructure, $translatedContentHistoryAttribute;
 517+
 518+ $o=OmegaWikiAttributes::getInstance();
539519
540 - $result = new ArrayRecord($updatedTextStructure);
 520+ $result = new ArrayRecord($o->updatedTextStructure);
541521 $result->text = $text;
542 - $result->setAttributeValue($translatedContentHistoryAttribute, $history);
 522+ $result->translatedContentHistory = $history;
543523
544524 return $result;
545525 }
546526
547527 function getUpdatedDefinedMeaningDefinitionRecordSet($transactionId) {
548528
549 - global
550 - $definedMeaningIdAttribute,
551 - $definedMeaningReferenceAttribute, $updatedDefinitionStructure, $translatedContentIdAttribute,
552 - $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $rollBackTranslatedContentStructure;
553529
554530 $o=OmegaWikiAttributes::getInstance();
555531
 532+ $o=OmegaWikiAttributes::getInstance();
 533+
556534 $dc=wdGetDataSetContext();
557535
558536 $dbr = &wfGetDB(DB_SLAVE);
@@ -566,18 +544,18 @@
567545 " AND " . getAtTransactionRestriction("{$dc}_defined_meaning", $transactionId)
568546 );
569547
570 - $recordSet = new ArrayRecordSet($updatedDefinitionStructure, new Structure($definedMeaningIdAttribute, $o->language));
 548+ $recordSet = new ArrayRecordSet($o->updatedDefinitionStructure, new Structure($o->definedMeaningId, $o->language));
571549
572550 while ($row = $dbr->fetchObject($queryResult)) {
573 - $record = new ArrayRecord($updatedDefinitionStructure);
574 - $record->setAttributeValue($definedMeaningIdAttribute, $row->defined_meaning_id);
575 - $record->setAttributeValue($definedMeaningReferenceAttribute, getDefinedMeaningReferenceRecord($row->defined_meaning_id));
576 - $record->setAttributeValue($translatedContentIdAttribute, $row->translated_content_id);
 551+ $record = new ArrayRecord($o->updatedDefinitionStructure);
 552+ $record->definedMeaningId = $row->defined_meaning_id;
 553+ $record->definedMeaningReference = getDefinedMeaningReferenceRecord($row->defined_meaning_id);
 554+ $record->translatedContentId = $row->translated_content_id;
577555 $record->language = $row->language_id;
578556 $record->text = $row->text_text;
579 - $record->setAttributeValue($operationAttribute, $row->operation);
580 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
581 - $record->setAttributeValue($rollBackTranslatedContentAttribute, simpleRecord($rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest))));
 557+ $record->operation = $row->operation;
 558+ $record->isLatest = $row->is_latest;
 559+ $record->rollBackTranslatedContent = simpleRecord($o->rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest)));
582560 $recordSet->add($record);
583561 }
584562
@@ -585,11 +563,9 @@
586564 }
587565
588566 function getUpdatedAlternativeDefinitionsRecordSet($transactionId) {
589 - global
590 - $updatedAlternativeDefinitionsStructure, $definedMeaningIdAttribute, $definedMeaningReferenceAttribute,
591 - $translatedContentIdAttribute, $sourceAttribute, $alternativeDefinitionTextAttribute,
592 - $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure;
593567
 568+ $o=OmegaWikiAttributes::getInstance();
 569+
594570 $dc=wdGetDataSetContext();
595571 $dbr = &wfGetDB(DB_SLAVE);
596572 $queryResult = $dbr->query(
@@ -600,36 +576,34 @@
601577 " WHERE " . getInTransactionRestriction("{$dc}_alt_meaningtexts", $transactionId)
602578 );
603579
604 - $recordSet = new ArrayRecordSet($updatedAlternativeDefinitionsStructure, new Structure($definedMeaningIdAttribute, $translatedContentIdAttribute));
 580+ $recordSet = new ArrayRecordSet($o->updatedAlternativeDefinitionsStructure, new Structure($o->definedMeaningId, $o->translatedContentId));
605581
606582 while ($row = $dbr->fetchObject($queryResult)) {
607 - $record = new ArrayRecord($updatedAlternativeDefinitionsStructure);
608 - $record->setAttributeValue($definedMeaningIdAttribute, $row->meaning_mid);
609 - $record->setAttributeValue($definedMeaningReferenceAttribute, getDefinedMeaningReferenceRecord($row->meaning_mid));
610 - $record->setAttributeValue($translatedContentIdAttribute, $row->meaning_text_tcid);
611 - $record->setAttributeValue($sourceAttribute, getDefinedMeaningReferenceRecord($row->source_id));
612 - $record->setAttributeValue($operationAttribute, $row->operation);
613 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
614 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 583+ $record = new ArrayRecord($o->updatedAlternativeDefinitionsStructure);
 584+ $record->definedMeaningId = $row->meaning_mid;
 585+ $record->definedMeaningReference = getDefinedMeaningReferenceRecord($row->meaning_mid);
 586+ $record->translatedContentId = $row->meaning_text_tcid;
 587+ $record->source = getDefinedMeaningReferenceRecord($row->source_id);
 588+ $record->operation = $row->operation;
 589+ $record->isLatest = $row->is_latest;
 590+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
615591
616592 $recordSet->add($record);
617593 }
618594
619595 $viewInformation = new ViewInformation();
620596 $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation();
621 - expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $alternativeDefinitionTextAttribute, $viewInformation);
 597+ expandTranslatedContentsInRecordSet($recordSet, $o->translatedContentId, $o->alternativeDefinitionText, $viewInformation);
622598
623599 return $recordSet;
624600 }
625601
626602 function getUpdatedAlternativeDefinitionTextRecordSet($transactionId) {
627 - global
628 - $definedMeaningIdAttribute, $sourceAttribute,
629 - $definedMeaningReferenceAttribute, $updatedAlternativeDefinitionTextStructure, $translatedContentIdAttribute,
630 - $rollBackTranslatedContentStructure, $rollBackTranslatedContentAttribute, $operationAttribute, $isLatestAttribute;
631603
632604 $o=OmegaWikiAttributes::getInstance();
633605
 606+ $o=OmegaWikiAttributes::getInstance();
 607+
634608 $dc=wdGetDataSetContext();
635609 $dbr = &wfGetDB(DB_SLAVE);
636610 $queryResult = $dbr->query(
@@ -643,19 +617,19 @@
644618 " AND " . getAtTransactionRestriction("{$dc}_alt_meaningtexts", $transactionId)
645619 );
646620
647 - $recordSet = new ArrayRecordSet($updatedAlternativeDefinitionTextStructure, new Structure($translatedContentIdAttribute, $o->language));
 621+ $recordSet = new ArrayRecordSet($o->updatedAlternativeDefinitionTextStructure, new Structure($o->translatedContentId, $o->language));
648622
649623 while ($row = $dbr->fetchObject($queryResult)) {
650 - $record = new ArrayRecord($updatedAlternativeDefinitionTextStructure);
651 - $record->setAttributeValue($definedMeaningIdAttribute, $row->meaning_mid);
652 - $record->setAttributeValue($definedMeaningReferenceAttribute, getDefinedMeaningReferenceRecord($row->meaning_mid));
653 - $record->setAttributeValue($translatedContentIdAttribute, $row->translated_content_id);
654 - $record->setAttributeValue($sourceAttribute, getDefinedMeaningReferenceRecord($row->source_id));
 624+ $record = new ArrayRecord($o->updatedAlternativeDefinitionTextStructure);
 625+ $record->definedMeaningId = $row->meaning_mid;
 626+ $record->definedMeaningReference = getDefinedMeaningReferenceRecord($row->meaning_mid);
 627+ $record->translatedContentId = $row->translated_content_id;
 628+ $record->source = getDefinedMeaningReferenceRecord($row->source_id);
655629 $record->language = $row->language_id;
656630 $record->text = $row->text_text;
657 - $record->setAttributeValue($operationAttribute, $row->operation);
658 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
659 - $record->setAttributeValue($rollBackTranslatedContentAttribute, simpleRecord($rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest))));
 631+ $record->operation = $row->operation;
 632+ $record->isLatest = $row->is_latest;
 633+ $record->rollBackTranslatedContent = simpleRecord($o->rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest)));
660634 $recordSet->add($record);
661635 }
662636
@@ -663,13 +637,10 @@
664638 }
665639
666640 function getUpdatedSyntransesRecordSet($transactionId, $dc=null) {
667 - global
668 - $updatedSyntransesStructure, $definedMeaningIdAttribute, $definedMeaningReferenceAttribute,
669 - $expressionAttribute, $expressionStructure, $syntransIdAttribute,
670 - $expressionIdAttribute, $identicalMeaningAttribute,
671 - $isLatestAttribute, $operationAttribute, $rollBackAttribute, $rollBackStructure;
672641
673642 $o=OmegaWikiAttributes::getInstance();
 643+
 644+ $o=OmegaWikiAttributes::getInstance();
674645 $dc=wdGetDataSetContext($dc);
675646
676647 $dbr = &wfGetDB(DB_SLAVE);
@@ -683,23 +654,23 @@
684655 " AND " . getAtTransactionRestriction("{$dc}_expression_ns", $transactionId)
685656 );
686657
687 - $recordSet = new ArrayRecordSet($updatedSyntransesStructure, new Structure($syntransIdAttribute));
 658+ $recordSet = new ArrayRecordSet($o->updatedSyntransesStructure, new Structure($o->syntransId));
688659
689660 while ($row = $dbr->fetchObject($queryResult)) {
690 - $expressionRecord = new ArrayRecord($expressionStructure);
 661+ $expressionRecord = new ArrayRecord($o->expressionStructure);
691662 $expressionRecord->language = $row->language_id;
692663 $expressionRecord->spelling = $row->spelling;
693664
694 - $record = new ArrayRecord($updatedSyntransesStructure);
695 - $record->setAttributeValue($syntransIdAttribute, $row->syntrans_sid);
696 - $record->setAttributeValue($definedMeaningIdAttribute, $row->defined_meaning_id);
697 - $record->setAttributeValue($expressionIdAttribute, $row->expression_id);
698 - $record->setAttributeValue($definedMeaningReferenceAttribute, getDefinedMeaningReferenceRecord($row->defined_meaning_id));
699 - $record->setAttributeValue($expressionAttribute, $expressionRecord);
700 - $record->setAttributeValue($identicalMeaningAttribute, $row->identical_meaning);
701 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
702 - $record->setAttributeValue($operationAttribute, $row->operation);
703 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 665+ $record = new ArrayRecord($o->updatedSyntransesStructure);
 666+ $record->syntransId = $row->syntrans_sid;
 667+ $record->definedMeaningId = $row->defined_meaning_id;
 668+ $record->expressionId = $row->expression_id;
 669+ $record->definedMeaningReference = getDefinedMeaningReferenceRecord($row->defined_meaning_id);
 670+ $record->expression = $expressionRecord;
 671+ $record->identicalMeaning = $row->identical_meaning;
 672+ $record->isLatest = $row->is_latest;
 673+ $record->operation = $row->operation;
 674+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
704675
705676 $recordSet->add($record);
706677 }
@@ -726,11 +697,10 @@
727698 }
728699
729700 function getUpdatedRelationsRecordSet($transactionId) {
730 - global
731 - $updatedRelationsStructure, $relationIdAttribute, $firstMeaningAttribute, $secondMeaningAttribute,
732 - $relationTypeAttribute, $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure;
733701
 702+ $o=OmegaWikiAttributes::getInstance();
734703
 704+
735705 $dc=wdGetDataSetContext();
736706
737707 $dbr = &wfGetDB(DB_SLAVE);
@@ -742,17 +712,17 @@
743713 " WHERE " . getInTransactionRestriction("{$dc}_meaning_relations", $transactionId)
744714 );
745715
746 - $recordSet = new ArrayRecordSet($updatedRelationsStructure, new Structure($relationIdAttribute));
 716+ $recordSet = new ArrayRecordSet($o->updatedRelationsStructure, new Structure($o->relationId));
747717
748718 while ($row = $dbr->fetchObject($queryResult)) {
749 - $record = new ArrayRecord($updatedRelationsStructure);
750 - $record->setAttributeValue($relationIdAttribute, $row->relation_id);
751 - $record->setAttributeValue($firstMeaningAttribute, getDefinedMeaningReferenceRecord($row->meaning1_mid));
752 - $record->setAttributeValue($secondMeaningAttribute, getDefinedMeaningReferenceRecord($row->meaning2_mid));
753 - $record->setAttributeValue($relationTypeAttribute, getDefinedMeaningReferenceRecord($row->relationtype_mid));
754 - $record->setAttributeValue($operationAttribute, $row->operation);
755 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
756 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 719+ $record = new ArrayRecord($o->updatedRelationsStructure);
 720+ $record->relationId = $row->relation_id;
 721+ $record->firstMeaning = getDefinedMeaningReferenceRecord($row->meaning1_mid);
 722+ $record->secondMeaning = getDefinedMeaningReferenceRecord($row->meaning2_mid);
 723+ $record->relationType = getDefinedMeaningReferenceRecord($row->relationtype_mid);
 724+ $record->operation = $row->operation;
 725+ $record->isLatest = $row->is_latest;
 726+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
757727
758728 $recordSet->add($record);
759729 }
@@ -761,10 +731,9 @@
762732 }
763733
764734 function getUpdatedClassMembershipRecordSet($transactionId) {
765 - global
766 - $updatedClassMembershipStructure, $classMembershipIdAttribute, $classAttribute, $classMemberAttribute,
767 - $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure;
768735
 736+ $o=OmegaWikiAttributes::getInstance();
 737+
769738 $dc=wdGetDataSetContext();
770739
771740 $dbr = &wfGetDB(DB_SLAVE);
@@ -776,16 +745,16 @@
777746 " WHERE " . getInTransactionRestriction("{$dc}_class_membership", $transactionId)
778747 );
779748
780 - $recordSet = new ArrayRecordSet($updatedClassMembershipStructure, new Structure($classMembershipIdAttribute));
 749+ $recordSet = new ArrayRecordSet($o->updatedClassMembershipStructure, new Structure($o->classMembershipId));
781750
782751 while ($row = $dbr->fetchObject($queryResult)) {
783 - $record = new ArrayRecord($updatedClassMembershipStructure);
784 - $record->setAttributeValue($classMembershipIdAttribute, $row->class_membership_id);
785 - $record->setAttributeValue($classAttribute, getDefinedMeaningReferenceRecord($row->class_mid));
786 - $record->setAttributeValue($classMemberAttribute, getDefinedMeaningReferenceRecord($row->class_member_mid));
787 - $record->setAttributeValue($operationAttribute, $row->operation);
788 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
789 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 752+ $record = new ArrayRecord($o->updatedClassMembershipStructure);
 753+ $record->classMembershipId = $row->class_membership_id;
 754+ $record->class = getDefinedMeaningReferenceRecord($row->class_mid);
 755+ $record->classMember = getDefinedMeaningReferenceRecord($row->class_member_mid);
 756+ $record->operation = $row->operation;
 757+ $record->isLatest = $row->is_latest;
 758+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
790759
791760 $recordSet->add($record);
792761 }
@@ -794,11 +763,9 @@
795764 }
796765
797766 function getUpdatedCollectionMembershipRecordSet($transactionId) {
798 - global
799 - $updatedCollectionMembershipStructure, $collectionIdAttribute, $collectionMeaningAttribute,
800 - $collectionMemberAttribute, $sourceIdentifierAttribute, $collectionMemberIdAttribute,
801 - $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure;
802767
 768+ $o=OmegaWikiAttributes::getInstance();
 769+
803770 $dc=wdGetDataSetContext();
804771 $dbr = &wfGetDB(DB_SLAVE);
805772 $queryResult = $dbr->query(
@@ -811,18 +778,18 @@
812779 " AND " . getAtTransactionRestriction("{$dc}_collection_ns", $transactionId)
813780 );
814781
815 - $recordSet = new ArrayRecordSet($updatedCollectionMembershipStructure, new Structure($collectionIdAttribute, $collectionMemberIdAttribute));
 782+ $recordSet = new ArrayRecordSet($o->updatedCollectionMembershipStructure, new Structure($o->collectionId, $o->collectionMemberId));
816783
817784 while ($row = $dbr->fetchObject($queryResult)) {
818 - $record = new ArrayRecord($updatedCollectionMembershipStructure);
819 - $record->setAttributeValue($collectionIdAttribute, $row->collection_id);
820 - $record->setAttributeValue($collectionMeaningAttribute, getDefinedMeaningReferenceRecord($row->collection_mid));
821 - $record->setAttributeValue($collectionMemberIdAttribute, $row->member_mid);
822 - $record->setAttributeValue($collectionMemberAttribute, getDefinedMeaningReferenceRecord($row->member_mid));
823 - $record->setAttributeValue($sourceIdentifierAttribute, $row->internal_member_id);
824 - $record->setAttributeValue($operationAttribute, $row->operation);
825 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
826 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 785+ $record = new ArrayRecord($o->updatedCollectionMembershipStructure);
 786+ $record->collectionId = $row->collection_id;
 787+ $record->collectionMeaning = getDefinedMeaningReferenceRecord($row->collection_mid);
 788+ $record->collectionMemberId = $row->member_mid;
 789+ $record->collectionMember = getDefinedMeaningReferenceRecord($row->member_mid);
 790+ $record->sourceIdentifier = $row->internal_member_id;
 791+ $record->operation = $row->operation;
 792+ $record->isLatest = $row->is_latest;
 793+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
827794
828795 $recordSet->add($record);
829796 }
@@ -831,10 +798,9 @@
832799 }
833800
834801 function getUpdatedClassAttributesRecordSet($transactionId) {
835 - global
836 - $updatedClassAttributesStructure, $classAttributeIdAttribute, $classAttribute, $levelAttribute,
837 - $attributeAttribute, $typeAttribute, $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure;
838802
 803+ $o=OmegaWikiAttributes::getInstance();
 804+
839805 $dc=wdGetDataSetContext();
840806 $dbr = &wfGetDB(DB_SLAVE);
841807 $queryResult = $dbr->query(
@@ -845,18 +811,18 @@
846812 " WHERE " . getInTransactionRestriction("{$dc}_class_attributes", $transactionId)
847813 );
848814
849 - $recordSet = new ArrayRecordSet($updatedClassAttributesStructure, new Structure($classAttributeIdAttribute));
 815+ $recordSet = new ArrayRecordSet($o->updatedClassAttributesStructure, new Structure($o->classAttributeId));
850816
851817 while ($row = $dbr->fetchObject($queryResult)) {
852 - $record = new ArrayRecord($updatedClassAttributesStructure);
853 - $record->setAttributeValue($classAttributeIdAttribute, $row->object_id);
854 - $record->setAttributeValue($classAttribute, getDefinedMeaningReferenceRecord($row->class_mid));
855 - $record->setAttributeValue($levelAttribute, getDefinedMeaningReferenceRecord($row->level_mid));
856 - $record->setAttributeValue($attributeAttribute, getDefinedMeaningReferenceRecord($row->attribute_mid));
857 - $record->setAttributeValue($typeAttribute, $row->attribute_type);
858 - $record->setAttributeValue($operationAttribute, $row->operation);
859 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
860 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 818+ $record = new ArrayRecord($o->updatedClassAttributesStructure);
 819+ $record->classAttributeId = $row->object_id;
 820+ $record->class = getDefinedMeaningReferenceRecord($row->class_mid);
 821+ $record->level = getDefinedMeaningReferenceRecord($row->level_mid);
 822+ $record->attribute = getDefinedMeaningReferenceRecord($row->attribute_mid);
 823+ $record->type = $row->attribute_type;
 824+ $record->operation = $row->operation;
 825+ $record->isLatest = $row->is_latest;
 826+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
861827
862828 $recordSet->add($record);
863829 }
@@ -865,22 +831,20 @@
866832 }
867833
868834 function createLinkRecord($url, $label) {
869 - global
870 - $linkAttribute, $linkLabelAttribute, $linkURLAttribute;
 835+
 836+ $o=OmegaWikiAttributes::getInstance();
871837
872 - $result = new ArrayRecord($linkAttribute->type);
873 - $result->setAttributeValue($linkLabelAttribute, $label);
874 - $result->setAttributeValue($linkURLAttribute, $url);
 838+ $result = new ArrayRecord($o->link->type);
 839+ $result->linkLabel = $label;
 840+ $result->linkURL = $url;
875841
876842 return $result;
877843 }
878844
879845 function getUpdatedLinkRecordSet($transactionId) {
880 - global
881 - $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $linkAttribute,
882 - $updatedLinkStructure, $operationAttribute, $isLatestAttribute,
883 - $rollBackAttribute, $rollBackStructure;
884846
 847+ $o=OmegaWikiAttributes::getInstance();
 848+
885849 $dc=wdGetDataSetContext();
886850 $dbr = &wfGetDB(DB_SLAVE);
887851 $queryResult = $dbr->query(
@@ -891,17 +855,17 @@
892856 " WHERE " . getInTransactionRestriction("{$dc}_url_attribute_values", $transactionId)
893857 );
894858
895 - $recordSet = new ArrayRecordSet($updatedLinkStructure, new Structure($valueIdAttribute));
 859+ $recordSet = new ArrayRecordSet($o->updatedLinkStructure, new Structure($o->valueId));
896860
897861 while ($row = $dbr->fetchObject($queryResult)) {
898 - $record = new ArrayRecord($updatedLinkStructure);
899 - $record->setAttributeValue($valueIdAttribute, $row->value_id);
900 - $record->setAttributeValue($objectIdAttribute, $row->object_id);
901 - $record->setAttributeValue($attributeAttribute, getDefinedMeaningReferenceRecord($row->attribute_mid));
902 - $record->setAttributeValue($linkAttribute, createLinkRecord($row->url, $row->label));
903 - $record->setAttributeValue($operationAttribute, $row->operation);
904 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
905 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 862+ $record = new ArrayRecord($o->updatedLinkStructure);
 863+ $record->valueId = $row->value_id;
 864+ $record->objectId = $row->object_id;
 865+ $record->attribute = getDefinedMeaningReferenceRecord($row->attribute_mid);
 866+ $record->link = createLinkRecord($row->url, $row->label);
 867+ $record->operation = $row->operation;
 868+ $record->isLatest = $row->is_latest;
 869+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
906870
907871 $recordSet->add($record);
908872 }
@@ -910,11 +874,9 @@
911875 }
912876
913877 function getUpdatedTextRecordSet($transactionId) {
914 - global
915 - $objectIdAttribute, $valueIdAttribute, $attributeAttribute,
916 - $updatedTextStructure,
917 - $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure;
918878
 879+ $o=OmegaWikiAttributes::getInstance();
 880+
919881 $dc=wdGetDataSetContext();
920882 $dbr = &wfGetDB(DB_SLAVE);
921883 $queryResult = $dbr->query(
@@ -925,17 +887,17 @@
926888 " WHERE " . getInTransactionRestriction("{$dc}_text_attribute_values", $transactionId)
927889 );
928890
929 - $recordSet = new ArrayRecordSet($updatedTextStructure, new Structure($valueIdAttribute));
 891+ $recordSet = new ArrayRecordSet($o->updatedTextStructure, new Structure($o->valueId));
930892
931893 while ($row = $dbr->fetchObject($queryResult)) {
932 - $record = new ArrayRecord($updatedTextStructure);
933 - $record->setAttributeValue($valueIdAttribute, $row->value_id);
934 - $record->setAttributeValue($objectIdAttribute, $row->object_id);
935 - $record->setAttributeValue($attributeAttribute, getDefinedMeaningReferenceRecord($row->attribute_mid));
 894+ $record = new ArrayRecord($o->updatedTextStructure);
 895+ $record->valueId = $row->value_id;
 896+ $record->objectId = $row->object_id;
 897+ $record->attribute = getDefinedMeaningReferenceRecord($row->attribute_mid);
936898 $record->text= $row->text;
937 - $record->setAttributeValue($operationAttribute, $row->operation);
938 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
939 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 899+ $record->operation = $row->operation;
 900+ $record->isLatest = $row->is_latest;
 901+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
940902
941903 $recordSet->add($record);
942904 }
@@ -944,11 +906,9 @@
945907 }
946908
947909 function getUpdatedTranslatedTextPropertyRecordSet($transactionId) {
948 - global
949 - $updatedTranslatedTextPropertyStructure, $objectIdAttribute, $valueIdAttribute,
950 - $translatedContentIdAttribute, $attributeAttribute, $translatedTextTextAttribute,
951 - $operationAttribute, $isLatestAttribute, $rollBackAttribute, $rollBackStructure;
952910
 911+ $o=OmegaWikiAttributes::getInstance();
 912+
953913 $dc=wdGetDataSetContext();
954914 $dbr = &wfGetDB(DB_SLAVE);
955915 $queryResult = $dbr->query(
@@ -959,33 +919,29 @@
960920 " WHERE " . getInTransactionRestriction("{$dc}_translated_content_attribute_values", $transactionId)
961921 );
962922
963 - $recordSet = new ArrayRecordSet($updatedTranslatedTextPropertyStructure, new Structure($valueIdAttribute));
 923+ $recordSet = new ArrayRecordSet($o->updatedTranslatedTextPropertyStructure, new Structure($o->valueId));
964924
965925 while ($row = $dbr->fetchObject($queryResult)) {
966 - $record = new ArrayRecord($updatedTranslatedTextPropertyStructure);
967 - $record->setAttributeValue($valueIdAttribute, $row->value_id);
968 - $record->setAttributeValue($objectIdAttribute, $row->object_id);
969 - $record->setAttributeValue($translatedContentIdAttribute, $row->value_tcid);
970 - $record->setAttributeValue($attributeAttribute, getDefinedMeaningReferenceRecord($row->attribute_mid));
971 - $record->setAttributeValue($operationAttribute, $row->operation);
972 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
973 - $record->setAttributeValue($rollBackAttribute, simpleRecord($rollBackStructure, array($row->is_latest, $row->operation)));
 926+ $record = new ArrayRecord($o->updatedTranslatedTextPropertyStructure);
 927+ $record->valueId = $row->value_id;
 928+ $record->objectId = $row->object_id;
 929+ $record->translatedContentId = $row->value_tcid;
 930+ $record->attribute = getDefinedMeaningReferenceRecord($row->attribute_mid);
 931+ $record->operation = $row->operation;
 932+ $record->isLatest = $row->is_latest;
 933+ $record->rollBack = simpleRecord($o->rollBackStructure, array($row->is_latest, $row->operation));
974934
975935 $recordSet->add($record);
976936 }
977937
978938 $viewInformation = new ViewInformation();
979939 $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation();
980 - expandTranslatedContentsInRecordSet($recordSet, $translatedContentIdAttribute, $translatedTextTextAttribute, $viewInformation);
 940+ expandTranslatedContentsInRecordSet($recordSet, $o->translatedContentId, $o->translatedTextText, $viewInformation);
981941
982942 return $recordSet;
983943 }
984944
985945 function getUpdatedTranslatedTextRecordSet($transactionId) {
986 - global
987 - $objectAttributeValues, $objectIdAttribute, $valueIdAttribute, $attributeAttribute,
988 - $updatedTranslatedTextStructure, $translatedContentIdAttribute,
989 - $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $rollBackTranslatedContentStructure;
990946
991947 $o=OmegaWikiAttributes::getInstance();
992948
@@ -1002,19 +958,19 @@
1003959 " AND " . getAtTransactionRestriction("{$dc}_translated_content_attribute_values", $transactionId)
1004960 );
1005961
1006 - $recordSet = new ArrayRecordSet($updatedTranslatedTextStructure, new Structure($valueIdAttribute, $o->language));
 962+ $recordSet = new ArrayRecordSet($o->updatedTranslatedTextStructure, new Structure($o->valueId, $o->language));
1007963
1008964 while ($row = $dbr->fetchObject($queryResult)) {
1009 - $record = new ArrayRecord($updatedTranslatedTextStructure);
1010 - $record->setAttributeValue($valueIdAttribute, $row->value_id);
1011 - $record->setAttributeValue($objectIdAttribute, $row->object_id);
1012 - $record->setAttributeValue($attributeAttribute, getDefinedMeaningReferenceRecord($row->attribute_mid));
1013 - $record->setAttributeValue($translatedContentIdAttribute, $row->translated_content_id);
 965+ $record = new ArrayRecord($o->updatedTranslatedTextStructure);
 966+ $record->valueId = $row->value_id;
 967+ $record->objectId = $row->object_id;
 968+ $record->attribute = getDefinedMeaningReferenceRecord($row->attribute_mid);
 969+ $record->translatedContentId = $row->translated_content_id;
1014970 $record->language = $row->language_id;
1015971 $record->text = $row->text_text;
1016 - $record->setAttributeValue($operationAttribute, $row->operation);
1017 - $record->setAttributeValue($isLatestAttribute, $row->is_latest);
1018 - $record->setAttributeValue($rollBackTranslatedContentAttribute, simpleRecord($rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest))));
 972+ $record->operation = $row->operation;
 973+ $record->isLatest = $row->is_latest;
 974+ $record->rollBackTranslatedContent = simpleRecord($o->rollBackTranslatedContentStructure, array($row->is_latest, $row->operation, getTranslatedContentHistory($row->translated_content_id, $row->language_id, $row->is_latest)));
1019975 $recordSet->add($record);
1020976 }
1021977
@@ -1022,14 +978,14 @@
1023979 }
1024980
1025981 function getTranslatedContentHistorySelector($attribute) {
1026 - global
1027 - $recordLifeSpanAttribute;
1028982
1029983 $o=OmegaWikiAttributes::getInstance();
1030984
 985+ $o=OmegaWikiAttributes::getInstance();
 986+
1031987 $result = createSuggestionsTableViewer($attribute);
1032988 $result->addEditor(createLongTextViewer($o->text));
1033 - $result->addEditor(createTableLifeSpanEditor($recordLifeSpanAttribute));
 989+ $result->addEditor(createTableLifeSpanEditor($o->recordLifeSpan));
1034990
1035991 $result = new RecordSetRecordSelector($result);
1036992
@@ -1037,251 +993,240 @@
1038994 }
1039995
1040996 function getUpdatedDefinedMeaningDefinitionEditor($attribute, $showRollBackOptions) {
1041 - global
1042 - $definedMeaningReferenceAttribute,
1043 - $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $translatedContentHistoryAttribute;
 997+
 998+ $o=OmegaWikiAttributes::getInstance();
1044999
10451000 $o=OmegaWikiAttributes::getInstance();
10461001 $editor = createTableViewer($attribute);
10471002
10481003 if ($showRollBackOptions) {
1049 - $rollBackEditor = new RollbackEditor($rollBackTranslatedContentAttribute, true);
1050 - $rollBackEditor->setSuggestionsEditor(getTranslatedContentHistorySelector($translatedContentHistoryAttribute));
 1004+ $rollBackEditor = new RollbackEditor($o->rollBackTranslatedContent, true);
 1005+ $rollBackEditor->setSuggestionsEditor(getTranslatedContentHistorySelector($o->translatedContentHistory));
10511006
10521007 $editor->addEditor($rollBackEditor);
10531008 }
10541009
1055 - $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute));
 1010+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->definedMeaningReference));
10561011 $editor->addEditor(createLanguageViewer($o->language));
10571012 $editor->addEditor(createLongTextViewer($o->text));
1058 - $editor->addEditor(createShortTextViewer($operationAttribute));
1059 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1013+ $editor->addEditor(createShortTextViewer($o->operation));
 1014+ $editor->addEditor(createBooleanViewer($o->isLatest));
10601015
10611016 return $editor;
10621017 }
10631018
10641019 function getUpdatedAlternativeDefinitionsEditor($attribute, $showRollBackOptions) {
1065 - global
1066 - $definedMeaningReferenceAttribute, $sourceAttribute,
1067 - $alternativeDefinitionTextAttribute, $rollBackAttribute, $operationAttribute,$isLatestAttribute;
 1020+
 1021+ $o=OmegaWikiAttributes::getInstance();
10681022
10691023 $editor = createTableViewer($attribute);
10701024
10711025 if ($showRollBackOptions)
1072 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1026+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
10731027
1074 - $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute));
1075 - $editor->addEditor(createTranslatedTextViewer($alternativeDefinitionTextAttribute));
1076 - $editor->addEditor(createDefinedMeaningReferenceViewer($sourceAttribute));
1077 - $editor->addEditor(createShortTextViewer($operationAttribute));
1078 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1028+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->definedMeaningReference));
 1029+ $editor->addEditor(createTranslatedTextViewer($o->alternativeDefinitionText));
 1030+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->source));
 1031+ $editor->addEditor(createShortTextViewer($o->operation));
 1032+ $editor->addEditor(createBooleanViewer($o->isLatest));
10791033
10801034 return $editor;
10811035 }
10821036
10831037 function getUpdatedAlternativeDefinitionTextEditor($attribute, $showRollBackOptions) {
1084 - global
1085 - $definedMeaningReferenceAttribute, $sourceAttribute,
1086 - $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $translatedContentHistoryAttribute;
10871038
10881039 $o=OmegaWikiAttributes::getInstance();
 1040+
 1041+ $o=OmegaWikiAttributes::getInstance();
10891042
10901043 $editor = createTableViewer($attribute);
10911044
10921045 if ($showRollBackOptions) {
1093 - $rollBackEditor = new RollbackEditor($rollBackTranslatedContentAttribute, true);
1094 - $rollBackEditor->setSuggestionsEditor(getTranslatedContentHistorySelector($translatedContentHistoryAttribute));
 1046+ $rollBackEditor = new RollbackEditor($o->rollBackTranslatedContent, true);
 1047+ $rollBackEditor->setSuggestionsEditor(getTranslatedContentHistorySelector($o->translatedContentHistory));
10951048
10961049 $editor->addEditor($rollBackEditor);
10971050 }
10981051
1099 - $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute));
 1052+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->definedMeaningReference));
11001053 $editor->addEditor(createLanguageViewer($o->language));
11011054 $editor->addEditor(createLongTextViewer($o->text));
1102 - $editor->addEditor(createDefinedMeaningReferenceViewer($sourceAttribute));
1103 - $editor->addEditor(createShortTextViewer($operationAttribute));
1104 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1055+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->source));
 1056+ $editor->addEditor(createShortTextViewer($o->operation));
 1057+ $editor->addEditor(createBooleanViewer($o->isLatest));
11051058
11061059 return $editor;
11071060 }
11081061
11091062 function getUpdatedSyntransesEditor($attribute, $showRollBackOptions) {
1110 - global
1111 - $definedMeaningReferenceAttribute, $expressionAttribute, $identicalMeaningAttribute,
1112 - $isLatestAttribute, $operationAttribute, $rollBackAttribute;
 1063+
 1064+ $o=OmegaWikiAttributes::getInstance();
11131065
11141066 $editor = createTableViewer($attribute);
11151067
11161068 if ($showRollBackOptions)
1117 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1069+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
11181070
11191071 $viewInformation = new ViewInformation();
11201072 $viewInformation->queryTransactionInformation = new QueryLatestTransactionInformation();
11211073
1122 - $editor->addEditor(createDefinedMeaningReferenceViewer($definedMeaningReferenceAttribute));
1123 - $editor->addEditor(getExpressionTableCellEditor($expressionAttribute, $viewInformation));
1124 - $editor->addEditor(new BooleanEditor($identicalMeaningAttribute, new SimplePermissionController(false), false, false));
1125 - $editor->addEditor(createShortTextViewer($operationAttribute));
1126 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1074+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->definedMeaningReference));
 1075+ $editor->addEditor(getExpressionTableCellEditor($o->expression, $viewInformation));
 1076+ $editor->addEditor(new BooleanEditor($o->identicalMeaning, new SimplePermissionController(false), false, false));
 1077+ $editor->addEditor(createShortTextViewer($o->operation));
 1078+ $editor->addEditor(createBooleanViewer($o->isLatest));
11271079
11281080 return $editor;
11291081 }
11301082
11311083 function getUpdatedRelationsEditor($attribute, $showRollBackOptions) {
1132 - global
1133 - $firstMeaningAttribute, $relationTypeAttribute, $secondMeaningAttribute, $operationAttribute,
1134 - $isLatestAttribute, $rollBackAttribute;
 1084+
 1085+ $o=OmegaWikiAttributes::getInstance();
11351086
11361087 $editor = createTableViewer($attribute);
11371088
11381089 if ($showRollBackOptions)
1139 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1090+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
11401091
1141 - $editor->addEditor(createDefinedMeaningReferenceViewer($firstMeaningAttribute));
1142 - $editor->addEditor(createDefinedMeaningReferenceViewer($relationTypeAttribute));
1143 - $editor->addEditor(createDefinedMeaningReferenceViewer($secondMeaningAttribute));
1144 - $editor->addEditor(createShortTextViewer($operationAttribute));
1145 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1092+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->firstMeaning));
 1093+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->relationType));
 1094+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->secondMeaning));
 1095+ $editor->addEditor(createShortTextViewer($o->operation));
 1096+ $editor->addEditor(createBooleanViewer($o->isLatest));
11461097
11471098 return $editor;
11481099 }
11491100
11501101 function getUpdatedClassMembershipEditor($attribute, $showRollBackOptions) {
1151 - global
1152 - $classAttribute, $classMemberAttribute, $operationAttribute, $isLatestAttribute, $rollBackAttribute;
 1102+
 1103+ $o=OmegaWikiAttributes::getInstance();
11531104
11541105 $editor = createTableViewer($attribute);
11551106
11561107 if ($showRollBackOptions)
1157 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1108+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
11581109
1159 - $editor->addEditor(createDefinedMeaningReferenceViewer($classAttribute));
1160 - $editor->addEditor(createDefinedMeaningReferenceViewer($classMemberAttribute));
1161 - $editor->addEditor(createShortTextViewer($operationAttribute));
1162 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1110+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->class));
 1111+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->classMember));
 1112+ $editor->addEditor(createShortTextViewer($o->operation));
 1113+ $editor->addEditor(createBooleanViewer($o->isLatest));
11631114
11641115 return $editor;
11651116 }
11661117
11671118 function getUpdatedCollectionMembershipEditor($attribute, $showRollBackOptions) {
1168 - global
1169 - $collectionMeaningAttribute, $collectionMemberAttribute, $sourceIdentifierAttribute,
1170 - $operationAttribute, $rollBackAttribute, $isLatestAttribute;
 1119+
 1120+ $o=OmegaWikiAttributes::getInstance();
11711121
11721122 $editor = createTableViewer($attribute);
11731123
11741124 if ($showRollBackOptions)
1175 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1125+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
11761126
1177 - $editor->addEditor(createDefinedMeaningReferenceViewer($collectionMeaningAttribute));
1178 - $editor->addEditor(createDefinedMeaningReferenceViewer($collectionMemberAttribute));
1179 - $editor->addEditor(createShortTextViewer($sourceIdentifierAttribute));
1180 - $editor->addEditor(createShortTextViewer($operationAttribute));
1181 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1127+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->collectionMeaning));
 1128+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->collectionMember));
 1129+ $editor->addEditor(createShortTextViewer($o->sourceIdentifier));
 1130+ $editor->addEditor(createShortTextViewer($o->operation));
 1131+ $editor->addEditor(createBooleanViewer($o->isLatest));
11821132
11831133 return $editor;
11841134 }
11851135
11861136 function getUpdatedLinkEditor($attribute, $showRollBackOptions) {
1187 - global
1188 - $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $linkAttribute,
1189 - $rollBackAttribute, $operationAttribute, $isLatestAttribute;
 1137+
 1138+ $o=OmegaWikiAttributes::getInstance();
11901139
11911140 $editor = createTableViewer($attribute);
11921141
11931142 if ($showRollBackOptions)
1194 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1143+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
11951144
1196 - $editor->addEditor(new ObjectPathEditor($objectIdAttribute));
1197 - $editor->addEditor(createDefinedMeaningReferenceViewer($attributeAttribute));
1198 - $editor->addEditor(createLinkViewer($linkAttribute));
1199 - $editor->addEditor(createShortTextViewer($operationAttribute));
1200 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1145+ $editor->addEditor(new ObjectPathEditor($o->objectId));
 1146+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->attribute));
 1147+ $editor->addEditor(createLinkViewer($o->link));
 1148+ $editor->addEditor(createShortTextViewer($o->operation));
 1149+ $editor->addEditor(createBooleanViewer($o->isLatest));
12011150
12021151 return $editor;
12031152 }
12041153
12051154 function getUpdatedTextEditor($attribute, $showRollBackOptions) {
1206 - global
1207 - $objectIdAttribute, $valueIdAttribute, $attributeAttribute,
1208 - $rollBackAttribute, $operationAttribute, $isLatestAttribute;
 1155+
 1156+ $o=OmegaWikiAttributes::getInstance();
12091157
12101158 $o=OmegaWikiAttributes::getInstance();
12111159
12121160 $editor = createTableViewer($attribute);
12131161
12141162 if ($showRollBackOptions)
1215 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1163+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
12161164
1217 - $editor->addEditor(new ObjectPathEditor($objectIdAttribute));
1218 - $editor->addEditor(createDefinedMeaningReferenceViewer($attributeAttribute));
 1165+ $editor->addEditor(new ObjectPathEditor($o->objectId));
 1166+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->attribute));
12191167 $editor->addEditor(createLongTextViewer($o->text));
1220 - $editor->addEditor(createShortTextViewer($operationAttribute));
1221 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1168+ $editor->addEditor(createShortTextViewer($o->operation));
 1169+ $editor->addEditor(createBooleanViewer($o->isLatest));
12221170
12231171 return $editor;
12241172 }
12251173
12261174 function getUpdatedTranslatedTextPropertyEditor($attribute, $showRollBackOptions) {
1227 - global
1228 - $objectIdAttribute, $valueIdAttribute, $attributeAttribute, $translatedTextTextAttribute,
1229 - $operationAttribute, $isLatestAttribute, $rollBackAttribute;
 1175+
 1176+ $o=OmegaWikiAttributes::getInstance();
12301177
12311178 $editor = createTableViewer($attribute);
12321179
12331180 if ($showRollBackOptions)
1234 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1181+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
12351182
1236 - $editor->addEditor(new ObjectPathEditor($objectIdAttribute));
1237 - $editor->addEditor(createDefinedMeaningReferenceViewer($attributeAttribute));
1238 - $editor->addEditor(createTranslatedTextViewer($translatedTextTextAttribute));
1239 - $editor->addEditor(createShortTextViewer($operationAttribute));
1240 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1183+ $editor->addEditor(new ObjectPathEditor($o->objectId));
 1184+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->attribute));
 1185+ $editor->addEditor(createTranslatedTextViewer($o->translatedTextText));
 1186+ $editor->addEditor(createShortTextViewer($o->operation));
 1187+ $editor->addEditor(createBooleanViewer($o->isLatest));
12411188
12421189 return $editor;
12431190 }
12441191
12451192 function getUpdatedTranslatedTextEditor($attribute, $showRollBackOptions) {
1246 - global
1247 - $objectIdAttribute, $valueIdAttribute, $attributeAttribute,
1248 - $operationAttribute, $isLatestAttribute, $rollBackTranslatedContentAttribute, $translatedContentHistoryAttribute;
 1193+
 1194+ $o=OmegaWikiAttributes::getInstance();
12491195
12501196 $o=OmegaWikiAttributes::getInstance();
12511197 $editor = createTableViewer($attribute);
12521198
12531199 if ($showRollBackOptions) {
1254 - $rollBackEditor = new RollbackEditor($rollBackTranslatedContentAttribute, true);
1255 - $rollBackEditor->setSuggestionsEditor(getTranslatedContentHistorySelector($translatedContentHistoryAttribute));
 1200+ $rollBackEditor = new RollbackEditor($o->rollBackTranslatedContent, true);
 1201+ $rollBackEditor->setSuggestionsEditor(getTranslatedContentHistorySelector($o->translatedContentHistory));
12561202
12571203 $editor->addEditor($rollBackEditor);
12581204 }
12591205
1260 - $editor->addEditor(new ObjectPathEditor($objectIdAttribute));
1261 - $editor->addEditor(createDefinedMeaningReferenceViewer($attributeAttribute));
 1206+ $editor->addEditor(new ObjectPathEditor($o->objectId));
 1207+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->attribute));
12621208 $editor->addEditor(createLanguageViewer($o->language));
12631209 $editor->addEditor(createLongTextViewer($o->text));
1264 - $editor->addEditor(createShortTextViewer($operationAttribute));
1265 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1210+ $editor->addEditor(createShortTextViewer($o->operation));
 1211+ $editor->addEditor(createBooleanViewer($o->isLatest));
12661212
12671213 return $editor;
12681214 }
12691215
12701216 function getUpdatedClassAttributesEditor($attribute, $showRollBackOptions) {
1271 - global
1272 - $classAttribute, $levelAttribute, $attributeAttribute, $typeAttribute, $operationAttribute,
1273 - $isLatestAttribute, $rollBackAttribute;
 1217+
 1218+ $o=OmegaWikiAttributes::getInstance();
12741219
12751220 $editor = createTableViewer($attribute);
12761221
12771222 if ($showRollBackOptions)
1278 - $editor->addEditor(new RollbackEditor($rollBackAttribute, false));
 1223+ $editor->addEditor(new RollbackEditor($o->rollBack, false));
12791224
1280 - $editor->addEditor(createDefinedMeaningReferenceViewer($classAttribute));
1281 - $editor->addEditor(createDefinedMeaningReferenceViewer($levelAttribute));
1282 - $editor->addEditor(createDefinedMeaningReferenceViewer($attributeAttribute));
1283 - $editor->addEditor(createShortTextViewer($typeAttribute));
1284 - $editor->addEditor(createShortTextViewer($operationAttribute));
1285 - $editor->addEditor(createBooleanViewer($isLatestAttribute));
 1225+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->class));
 1226+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->level));
 1227+ $editor->addEditor(createDefinedMeaningReferenceViewer($o->attribute));
 1228+ $editor->addEditor(createShortTextViewer($o->type));
 1229+ $editor->addEditor(createShortTextViewer($o->operation));
 1230+ $editor->addEditor(createBooleanViewer($o->isLatest));
12861231
12871232 return $editor;
12881233 }
@@ -1297,14 +1242,10 @@
12981243 }
12991244
13001245 function rollBackTransactions($recordSet) {
 1246+
 1247+ $o=OmegaWikiAttributes::getInstance();
13011248 global
1302 - $wgRequest, $wgUser,
1303 - $transactionIdAttribute, $updatesInTransactionAttribute,
1304 - $updatedDefinitionAttribute, $updatedRelationsAttribute, $updatedClassMembershipAttribute,
1305 - $updatedTranslatedTextAttribute, $updatedClassAttributesAttribute, $updatedTranslatedTextPropertyAttribute,
1306 - $updatedLinkAttribute, $updatedTextAttribute, $updatedSyntransesAttribute,
1307 - $updatedAlternativeDefinitionTextAttribute, $updatedAlternativeDefinitionsAttribute,
1308 - $updatedCollectionMembershipAttribute;
 1249+ $wgRequest, $wgUser;
13091250
13101251 $summary = $wgRequest->getText('summary');
13111252 startNewTransaction($wgUser->getID(), wfGetIP(), $summary);
@@ -1315,69 +1256,69 @@
13161257 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
13171258 $transactionRecord = $recordSet->getRecord($i);
13181259
1319 - $transactionId = $transactionRecord->getAttributeValue($transactionIdAttribute);
 1260+ $transactionId = $transactionRecord->transactionId;
13201261 $idStack->pushKey(simpleRecord($transactionKeyStructure, array($transactionId)));
13211262
1322 - $updatesInTransaction = $transactionRecord->getAttributeValue($updatesInTransactionAttribute);
1323 - $idStack->pushAttribute($updatesInTransactionAttribute);
 1263+ $updatesInTransaction = $transactionRecord->updatesInTransaction;
 1264+ $idStack->pushAttribute($o->updatesInTransaction);
13241265
1325 - $updatedDefinitions = $updatesInTransaction->getAttributeValue($updatedDefinitionAttribute);
1326 - $idStack->pushAttribute($updatedDefinitionAttribute);
 1266+ $updatedDefinitions = $updatesInTransaction->updatedDefinition;
 1267+ $idStack->pushAttribute($o->updatedDefinition);
13271268 rollBackDefinitions($idStack, $updatedDefinitions);
13281269 $idStack->popAttribute();
13291270
1330 - $updatedRelations = $updatesInTransaction->getAttributeValue($updatedRelationsAttribute);
1331 - $idStack->pushAttribute($updatedRelationsAttribute);
 1271+ $updatedRelations = $updatesInTransaction->updatedRelations;
 1272+ $idStack->pushAttribute($o->updatedRelations);
13321273 rollBackRelations($idStack, $updatedRelations);
13331274 $idStack->popAttribute();
13341275
1335 - $updatedClassMemberships = $updatesInTransaction->getAttributeValue($updatedClassMembershipAttribute);
1336 - $idStack->pushAttribute($updatedClassMembershipAttribute);
 1276+ $updatedClassMemberships = $updatesInTransaction->updatedClassMembership;
 1277+ $idStack->pushAttribute($o->updatedClassMembership);
13371278 rollBackClassMemberships($idStack, $updatedClassMemberships);
13381279 $idStack->popAttribute();
13391280
1340 - $updatedClassAttributes = $updatesInTransaction->getAttributeValue($updatedClassAttributesAttribute);
1341 - $idStack->pushAttribute($updatedClassAttributesAttribute);
 1281+ $updatedClassAttributes = $updatesInTransaction->updatedClassAttributes;
 1282+ $idStack->pushAttribute($o->updatedClassAttributes);
13421283 rollBackClassAttributes($idStack, $updatedClassAttributes);
13431284 $idStack->popAttribute();
13441285
1345 - $updatedTranslatedTexts = $updatesInTransaction->getAttributeValue($updatedTranslatedTextAttribute);
1346 - $idStack->pushAttribute($updatedTranslatedTextAttribute);
 1286+ $updatedTranslatedTexts = $updatesInTransaction->updatedTranslatedText;
 1287+ $idStack->pushAttribute($o->updatedTranslatedText);
13471288 rollBackTranslatedTexts($idStack, $updatedTranslatedTexts);
13481289 $idStack->popAttribute();
13491290
1350 - $updatedTranslatedTextProperties = $updatesInTransaction->getAttributeValue($updatedTranslatedTextPropertyAttribute);
1351 - $idStack->pushAttribute($updatedTranslatedTextPropertyAttribute);
 1291+ $updatedTranslatedTextProperties = $updatesInTransaction->updatedTranslatedTextProperty;
 1292+ $idStack->pushAttribute($o->updatedTranslatedTextProperty);
13521293 rollBackTranslatedTextProperties($idStack, $updatedTranslatedTextProperties);
13531294 $idStack->popAttribute();
13541295
1355 - $updatedLinkAttributes = $updatesInTransaction->getAttributeValue($updatedLinkAttribute);
1356 - $idStack->pushAttribute($updatedLinkAttribute);
1357 - rollBackLinkAttributes($idStack, $updatedLinkAttributes);
 1296+ $o->updatedLinks = $updatesInTransaction->updatedLink;
 1297+ $idStack->pushAttribute($o->updatedLink);
 1298+ rollBackLinkAttributes($idStack, $o->updatedLinks);
13581299 $idStack->popAttribute();
13591300
1360 - $updatedTextAttributes = $updatesInTransaction->getAttributeValue($updatedTextAttribute);
1361 - $idStack->pushAttribute($updatedTextAttribute);
1362 - rollBackTextAttributes($idStack, $updatedTextAttributes);
 1301+ $o->updatedTexts = $updatesInTransaction->updatedText;
 1302+ $idStack->pushAttribute($o->updatedText);
 1303+ rollBackTextAttributes($idStack, $o->updatedTexts);
13631304 $idStack->popAttribute();
13641305
1365 - $updatedSyntranses = $updatesInTransaction->getAttributeValue($updatedSyntransesAttribute);
1366 - $idStack->pushAttribute($updatedSyntransesAttribute);
 1306+ $updatedSyntranses = $updatesInTransaction->updatedSyntranses;
 1307+ $idStack->pushAttribute($o->updatedSyntranses);
13671308 rollBackSyntranses($idStack, $updatedSyntranses);
13681309 $idStack->popAttribute();
13691310
1370 - $updatedAlternativeDefinitionTexts = $updatesInTransaction->getAttributeValue($updatedAlternativeDefinitionTextAttribute);
1371 - $idStack->pushAttribute($updatedAlternativeDefinitionTextAttribute);
 1311+ $updatedAlternativeDefinitionTexts = $updatesInTransaction->updatedAlternativeDefinitionText;
 1312+ $idStack->pushAttribute($o->updatedAlternativeDefinitionText);
13721313 rollBackAlternativeDefinitionTexts($idStack, $updatedAlternativeDefinitionTexts);
13731314 $idStack->popAttribute();
13741315
1375 - $updatedAlternativeDefinitions = $updatesInTransaction->getAttributeValue($updatedAlternativeDefinitionsAttribute);
1376 - $idStack->pushAttribute($updatedAlternativeDefinitionsAttribute);
 1316+ $updatedAlternativeDefinitions = $updatesInTransaction->updatedAlternativeDefinitions;
 1317+ $idStack->pushAttribute($o->updatedAlternativeDefinitions);
13771318 rollBackAlternativeDefinitions($idStack, $updatedAlternativeDefinitions);
13781319 $idStack->popAttribute();
13791320
1380 - $updatedCollectionMemberships = $updatesInTransaction->getAttributeValue($updatedCollectionMembershipAttribute);
1381 - $idStack->pushAttribute($updatedCollectionMembershipAttribute);
 1321+ $updatedCollectionMemberships = $updatesInTransaction->updatedCollectionMembership;
 1322+ $idStack->pushAttribute($o->updatedCollectionMembership);
13821323 rollBackCollectionMemberships($idStack, $updatedCollectionMemberships);
13831324 $idStack->popAttribute();
13841325
@@ -1395,35 +1336,34 @@
13961337 }
13971338
13981339 function getMeaningId($record, $referenceAttribute) {
1399 - global
1400 - $definedMeaningIdAttribute;
 1340+
 1341+ $o=OmegaWikiAttributes::getInstance();
14011342
1402 - return $record->getAttributeValue($referenceAttribute)->getAttributeValue($definedMeaningIdAttribute);
 1343+ return $record->getAttributeValue($referenceAttribute)->definedMeaningId;
14031344 }
14041345
14051346 function rollBackDefinitions($idStack, $definitions) {
1406 - global
1407 - $definedMeaningIdAttribute, $translatedContentIdAttribute,
1408 - $isLatestAttribute, $operationAttribute, $rollBackTranslatedContentAttribute;
 1347+
 1348+ $o=OmegaWikiAttributes::getInstance();
14091349
14101350 $definitionsKeyStructure = $definitions->getKey();
14111351
14121352 for ($i = 0; $i < $definitions->getRecordCount(); $i++) {
14131353 $definitionRecord = $definitions->getRecord($i);
14141354
1415 - $definedMeaningId = $definitionRecord->getAttributeValue($definedMeaningIdAttribute);
 1355+ $definedMeaningId = $definitionRecord->definedMeaningId;
14161356 $languageId = $definitionRecord->language;
1417 - $isLatest = $definitionRecord->getAttributeValue($isLatestAttribute);
 1357+ $isLatest = $definitionRecord->isLatest;
14181358
14191359 if ($isLatest) {
14201360 $idStack->pushKey(simpleRecord($definitionsKeyStructure, array($definedMeaningId, $languageId)));
14211361
14221362 rollBackTranslatedContent(
14231363 $idStack,
1424 - getRollBackAction($idStack, $rollBackTranslatedContentAttribute),
1425 - $definitionRecord->getAttributeValue($translatedContentIdAttribute),
 1364+ getRollBackAction($idStack, $o->rollBackTranslatedContent),
 1365+ $definitionRecord->translatedContentId,
14261366 $languageId,
1427 - $definitionRecord->getAttributeValue($operationAttribute)
 1367+ $definitionRecord->operation
14281368 );
14291369
14301370 $idStack->popKey();
@@ -1432,28 +1372,27 @@
14331373 }
14341374
14351375 function rollBackTranslatedTexts($idStack, $translatedTexts) {
1436 - global
1437 - $valueIdAttribute, $translatedContentIdAttribute,
1438 - $isLatestAttribute, $operationAttribute, $rollBackTranslatedContentAttribute;
 1376+
 1377+ $o=OmegaWikiAttributes::getInstance();
14391378
14401379 $translatedTextsKeyStructure = $translatedTexts->getKey();
14411380
14421381 for ($i = 0; $i < $translatedTexts->getRecordCount(); $i++) {
14431382 $translatedTextRecord = $translatedTexts->getRecord($i);
14441383
1445 - $valueId = $translatedTextRecord->getAttributeValue($valueIdAttribute);
 1384+ $valueId = $translatedTextRecord->valueId;
14461385 $languageId = $translatedTextRecord->language;
1447 - $isLatest = $translatedTextRecord->getAttributeValue($isLatestAttribute);
 1386+ $isLatest = $translatedTextRecord->isLatest;
14481387
14491388 if ($isLatest) {
14501389 $idStack->pushKey(simpleRecord($translatedTextsKeyStructure, array($valueId, $languageId)));
14511390
14521391 rollBackTranslatedContent(
14531392 $idStack,
1454 - getRollBackAction($idStack, $rollBackTranslatedContentAttribute),
1455 - $translatedTextRecord->getAttributeValue($translatedContentIdAttribute),
 1393+ getRollBackAction($idStack, $o->rollBackTranslatedContent),
 1394+ $translatedTextRecord->translatedContentId,
14561395 $languageId,
1457 - $translatedTextRecord->getAttributeValue($operationAttribute)
 1396+ $translatedTextRecord->operation
14581397 );
14591398
14601399 $idStack->popKey();
@@ -1462,12 +1401,12 @@
14631402 }
14641403
14651404 function rollBackTranslatedContent($idStack, $rollBackAction, $translatedContentId, $languageId, $operation) {
1466 - global
1467 - $rollBackTranslatedContentAttribute, $translatedContentHistoryAttribute;
 1405+
 1406+ $o=OmegaWikiAttributes::getInstance();
14681407
14691408 if ($rollBackAction == 'previous-version') {
1470 - $idStack->pushAttribute($rollBackTranslatedContentAttribute);
1471 - $idStack->pushAttribute($translatedContentHistoryAttribute);
 1409+ $idStack->pushAttribute($o->rollBackTranslatedContent);
 1410+ $idStack->pushAttribute($o->translatedContentHistory);
14721411
14731412 $version = (int) $_POST[$idStack->getId()];
14741413
@@ -1507,28 +1446,27 @@
15081447 }
15091448
15101449 function rollBackRelations($idStack, $relations) {
1511 - global
1512 - $relationIdAttribute, $isLatestAttribute, $firstMeaningAttribute, $secondMeaningAttribute, $relationTypeAttribute,
1513 - $operationAttribute, $rollBackAttribute;
 1450+
 1451+ $o=OmegaWikiAttributes::getInstance();
15141452
15151453 $relationsKeyStructure = $relations->getKey();
15161454
15171455 for ($i = 0; $i < $relations->getRecordCount(); $i++) {
15181456 $relationRecord = $relations->getRecord($i);
15191457
1520 - $relationId = $relationRecord->getAttributeValue($relationIdAttribute);
1521 - $isLatest = $relationRecord->getAttributeValue($isLatestAttribute);
 1458+ $relationId = $relationRecord->relationId;
 1459+ $isLatest = $relationRecord->isLatest;
15221460
15231461 if ($isLatest) {
15241462 $idStack->pushKey(simpleRecord($relationsKeyStructure, array($relationId)));
15251463
15261464 rollBackRelation(
1527 - getRollBackAction($idStack, $rollBackAttribute),
 1465+ getRollBackAction($idStack, $o->rollBack),
15281466 $relationId,
1529 - getMeaningId($relationRecord, $firstMeaningAttribute),
1530 - getMeaningId($relationRecord, $relationTypeAttribute),
1531 - getMeaningId($relationRecord, $secondMeaningAttribute),
1532 - $relationRecord->getAttributeValue($operationAttribute)
 1467+ getMeaningId($relationRecord, $o->firstMeaning),
 1468+ getMeaningId($relationRecord, $o->relationType),
 1469+ getMeaningId($relationRecord, $o->secondMeaning),
 1470+ $relationRecord->operation
15331471 );
15341472
15351473 $idStack->popKey();
@@ -1552,27 +1490,26 @@
15531491 }
15541492
15551493 function rollBackClassMemberships($idStack, $classMemberships) {
1556 - global
1557 - $classMembershipIdAttribute, $isLatestAttribute, $classAttribute, $classMemberAttribute,
1558 - $operationAttribute, $rollBackAttribute;
 1494+
 1495+ $o=OmegaWikiAttributes::getInstance();
15591496
15601497 $classMembershipsKeyStructure = $classMemberships->getKey();
15611498
15621499 for ($i = 0; $i < $classMemberships->getRecordCount(); $i++) {
15631500 $classMembershipRecord = $classMemberships->getRecord($i);
15641501
1565 - $classMembershipId = $classMembershipRecord->getAttributeValue($classMembershipIdAttribute);
1566 - $isLatest = $classMembershipRecord->getAttributeValue($isLatestAttribute);
 1502+ $classMembershipId = $classMembershipRecord->classMembershipId;
 1503+ $isLatest = $classMembershipRecord->isLatest;
15671504
15681505 if ($isLatest) {
15691506 $idStack->pushKey(simpleRecord($classMembershipsKeyStructure, array($classMembershipId)));
15701507
15711508 rollBackClassMembership(
1572 - getRollBackAction($idStack, $rollBackAttribute),
 1509+ getRollBackAction($idStack, $o->rollBack),
15731510 $classMembershipId,
1574 - getMeaningId($classMembershipRecord, $classAttribute),
1575 - getMeaningId($classMembershipRecord, $classMemberAttribute),
1576 - $classMembershipRecord->getAttributeValue($operationAttribute)
 1511+ getMeaningId($classMembershipRecord, $o->class),
 1512+ getMeaningId($classMembershipRecord, $o->classMember),
 1513+ $classMembershipRecord->operation
15771514 );
15781515
15791516 $idStack->popKey();
@@ -1588,29 +1525,28 @@
15891526 }
15901527
15911528 function rollBackClassAttributes($idStack, $classAttributes) {
1592 - global
1593 - $isLatestAttribute, $classAttribute, $levelAttribute, $attributeAttribute, $typeAttribute,
1594 - $operationAttribute, $classAttributeIdAttribute, $rollBackAttribute;
 1529+
 1530+ $o=OmegaWikiAttributes::getInstance();
15951531
1596 - $classAttributesKeyStructure = $classAttributes->getKey();
 1532+ $o->classsKeyStructure = $o->classs->getKey();
15971533
1598 - for ($i = 0; $i < $classAttributes->getRecordCount(); $i++) {
1599 - $classAttributeRecord = $classAttributes->getRecord($i);
 1534+ for ($i = 0; $i < $o->classs->getRecordCount(); $i++) {
 1535+ $o->classRecord = $o->classs->getRecord($i);
16001536
1601 - $classAttributeId = $classAttributeRecord->getAttributeValue($classAttributeIdAttribute);
1602 - $isLatest = $classAttributeRecord->getAttributeValue($isLatestAttribute);
 1537+ $o->classId = $o->classRecord->classIdAttribute;
 1538+ $isLatest = $o->classRecord->isLatest;
16031539
16041540 if ($isLatest) {
1605 - $idStack->pushKey(simpleRecord($classAttributesKeyStructure, array($classAttributeId)));
 1541+ $idStack->pushKey(simpleRecord($o->classsKeyStructure, array($o->classId)));
16061542
16071543 rollBackClassAttribute(
1608 - getRollBackAction($idStack, $rollBackAttribute),
1609 - $classAttributeId,
1610 - getMeaningId($classAttributeRecord, $classAttribute),
1611 - getMeaningId($classAttributeRecord, $levelAttribute),
1612 - getMeaningId($classAttributeRecord, $attributeAttribute),
1613 - $classAttributeRecord->getAttributeValue($typeAttribute),
1614 - $classAttributeRecord->getAttributeValue($operationAttribute)
 1544+ getRollBackAction($idStack, $o->rollBack),
 1545+ $o->classId,
 1546+ getMeaningId($o->classRecord, $o->class),
 1547+ getMeaningId($o->classRecord, $o->level),
 1548+ getMeaningId($o->classRecord, $o->attribute),
 1549+ $o->classRecord->type,
 1550+ $o->classRecord->operation
16151551 );
16161552
16171553 $idStack->popKey();
@@ -1626,28 +1562,27 @@
16271563 }
16281564
16291565 function rollBackTranslatedTextProperties($idStack, $translatedTextProperties) {
1630 - global
1631 - $isLatestAttribute, $operationAttribute, $rollBackAttribute,
1632 - $valueIdAttribute, $objectIdAttribute, $attributeAttribute, $translatedContentIdAttribute;
 1566+
 1567+ $o=OmegaWikiAttributes::getInstance();
16331568
16341569 $translatedTextPropertiesKeyStructure = $translatedTextProperties->getKey();
16351570
16361571 for ($i = 0; $i < $translatedTextProperties->getRecordCount(); $i++) {
16371572 $translatedTextPropertyRecord = $translatedTextProperties->getRecord($i);
16381573
1639 - $valueId = $translatedTextPropertyRecord->getAttributeValue($valueIdAttribute);
1640 - $isLatest = $translatedTextPropertyRecord->getAttributeValue($isLatestAttribute);
 1574+ $valueId = $translatedTextPropertyRecord->valueId;
 1575+ $isLatest = $translatedTextPropertyRecord->isLatest;
16411576
16421577 if ($isLatest) {
16431578 $idStack->pushKey(simpleRecord($translatedTextPropertiesKeyStructure, array($valueId)));
16441579
16451580 rollBackTranslatedTextProperty(
1646 - getRollBackAction($idStack, $rollBackAttribute),
 1581+ getRollBackAction($idStack, $o->rollBack),
16471582 $valueId,
1648 - $translatedTextPropertyRecord->getAttributeValue($objectIdAttribute),
1649 - getMeaningId($translatedTextPropertyRecord, $attributeAttribute),
1650 - $translatedTextPropertyRecord->getAttributeValue($translatedContentIdAttribute),
1651 - $translatedTextPropertyRecord->getAttributeValue($operationAttribute)
 1583+ $translatedTextPropertyRecord->objectId,
 1584+ getMeaningId($translatedTextPropertyRecord, $o->attribute),
 1585+ $translatedTextPropertyRecord->translatedContentId,
 1586+ $translatedTextPropertyRecord->operation
16521587 );
16531588
16541589 $idStack->popKey();
@@ -1663,31 +1598,29 @@
16641599 }
16651600
16661601 function rollBackLinkAttributes($idStack, $linkAttributes) {
1667 - global
1668 - $isLatestAttribute, $operationAttribute, $rollBackAttribute, $linkAttribute,
1669 - $valueIdAttribute, $objectIdAttribute, $attributeAttribute, $translatedContentIdAttribute,
1670 - $linkURLAttribute, $linkLabelAttribute;
 1602+
 1603+ $o=OmegaWikiAttributes::getInstance();
16711604
1672 - $linkAttributesKeyStructure = $linkAttributes->getKey();
 1605+ $o->linksKeyStructure = $o->links->getKey();
16731606
1674 - for ($i = 0; $i < $linkAttributes->getRecordCount(); $i++) {
1675 - $linkAttributeRecord = $linkAttributes->getRecord($i);
 1607+ for ($i = 0; $i < $o->links->getRecordCount(); $i++) {
 1608+ $o->linkRecord = $o->links->getRecord($i);
16761609
1677 - $valueId = $linkAttributeRecord->getAttributeValue($valueIdAttribute);
1678 - $isLatest = $linkAttributeRecord->getAttributeValue($isLatestAttribute);
 1610+ $valueId = $o->linkRecord->valueId;
 1611+ $isLatest = $o->linkRecord->isLatest;
16791612
16801613 if ($isLatest) {
1681 - $idStack->pushKey(simpleRecord($linkAttributesKeyStructure, array($valueId)));
1682 - $link = $linkAttributeRecord->getAttributeValue($linkAttribute);
 1614+ $idStack->pushKey(simpleRecord($o->linksKeyStructure, array($valueId)));
 1615+ $link = $o->linkRecord->link;
16831616
16841617 rollBackLinkAttribute(
1685 - getRollBackAction($idStack, $rollBackAttribute),
 1618+ getRollBackAction($idStack, $o->rollBack),
16861619 $valueId,
1687 - $linkAttributeRecord->getAttributeValue($objectIdAttribute),
1688 - getMeaningId($linkAttributeRecord, $attributeAttribute),
1689 - $link->getAttributeValue($linkURLAttribute),
1690 - $link->getAttributeValue($linkLabelAttribute),
1691 - $linkAttributeRecord->getAttributeValue($operationAttribute)
 1620+ $o->linkRecord->objectId,
 1621+ getMeaningId($o->linkRecord, $o->attribute),
 1622+ $link->linkURL,
 1623+ $link->linkLabel,
 1624+ $o->linkRecord->operation
16921625 );
16931626
16941627 $idStack->popKey();
@@ -1703,28 +1636,27 @@
17041637 }
17051638
17061639 function rollBackTextAttributes($idStack, $textAttributes) {
1707 - global
1708 - $isLatestAttribute, $operationAttribute, $rollBackAttribute,
1709 - $valueIdAttribute, $objectIdAttribute, $attributeAttribute, $translatedContentIdAttribute;
 1640+
 1641+ $o=OmegaWikiAttributes::getInstance();
17101642
17111643 $textAttributesKeyStructure = $textAttributes->getKey();
17121644
17131645 for ($i = 0; $i < $textAttributes->getRecordCount(); $i++) {
17141646 $textAttributeRecord = $textAttributes->getRecord($i);
17151647
1716 - $valueId = $textAttributeRecord->getAttributeValue($valueIdAttribute);
1717 - $isLatest = $textAttributeRecord->getAttributeValue($isLatestAttribute);
 1648+ $valueId = $textAttributeRecord->valueId;
 1649+ $isLatest = $textAttributeRecord->isLatest;
17181650
17191651 if ($isLatest) {
17201652 $idStack->pushKey(simpleRecord($textAttributesKeyStructure, array($valueId)));
17211653
17221654 rollBackTextAttribute(
1723 - getRollBackAction($idStack, $rollBackAttribute),
 1655+ getRollBackAction($idStack, $o->rollBack),
17241656 $valueId,
1725 - $textAttributeRecord->getAttributeValue($objectIdAttribute),
1726 - getMeaningId($textAttributeRecord, $attributeAttribute),
 1657+ $textAttributeRecord->objectId,
 1658+ getMeaningId($textAttributeRecord, $o->attribute),
17271659 $textAttributeRecord->text,
1728 - $textAttributeRecord->getAttributeValue($operationAttribute)
 1660+ $textAttributeRecord->operation
17291661 );
17301662
17311663 $idStack->popKey();
@@ -1740,28 +1672,27 @@
17411673 }
17421674
17431675 function rollBackSyntranses($idStack, $syntranses) {
1744 - global
1745 - $isLatestAttribute, $operationAttribute, $rollBackAttribute, $syntransIdAttribute, $identicalMeaningAttribute,
1746 - $expressionAttribute, $definedMeaningIdAttribute, $expressionIdAttribute;
 1676+
 1677+ $o=OmegaWikiAttributes::getInstance();
17471678
17481679 $syntransesKeyStructure = $syntranses->getKey();
17491680
17501681 for ($i = 0; $i < $syntranses->getRecordCount(); $i++) {
17511682 $syntransRecord = $syntranses->getRecord($i);
17521683
1753 - $syntransId = $syntransRecord->getAttributeValue($syntransIdAttribute);
1754 - $isLatest = $syntransRecord->getAttributeValue($isLatestAttribute);
 1684+ $syntransId = $syntransRecord->syntransId;
 1685+ $isLatest = $syntransRecord->isLatest;
17551686
17561687 if ($isLatest) {
17571688 $idStack->pushKey(simpleRecord($syntransesKeyStructure, array($syntransId)));
17581689
17591690 rollBackSyntrans(
1760 - getRollBackAction($idStack, $rollBackAttribute),
 1691+ getRollBackAction($idStack, $o->rollBack),
17611692 $syntransId,
1762 - $syntransRecord->getAttributeValue($definedMeaningIdAttribute),
1763 - $syntransRecord->getAttributeValue($expressionIdAttribute),
1764 - $syntransRecord->getAttributeValue($identicalMeaningAttribute),
1765 - $syntransRecord->getAttributeValue($operationAttribute)
 1693+ $syntransRecord->definedMeaningId,
 1694+ $syntransRecord->expressionId,
 1695+ $syntransRecord->identicalMeaning,
 1696+ $syntransRecord->operation
17661697 );
17671698
17681699 $idStack->popKey();
@@ -1777,28 +1708,27 @@
17781709 }
17791710
17801711 function rollBackAlternativeDefinitionTexts($idStack, $alternativeDefinitionTexts) {
1781 - global
1782 - $definedMeaningIdAttribute, $translatedContentIdAttribute,
1783 - $isLatestAttribute, $operationAttribute, $rollBackTranslatedContentAttribute;
 1712+
 1713+ $o=OmegaWikiAttributes::getInstance();
17841714
17851715 $alternativeDefinitionTextsKeyStructure = $alternativeDefinitionTexts->getKey();
17861716
17871717 for ($i = 0; $i < $alternativeDefinitionTexts->getRecordCount(); $i++) {
17881718 $alternativeDefinitionTextRecord = $alternativeDefinitionTexts->getRecord($i);
17891719
1790 - $translatedContentId = $alternativeDefinitionTextRecord->getAttributeValue($translatedContentIdAttribute);
 1720+ $translatedContentId = $alternativeDefinitionTextRecord->translatedContentId;
17911721 $languageId = $alternativeDefinitionTextRecord->language;
1792 - $isLatest = $alternativeDefinitionTextRecord->getAttributeValue($isLatestAttribute);
 1722+ $isLatest = $alternativeDefinitionTextRecord->isLatest;
17931723
17941724 if ($isLatest) {
17951725 $idStack->pushKey(simpleRecord($alternativeDefinitionTextsKeyStructure, array($translatedContentId, $languageId)));
17961726
17971727 rollBackTranslatedContent(
17981728 $idStack,
1799 - getRollBackAction($idStack, $rollBackTranslatedContentAttribute),
 1729+ getRollBackAction($idStack, $o->rollBackTranslatedContent),
18001730 $translatedContentId,
18011731 $languageId,
1802 - $alternativeDefinitionTextRecord->getAttributeValue($operationAttribute)
 1732+ $alternativeDefinitionTextRecord->operation
18031733 );
18041734
18051735 $idStack->popKey();
@@ -1807,28 +1737,27 @@
18081738 }
18091739
18101740 function rollBackAlternativeDefinitions($idStack, $alternativeDefinitions) {
1811 - global
1812 - $isLatestAttribute, $operationAttribute, $rollBackAttribute,
1813 - $definedMeaningIdAttribute, $translatedContentIdAttribute, $sourceAttribute;
 1741+
 1742+ $o=OmegaWikiAttributes::getInstance();
18141743
18151744 $alternativeDefinitionsKeyStructure = $alternativeDefinitions->getKey();
18161745
18171746 for ($i = 0; $i < $alternativeDefinitions->getRecordCount(); $i++) {
18181747 $alternativeDefinitionRecord = $alternativeDefinitions->getRecord($i);
18191748
1820 - $definedMeaningId = $alternativeDefinitionRecord->getAttributeValue($definedMeaningIdAttribute);
1821 - $translatedContentId = $alternativeDefinitionRecord->getAttributeValue($translatedContentIdAttribute);
1822 - $isLatest = $alternativeDefinitionRecord->getAttributeValue($isLatestAttribute);
 1749+ $definedMeaningId = $alternativeDefinitionRecord->definedMeaningId;
 1750+ $translatedContentId = $alternativeDefinitionRecord->translatedContentId;
 1751+ $isLatest = $alternativeDefinitionRecord->isLatest;
18231752
18241753 if ($isLatest) {
18251754 $idStack->pushKey(simpleRecord($alternativeDefinitionsKeyStructure, array($definedMeaningId, $translatedContentId)));
18261755
18271756 rollBackAlternativeDefinition(
1828 - getRollBackAction($idStack, $rollBackAttribute),
 1757+ getRollBackAction($idStack, $o->rollBack),
18291758 $definedMeaningId,
18301759 $translatedContentId,
1831 - getMeaningId($alternativeDefinitionRecord, $sourceAttribute),
1832 - $alternativeDefinitionRecord->getAttributeValue($operationAttribute)
 1760+ getMeaningId($alternativeDefinitionRecord, $o->source),
 1761+ $alternativeDefinitionRecord->operation
18331762 );
18341763
18351764 $idStack->popKey();
@@ -1844,29 +1773,27 @@
18451774 }
18461775
18471776 function rollBackCollectionMemberships($idStack, $collectionMemberships) {
1848 - global
1849 - $classMembershipIdAttribute, $isLatestAttribute, $collectionIdAttribute,
1850 - $collectionMemberIdAttribute, $sourceIdentifierAttribute,
1851 - $operationAttribute, $rollBackAttribute;
 1777+
 1778+ $o=OmegaWikiAttributes::getInstance();
18521779
18531780 $collectionMembershipsKeyStructure = $collectionMemberships->getKey();
18541781
18551782 for ($i = 0; $i < $collectionMemberships->getRecordCount(); $i++) {
18561783 $collectionMembershipRecord = $collectionMemberships->getRecord($i);
18571784
1858 - $collectionId = $collectionMembershipRecord->getAttributeValue($collectionIdAttribute);
1859 - $collectionMemberId = $collectionMembershipRecord->getAttributeValue($collectionMemberIdAttribute);
1860 - $isLatest = $collectionMembershipRecord->getAttributeValue($isLatestAttribute);
 1785+ $collectionId = $collectionMembershipRecord->collectionId;
 1786+ $collectionMemberId = $collectionMembershipRecord->collectionMemberId;
 1787+ $isLatest = $collectionMembershipRecord->isLatest;
18611788
18621789 if ($isLatest) {
18631790 $idStack->pushKey(simpleRecord($collectionMembershipsKeyStructure, array($collectionId, $collectionMemberId)));
18641791
18651792 rollBackCollectionMembership(
1866 - getRollBackAction($idStack, $rollBackAttribute),
 1793+ getRollBackAction($idStack, $o->rollBack),
18671794 $collectionId,
18681795 $collectionMemberId,
1869 - $collectionMembershipRecord->getAttributeValue($sourceIdentifierAttribute),
1870 - $collectionMembershipRecord->getAttributeValue($operationAttribute)
 1796+ $collectionMembershipRecord->sourceIdentifier,
 1797+ $collectionMembershipRecord->operation
18711798 );
18721799
18731800 $idStack->popKey();
Index: trunk/extensions/Wikidata/OmegaWiki/Search.php
@@ -43,8 +43,10 @@
4444 }
4545
4646 function getSearchResultAsRecordSet($queryResult) {
 47+
 48+ $o=OmegaWikiAttributes::getInstance();
4749 global
48 - $definedMeaningIdAttribute, $definedMeaningReferenceType;
 50+ $definedMeaningReferenceType;
4951
5052 $dbr =& wfGetDB(DB_SLAVE);
5153 $spellingAttribute = new Attribute("found-word", "Found word", "short-text");
@@ -59,7 +61,7 @@
6062 $meaningStructure = new Structure($definedMeaningAttribute, $definitionAttribute);
6163 $meaningAttribute = new Attribute("meaning", "Meaning", $meaningStructure);
6264
63 - $recordSet = new ArrayRecordSet(new Structure($definedMeaningIdAttribute, $expressionAttribute, $meaningAttribute), new Structure($definedMeaningIdAttribute));
 65+ $recordSet = new ArrayRecordSet(new Structure($o->definedMeaningId, $expressionAttribute, $meaningAttribute), new Structure($o->definedMeaningId));
6466
6567 while ($row = $dbr->fetchObject($queryResult)) {
6668 $expressionRecord = new ArrayRecord($expressionStructure);
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php
@@ -42,10 +42,10 @@
4343 foreach ($viewInformation->getPropertyToColumnFilters() as $propertyToColumnFilter)
4444 $this->recordSetTableEditor->addEditor(new DummyViewer($propertyToColumnFilter->getAttribute()));
4545
46 - global
47 - $objectAttributesAttribute;
 46+
 47+ $o=OmegaWikiAttributes::getInstance();
4848
49 - $this->recordSetTableEditor->addEditor(new DummyViewer($objectAttributesAttribute));
 49+ $this->recordSetTableEditor->addEditor(new DummyViewer($o->objectAttributes));
5050 addTableMetadataEditors($this->recordSetTableEditor, $viewInformation);
5151 }
5252
@@ -179,12 +179,14 @@
180180 }
181181
182182 function initializeObjectAttributeEditors(ViewInformation $viewInformation) {
 183+
 184+ $o=OmegaWikiAttributes::getInstance();
183185 global
184 - $objectAttributesAttribute, $definedMeaningIdAttribute,
185 - $textValueObjectAttributesEditors, $textAttributeIdAttribute,
186 - $linkValueObjectAttributesEditors, $linkAttributeIdAttribute,
187 - $translatedTextValueObjectAttributesEditors, $translatedTextAttributeIdAttribute,
188 - $optionValueObjectAttributesEditors, $optionAttributeIdAttribute, $annotationMeaningName,
 186+
 187+ $textValueObjectAttributesEditors,
 188+ $linkValueObjectAttributesEditors,
 189+ $translatedTextValueObjectAttributesEditors,
 190+ $optionValueObjectAttributesEditors, $annotationMeaningName,
189191 $wgPropertyAttributeName;
190192
191193 $linkValueObjectAttributesEditors = array();
@@ -202,54 +204,56 @@
203205 $optionValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($attribute, $propertyCaption, $viewInformation);
204206 }
205207
206 - $textValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($objectAttributesAttribute, $wgPropertyAttributeName, $viewInformation);
207 - $linkValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($objectAttributesAttribute, $wgPropertyAttributeName, $viewInformation);
208 - $translatedTextValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($objectAttributesAttribute, $wgPropertyAttributeName, $viewInformation);
209 - $optionValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($objectAttributesAttribute, $wgPropertyAttributeName, $viewInformation);
 208+ $textValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($o->objectAttributes, $wgPropertyAttributeName, $viewInformation);
 209+ $linkValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($o->objectAttributes, $wgPropertyAttributeName, $viewInformation);
 210+ $translatedTextValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($o->objectAttributes, $wgPropertyAttributeName, $viewInformation);
 211+ $optionValueObjectAttributesEditors[] = new ObjectAttributeValuesEditor($o->objectAttributes, $wgPropertyAttributeName, $viewInformation);
210212
211213 foreach ($textValueObjectAttributesEditors as $textValueObjectAttributesEditor)
212 - addObjectAttributesEditors($textValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $textAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 214+ addObjectAttributesEditors($textValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $o->textAttributeId), $annotationMeaningName, new ObjectIdFetcher(1, $o->definedMeaningId));
213215
214216 foreach ($linkValueObjectAttributesEditors as $linkValueObjectAttributesEditor)
215 - addObjectAttributesEditors($linkValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $linkAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 217+ addObjectAttributesEditors($linkValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $o->linkAttributeId), $annotationMeaningName, new ObjectIdFetcher(1, $o->definedMeaningId));
216218
217219 foreach ($translatedTextValueObjectAttributesEditors as $translatedTextValueObjectAttributesEditor)
218 - addObjectAttributesEditors($translatedTextValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $translatedTextAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 220+ addObjectAttributesEditors($translatedTextValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $o->translatedTextAttributeId), $annotationMeaningName, new ObjectIdFetcher(1, $o->definedMeaningId));
219221
220222 foreach ($optionValueObjectAttributesEditors as $optionValueObjectAttributesEditor)
221 - addObjectAttributesEditors($optionValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $optionAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 223+ addObjectAttributesEditors($optionValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $o->optionAttributeId), $annotationMeaningName, new ObjectIdFetcher(1, $o->definedMeaningId));
222224 }
223225
224226 function getTransactionEditor(Attribute $attribute) {
225 - global
226 - $userAttribute, $timestampAttribute;
227227
 228+ $o=OmegaWikiAttributes::getInstance();
 229+
228230 $transactionEditor = new RecordTableCellEditor($attribute);
229 - $transactionEditor->addEditor(createUserViewer($userAttribute));
230 - $transactionEditor->addEditor(new TimestampEditor($timestampAttribute, new SimplePermissionController(false), true));
 231+ $transactionEditor->addEditor(createUserViewer($o->user));
 232+ $transactionEditor->addEditor(new TimestampEditor($o->timestamp, new SimplePermissionController(false), true));
231233
232234 return $transactionEditor;
233235 }
234236
235237 function createTableLifeSpanEditor(Attribute $attribute) {
236 - global
237 - $addTransactionAttribute, $removeTransactionAttribute;
 238+
 239+ $o=OmegaWikiAttributes::getInstance();
238240
239241 $result = new RecordTableCellEditor($attribute);
240 - $result->addEditor(getTransactionEditor($addTransactionAttribute));
241 - $result->addEditor(getTransactionEditor($removeTransactionAttribute));
 242+ $result->addEditor(getTransactionEditor($o->addTransaction));
 243+ $result->addEditor(getTransactionEditor($o->removeTransaction));
242244
243245 return $result;
244246 }
245247
246248 function getTableLifeSpanEditor($showRecordLifeSpan) {
 249+
 250+ $o=OmegaWikiAttributes::getInstance();
247251 global
248 - $recordLifeSpanAttribute, $addTransactionAttribute, $removeTransactionAttribute, $wgRequest;
 252+ $wgRequest;
249253
250254 $result = array();
251255
252256 if ($wgRequest->getText('action') == 'history' && $showRecordLifeSpan)
253 - $result[] = createTableLifeSpanEditor($recordLifeSpanAttribute);
 257+ $result[] = createTableLifeSpanEditor($o->recordLifeSpan);
254258
255259 return $result;
256260 }
@@ -266,14 +270,16 @@
267271 }
268272
269273 function getDefinitionEditor(ViewInformation $viewInformation) {
 274+
 275+ $o=OmegaWikiAttributes::getInstance();
270276 global
271 - $definitionAttribute, $translatedTextAttribute, $wgPopupAnnotationName,
272 - $objectAttributesAttribute, $definedMeaningIdAttribute, $definitionMeaningName, $objectAttributesAttribute,
 277+ $wgPopupAnnotationName,
 278+ $definitionMeaningName,
273279 $wgPropertyAttributeName;
274280
275 - $editor = new RecordDivListEditor($definitionAttribute);
 281+ $editor = new RecordDivListEditor($o->definition);
276282 $editor->addEditor(getTranslatedTextEditor(
277 - $translatedTextAttribute,
 283+ $o->translatedText,
278284 new DefinedMeaningDefinitionController(),
279285 new DefinedMeaningFilteredDefinitionController($viewInformation->filterLanguageId),
280286 $viewInformation
@@ -283,13 +289,13 @@
284290 $attribute = $propertyToColumnFilter->getAttribute();
285291 $propertyCaption = $propertyToColumnFilter->getPropertyCaption();
286292 $editor->addEditor(new PopUpEditor(
287 - createDefinitionObjectAttributesEditor($viewInformation, $attribute, $propertyCaption, $definedMeaningIdAttribute, 0, $definitionMeaningName),
 293+ createDefinitionObjectAttributesEditor($viewInformation, $attribute, $propertyCaption, $o->definedMeaningId, 0, $definitionMeaningName),
288294 $attribute->name
289295 ));
290296 }
291297
292298 $editor->addEditor(new PopUpEditor(
293 - createDefinitionObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $wgPropertyAttributeName, $definedMeaningIdAttribute, 0, $definitionMeaningName),
 299+ createDefinitionObjectAttributesEditor($viewInformation, $o->objectAttributes, $wgPropertyAttributeName, $o->definedMeaningId, 0, $definitionMeaningName),
294300 $wgPopupAnnotationName
295301 ));
296302
@@ -340,8 +346,8 @@
341347 }
342348
343349 function createObjectAttributesEditor(ViewInformation $viewInformation, Attribute $attribute, $propertyCaption, Attribute $idAttribute, $levelsFromDefinedMeaning, $levelName) {
344 - global
345 - $objectAttributesAttribute, $definedMeaningIdAttribute;
 350+
 351+ $o=OmegaWikiAttributes::getInstance();
346352
347353 $result = new ObjectAttributeValuesEditor($attribute, $propertyCaption, $viewInformation);
348354
@@ -350,15 +356,15 @@
351357 $viewInformation,
352358 new ObjectIdFetcher(0, $idAttribute),
353359 $levelName,
354 - new ObjectIdFetcher($levelsFromDefinedMeaning, $definedMeaningIdAttribute)
 360+ new ObjectIdFetcher($levelsFromDefinedMeaning, $o->definedMeaningId)
355361 );
356362
357363 return $result;
358364 }
359365
360366 function createDefinitionObjectAttributesEditor(ViewInformation $viewInformation, Attribute $attribute, $propertyCaption, Attribute $idAttribute, $levelsFromDefinedMeaning, $levelName) {
361 - global
362 - $objectAttributesAttribute, $definedMeaningIdAttribute;
 367+
 368+ $o=OmegaWikiAttributes::getInstance();
363369
364370 $result = new ObjectAttributeValuesEditor($attribute, $propertyCaption, $viewInformation);
365371
@@ -367,18 +373,18 @@
368374 $viewInformation,
369375 new DefinitionObjectIdFetcher(0, $idAttribute),
370376 $levelName,
371 - new ObjectIdFetcher($levelsFromDefinedMeaning, $definedMeaningIdAttribute)
 377+ new ObjectIdFetcher($levelsFromDefinedMeaning, $o->definedMeaningId)
372378 );
373379
374380 return $result;
375381 }
376382
377383 function getAlternativeDefinitionsEditor(ViewInformation $viewInformation) {
378 - global
379 - $alternativeDefinitionsAttribute, $alternativeDefinitionAttribute, $sourceAttribute;
380384
 385+ $o=OmegaWikiAttributes::getInstance();
 386+
381387 $editor = new RecordSetTableEditor(
382 - $alternativeDefinitionsAttribute,
 388+ $o->alternativeDefinitions,
383389 new SimplePermissionController(true),
384390 new ShowEditFieldChecker(true),
385391 new AllowAddController(true),
@@ -388,12 +394,12 @@
389395 );
390396
391397 $editor->addEditor(getTranslatedTextEditor(
392 - $alternativeDefinitionAttribute,
 398+ $o->alternativeDefinition,
393399 new DefinedMeaningAlternativeDefinitionController(),
394400 new DefinedMeaningFilteredAlternativeDefinitionController($viewInformation),
395401 $viewInformation)
396402 );
397 - $editor->addEditor(new DefinedMeaningReferenceEditor($sourceAttribute, new SimplePermissionController(false), true));
 403+ $editor->addEditor(new DefinedMeaningReferenceEditor($o->source, new SimplePermissionController(false), true));
398404
399405 addTableMetadataEditors($editor, $viewInformation);
400406
@@ -416,13 +422,13 @@
417423 }
418424
419425 function getClassAttributesEditor(ViewInformation $viewInformation) {
420 - global
421 - $definedMeaningIdAttribute, $classAttributesAttribute, $classAttributeLevelAttribute, $classAttributeAttributeAttribute, $classAttributeTypeAttribute;
422426
423 - $tableEditor = new RecordSetTableEditor($classAttributesAttribute, new SimplePermissionController(true), new ShowEditFieldForClassesChecker(0, $definedMeaningIdAttribute), new AllowAddController(true), true, false, new ClassAttributesController());
424 - $tableEditor->addEditor(new ClassAttributesLevelDefinedMeaningEditor($classAttributeLevelAttribute, new SimplePermissionController(false), true));
425 - $tableEditor->addEditor(new DefinedMeaningReferenceEditor($classAttributeAttributeAttribute, new SimplePermissionController(false), true));
426 - $tableEditor->addEditor(new ClassAttributesTypeEditor($classAttributeTypeAttribute, new SimplePermissionController(false), true));
 427+ $o=OmegaWikiAttributes::getInstance();
 428+
 429+ $tableEditor = new RecordSetTableEditor($o->classAttributes, new SimplePermissionController(true), new ShowEditFieldForClassesChecker(0, $o->definedMeaningId), new AllowAddController(true), true, false, new ClassAttributesController());
 430+ $tableEditor->addEditor(new ClassAttributesLevelDefinedMeaningEditor($o->classAttributeLevel, new SimplePermissionController(false), true));
 431+ $tableEditor->addEditor(new DefinedMeaningReferenceEditor($o->classAttributeAttribute, new SimplePermissionController(false), true));
 432+ $tableEditor->addEditor(new ClassAttributesTypeEditor($o->classAttributeType, new SimplePermissionController(false), true));
427433 $tableEditor->addEditor(new PopupEditor(getOptionAttributeOptionsEditor(), 'Options'));
428434
429435 addTableMetadataEditors($tableEditor, $viewInformation);
@@ -431,14 +437,16 @@
432438 }
433439
434440 function getSynonymsAndTranslationsEditor(ViewInformation $viewInformation) {
 441+
 442+ $o=OmegaWikiAttributes::getInstance();
435443 global
436 - $synonymsAndTranslationsAttribute, $identicalMeaningAttribute, $expressionIdAttribute,
437 - $expressionAttribute, $wgPopupAnnotationName,
438 - $syntransIdAttribute, $synTransMeaningName, $objectAttributesAttribute,
 444+
 445+ $wgPopupAnnotationName,
 446+ $synTransMeaningName,
439447 $wgPropertyAttributeName;
440448
441449 $tableEditor = new RecordSetTableEditor(
442 - $synonymsAndTranslationsAttribute,
 450+ $o->synonymsAndTranslations,
443451 new SimplePermissionController(true),
444452 new ShowEditFieldChecker(true),
445453 new AllowAddController(true),
@@ -447,13 +455,13 @@
448456 new SynonymTranslationController($viewInformation->filterLanguageId)
449457 );
450458
451 - $tableEditor->addEditor(getExpressionTableCellEditor($expressionAttribute, $viewInformation));
452 - $tableEditor->addEditor(new BooleanEditor($identicalMeaningAttribute, new SimplePermissionController(true), true, true));
 459+ $tableEditor->addEditor(getExpressionTableCellEditor($o->expression, $viewInformation));
 460+ $tableEditor->addEditor(new BooleanEditor($o->identicalMeaning, new SimplePermissionController(true), true, true));
453461
454 - addPropertyToColumnFilterEditors($tableEditor, $viewInformation, $syntransIdAttribute, 1, $synTransMeaningName);
 462+ addPropertyToColumnFilterEditors($tableEditor, $viewInformation, $o->syntransId, 1, $synTransMeaningName);
455463
456464 $tableEditor->addEditor(new PopUpEditor(
457 - createObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $wgPropertyAttributeName, $syntransIdAttribute, 1, $synTransMeaningName),
 465+ createObjectAttributesEditor($viewInformation, $o->objectAttributes, $wgPropertyAttributeName, $o->syntransId, 1, $synTransMeaningName),
458466 $wgPopupAnnotationName
459467 ));
460468
@@ -463,19 +471,21 @@
464472 }
465473
466474 function getDefinedMeaningRelationsEditor(ViewInformation $viewInformation) {
 475+
 476+ $o=OmegaWikiAttributes::getInstance();
467477 global
468 - $relationsAttribute, $relationTypeAttribute, $otherDefinedMeaningAttribute, $objectAttributesAttribute,
469 - $relationsObjectAttributesEditor, $relationIdAttribute, $relationMeaningName, $wgPopupAnnotationName,
 478+
 479+ $relationsObjectAttributesEditor, $relationMeaningName, $wgPopupAnnotationName,
470480 $wgPropertyAttributeName;
471481
472 - $editor = new RecordSetTableEditor($relationsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningRelationController());
473 - $editor->addEditor(new RelationTypeReferenceEditor($relationTypeAttribute, new SimplePermissionController(false), true));
474 - $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true));
 482+ $editor = new RecordSetTableEditor($o->relations, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningRelationController());
 483+ $editor->addEditor(new RelationTypeReferenceEditor($o->relationType, new SimplePermissionController(false), true));
 484+ $editor->addEditor(new DefinedMeaningReferenceEditor($o->otherDefinedMeaning, new SimplePermissionController(false), true));
475485
476 - addPropertyToColumnFilterEditors($editor, $viewInformation, $relationIdAttribute, 1, $relationMeaningName);
 486+ addPropertyToColumnFilterEditors($editor, $viewInformation, $o->relationId, 1, $relationMeaningName);
477487
478488 $editor->addEditor(new PopUpEditor(
479 - createObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $wgPropertyAttributeName, $relationIdAttribute, 1, $relationMeaningName),
 489+ createObjectAttributesEditor($viewInformation, $o->objectAttributes, $wgPropertyAttributeName, $o->relationId, 1, $relationMeaningName),
480490 $wgPopupAnnotationName
481491 ));
482492
@@ -485,19 +495,21 @@
486496 }
487497
488498 function getDefinedMeaningReciprocalRelationsEditor(ViewInformation $viewInformation) {
 499+
 500+ $o=OmegaWikiAttributes::getInstance();
489501 global
490 - $reciprocalRelationsAttribute, $relationTypeAttribute, $otherDefinedMeaningAttribute, $objectAttributesAttribute,
491 - $relationsObjectAttributesEditor, $relationIdAttribute, $relationMeaningName, $wgPopupAnnotationName,
 502+
 503+ $relationsObjectAttributesEditor, $relationMeaningName, $wgPopupAnnotationName,
492504 $wgPropertyAttributeName;
493505
494 - $editor = new RecordSetTableEditor($reciprocalRelationsAttribute, new SimplePermissionController(false), new ShowEditFieldChecker(true), new AllowAddController(false), false, false, null);
495 - $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true));
496 - $editor->addEditor(new RelationTypeReferenceEditor($relationTypeAttribute, new SimplePermissionController(false), true));
 506+ $editor = new RecordSetTableEditor($o->reciprocalRelations, new SimplePermissionController(false), new ShowEditFieldChecker(true), new AllowAddController(false), false, false, null);
 507+ $editor->addEditor(new DefinedMeaningReferenceEditor($o->otherDefinedMeaning, new SimplePermissionController(false), true));
 508+ $editor->addEditor(new RelationTypeReferenceEditor($o->relationType, new SimplePermissionController(false), true));
497509
498 - addPropertyToColumnFilterEditors($editor, $viewInformation, $relationIdAttribute, 1, $relationMeaningName);
 510+ addPropertyToColumnFilterEditors($editor, $viewInformation, $o->relationId, 1, $relationMeaningName);
499511
500512 $editor->addEditor(new PopUpEditor(
501 - createObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $wgPropertyAttributeName, $relationIdAttribute, 1, $relationMeaningName),
 513+ createObjectAttributesEditor($viewInformation, $o->objectAttributes, $wgPropertyAttributeName, $o->relationId, 1, $relationMeaningName),
502514 $wgPopupAnnotationName
503515 ));
504516
@@ -507,12 +519,12 @@
508520 }
509521
510522 function getDefinedMeaningClassMembershipEditor(ViewInformation $viewInformation) {
511 - global
512 - $classMembershipAttribute, $classAttribute;
513523
514 - $editor = new RecordSetTableEditor($classMembershipAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningClassMembershipController());
515 - $editor->addEditor(new ClassReferenceEditor($classAttribute, new SimplePermissionController(false), true));
 524+ $o=OmegaWikiAttributes::getInstance();
516525
 526+ $editor = new RecordSetTableEditor($o->classMembership, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningClassMembershipController());
 527+ $editor->addEditor(new ClassReferenceEditor($o->class, new SimplePermissionController(false), true));
 528+
517529 addTableMetadataEditors($editor, $viewInformation);
518530
519531 return $editor;
@@ -543,16 +555,18 @@
544556 }
545557
546558 function getDefinedMeaningCollectionMembershipEditor(ViewInformation $viewInformation) {
 559+
 560+ $o=OmegaWikiAttributes::getInstance();
547561 global
548 - $collectionMembershipAttribute, $collectionMeaningAttribute, $sourceIdentifierAttribute,
549 - $gotoSourceAttribute, $wgGotoSourceTemplates;
550562
551 - $editor = new RecordSetTableEditor($collectionMembershipAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningCollectionController());
552 - $editor->addEditor(new CollectionReferenceEditor($collectionMeaningAttribute, new SimplePermissionController(false), true));
553 - $editor->addEditor(new ShortTextEditor($sourceIdentifierAttribute, new SimplePermissionController(true), true));
 563+ $wgGotoSourceTemplates;
 564+
 565+ $editor = new RecordSetTableEditor($o->collectionMembership, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningCollectionController());
 566+ $editor->addEditor(new CollectionReferenceEditor($o->collectionMeaning, new SimplePermissionController(false), true));
 567+ $editor->addEditor(new ShortTextEditor($o->sourceIdentifier, new SimplePermissionController(true), true));
554568
555569 if (count($wgGotoSourceTemplates) > 0)
556 - $editor->addEditor(new GotoSourceEditor($gotoSourceAttribute, new SimplePermissionController(true), true));
 570+ $editor->addEditor(new GotoSourceEditor($o->gotoSource, new SimplePermissionController(true), true));
557571
558572 addTableMetadataEditors($editor, $viewInformation);
559573
@@ -565,12 +579,14 @@
566580 }
567581
568582 function getTextAttributeValuesEditor(ViewInformation $viewInformation, $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
 583+
 584+ $o=OmegaWikiAttributes::getInstance();
569585 global
570 - $textAttributeAttribute, $textAttribute, $textAttributeValuesAttribute, $textValueObjectAttributesEditors;
 586+ $textValueObjectAttributesEditors;
571587
572 - $editor = new RecordSetTableEditor($textAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
573 - $editor->addEditor(new TextAttributeEditor($textAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
574 - $editor->addEditor(new TextEditor($textAttribute, new SimplePermissionController(true), true));
 588+ $editor = new RecordSetTableEditor($o->textAttributeValues, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
 589+ $editor->addEditor(new TextAttributeEditor($o->textAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
 590+ $editor->addEditor(new TextEditor($o->text, new SimplePermissionController(true), true));
575591
576592 addPopupEditors($editor, $textValueObjectAttributesEditors);
577593 addTableMetadataEditors($editor, $viewInformation);
@@ -579,19 +595,20 @@
580596 }
581597
582598 function getLinkAttributeValuesEditor(ViewInformation $viewInformation, UpdateController $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
 599+
 600+ $o=OmegaWikiAttributes::getInstance();
583601 global
584 - $linkAttributeAttribute, $linkAttribute, $linkAttributeValuesAttribute, $linkValueObjectAttributesEditors,
585 - $linkLabelAttribute, $linkURLAttribute;
 602+ $linkValueObjectAttributesEditors;
586603
587 - $editor = new RecordSetTableEditor($linkAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
588 - $editor->addEditor(new LinkAttributeEditor($linkAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
 604+ $editor = new RecordSetTableEditor($o->linkAttributeValues, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
 605+ $editor->addEditor(new LinkAttributeEditor($o->linkAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
589606
590607 if ($viewInformation->viewOrEdit == "view")
591 - $linkEditor = new LinkEditor($linkAttribute, new SimplePermissionController(true), true);
 608+ $linkEditor = new LinkEditor($o->link, new SimplePermissionController(true), true);
592609 else {
593 - $linkEditor = new RecordTableCellEditor($linkAttribute);
594 - $linkEditor->addEditor(new ShortTextEditor($linkURLAttribute, new SimplePermissionController(true), true, "urlFieldChanged(this);"));
595 - $linkEditor->addEditor(new ShortTextEditor($linkLabelAttribute, new SimplePermissionController(true), true));
 610+ $linkEditor = new RecordTableCellEditor($o->link);
 611+ $linkEditor->addEditor(new ShortTextEditor($o->linkURL, new SimplePermissionController(true), true, "urlFieldChanged(this);"));
 612+ $linkEditor->addEditor(new ShortTextEditor($o->linkLabel, new SimplePermissionController(true), true));
596613 }
597614
598615 $editor->addEditor($linkEditor);
@@ -603,14 +620,16 @@
604621 }
605622
606623 function getTranslatedTextAttributeValuesEditor(ViewInformation $viewInformation, UpdateController $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
 624+
 625+ $o=OmegaWikiAttributes::getInstance();
607626 global
608 - $translatedTextAttributeAttribute, $translatedTextValueAttribute, $translatedTextAttributeValuesAttribute,
 627+
609628 $translatedTextValueObjectAttributesEditors;
610629
611 - $editor = new RecordSetTableEditor($translatedTextAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
612 - $editor->addEditor(new TranslatedTextAttributeEditor($translatedTextAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
 630+ $editor = new RecordSetTableEditor($o->translatedTextAttributeValues, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
 631+ $editor->addEditor(new TranslatedTextAttributeEditor($o->translatedTextAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
613632 $editor->addEditor(getTranslatedTextEditor(
614 - $translatedTextValueAttribute,
 633+ $o->translatedTextValue,
615634 new TranslatedTextAttributeValueController(),
616635 new FilteredTranslatedTextAttributeValueController($viewInformation->filterLanguageId),
617636 $viewInformation
@@ -623,14 +642,16 @@
624643 }
625644
626645 function getOptionAttributeValuesEditor(ViewInformation $viewInformation, UpdateController $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
 646+
 647+ $o=OmegaWikiAttributes::getInstance();
627648 global
628 - $optionAttributeAttribute, $optionAttributeOptionAttribute, $optionAttributeValuesAttribute,
 649+
629650 $optionValueObjectAttributesEditors;
630651
631 - $editor = new RecordSetTableEditor($optionAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
 652+ $editor = new RecordSetTableEditor($o->optionAttributeValues, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
632653
633 - $editor->addEditor(new OptionAttributeEditor($optionAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
634 - $editor->addEditor(new OptionSelectEditor($optionAttributeOptionAttribute, new SimplePermissionController(false), true));
 654+ $editor->addEditor(new OptionAttributeEditor($o->optionAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
 655+ $editor->addEditor(new OptionSelectEditor($o->optionAttributeOption, new SimplePermissionController(false), true));
635656
636657 addPopupEditors($editor, $optionValueObjectAttributesEditors);
637658 addTableMetadataEditors($editor, $viewInformation);
@@ -639,24 +660,24 @@
640661 }
641662
642663 function getOptionAttributeOptionsEditor() {
643 - global
644 - $optionAttributeAttribute, $optionAttributeOptionAttribute, $optionAttributeOptionsAttribute;
 664+
645665 $o=OmegaWikiAttributes::getInstance();
 666+ $o=OmegaWikiAttributes::getInstance();
646667
647 - $editor = new RecordSetTableEditor($optionAttributeOptionsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new OptionAttributeOptionsController());
648 - $editor->addEditor(new DefinedMeaningReferenceEditor($optionAttributeOptionAttribute, new SimplePermissionController(false), true));
 668+ $editor = new RecordSetTableEditor($o->optionAttributeOptions, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new OptionAttributeOptionsController());
 669+ $editor->addEditor(new DefinedMeaningReferenceEditor($o->optionAttributeOption, new SimplePermissionController(false), true));
649670 $editor->addEditor(new LanguageEditor($o->language, new SimplePermissionController(false), true));
650671
651672 return $editor;
652673 }
653674
654675 function getExpressionMeaningsEditor(Attribute $attribute, $allowAdd, ViewInformation $viewInformation) {
655 - global
656 - $definedMeaningIdAttribute;
 676+
 677+ $o=OmegaWikiAttributes::getInstance();
657678
658679 $definedMeaningEditor = getDefinedMeaningEditor($viewInformation);
659680
660 - $definedMeaningCaptionEditor = new DefinedMeaningHeaderEditor($definedMeaningIdAttribute, new SimplePermissionController(false), true, 75);
 681+ $definedMeaningCaptionEditor = new DefinedMeaningHeaderEditor($o->definedMeaningId, new SimplePermissionController(false), true, 75);
661682 $definedMeaningCaptionEditor->setAddText("New exact meaning");
662683
663684 $expressionMeaningsEditor = new RecordSetListEditor($attribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController($allowAdd), false, $allowAdd, new ExpressionMeaningController($viewInformation->filterLanguageId), 3, false);
@@ -667,25 +688,25 @@
668689 }
669690
670691 function getExpressionsEditor($spelling, ViewInformation $viewInformation) {
671 - global
672 - $expressionMeaningsAttribute, $expressionExactMeaningsAttribute, $expressionApproximateMeaningsAttribute, $expressionAttribute, $expressionsAttribute;
673692
674693 $o=OmegaWikiAttributes::getInstance();
675694
676 - $expressionMeaningsRecordEditor = new RecordUnorderedListEditor($expressionMeaningsAttribute, 3);
 695+ $o=OmegaWikiAttributes::getInstance();
 696+
 697+ $expressionMeaningsRecordEditor = new RecordUnorderedListEditor($o->expressionMeanings, 3);
677698
678 - $exactMeaningsEditor = getExpressionMeaningsEditor($expressionExactMeaningsAttribute, true, $viewInformation);
 699+ $exactMeaningsEditor = getExpressionMeaningsEditor($o->expressionExactMeanings, true, $viewInformation);
679700 $expressionMeaningsRecordEditor->addEditor($exactMeaningsEditor);
680 - $expressionMeaningsRecordEditor->addEditor(getExpressionMeaningsEditor($expressionApproximateMeaningsAttribute, false, $viewInformation));
 701+ $expressionMeaningsRecordEditor->addEditor(getExpressionMeaningsEditor($o->expressionApproximateMeanings, false, $viewInformation));
681702
682703 $expressionMeaningsRecordEditor->expandEditor($exactMeaningsEditor);
683704
684705 if ($viewInformation->filterLanguageId == 0) {
685 - $expressionEditor = new RecordSpanEditor($expressionAttribute, ': ', ' - ');
 706+ $expressionEditor = new RecordSpanEditor($o->expression, ': ', ' - ');
686707 $expressionEditor->addEditor(new LanguageEditor($o->language, new SimplePermissionController(false), true));
687708
688709 $expressionsEditor = new RecordSetListEditor(
689 - $expressionsAttribute,
 710+ $o->expressions,
690711 new SimplePermissionController(true),
691712 new ShowEditFieldChecker(true),
692713 new AllowAddController(true),
@@ -699,11 +720,11 @@
700721 $expressionsEditor->setValueEditor($expressionMeaningsRecordEditor);
701722 }
702723 else {
703 - $expressionEditor = new RecordSubRecordEditor($expressionAttribute);
 724+ $expressionEditor = new RecordSubRecordEditor($o->expression);
704725 $expressionEditor->setSubRecordEditor($expressionMeaningsRecordEditor);
705726
706727 $expressionsEditor = new RecordSetFirstRecordEditor(
707 - $expressionsAttribute,
 728+ $o->expressions,
708729 new SimplePermissionController(true),
709730 new ShowEditFieldChecker(true),
710731 new AllowAddController(true),
@@ -718,10 +739,12 @@
719740 }
720741
721742 function getDefinedMeaningEditor(ViewInformation $viewInformation) {
 743+
 744+ $o=OmegaWikiAttributes::getInstance();
722745 global
723 - $wdDefinedMeaningAttributesOrder, $definedMeaningIdAttribute, $definedMeaningMeaningName,
724 - $definedMeaningAttribute, $possiblySynonymousIdAttribute, $possiblySynonymousAttribute,
725 - $possibleSynonymAttribute, $relationMeaningName, $objectAttributesAttribute, $definedMeaningAttributesAttribute,
 746+ $wdDefinedMeaningAttributesOrder, $definedMeaningMeaningName,
 747+
 748+ $relationMeaningName,
726749 $wgPropertyAttributeName;
727750
728751 $definitionEditor = getDefinitionEditor($viewInformation);
@@ -734,12 +757,12 @@
735758 $collectionMembershipEditor = getDefinedMeaningCollectionMembershipEditor($viewInformation);
736759
737760 $possiblySynonymousEditor = getGroupedRelationTypeEditor(
738 - $possiblySynonymousAttribute,
739 - $possiblySynonymousIdAttribute,
740 - $possibleSynonymAttribute,
 761+ $o->possiblySynonymous,
 762+ $o->possiblySynonymousId,
 763+ $o->possibleSynonym,
741764 $viewInformation->possiblySynonymousRelationTypeId,
742765 $viewInformation,
743 - createObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $wgPropertyAttributeName, $possiblySynonymousIdAttribute, 1, $relationMeaningName)
 766+ createObjectAttributesEditor($viewInformation, $o->objectAttributes, $wgPropertyAttributeName, $o->possiblySynonymousId, 1, $relationMeaningName)
744767 );
745768
746769 $availableEditors = new AttributeEditorMap();
@@ -752,15 +775,15 @@
753776 $availableEditors->addEditor($classMembershipEditor);
754777 $availableEditors->addEditor($collectionMembershipEditor);
755778
756 - foreach (createPropertyToColumnFilterEditors($viewInformation, $definedMeaningIdAttribute, 0, $definedMeaningMeaningName) as $propertyToColumnEditor)
 779+ foreach (createPropertyToColumnFilterEditors($viewInformation, $o->definedMeaningId, 0, $definedMeaningMeaningName) as $propertyToColumnEditor)
757780 $availableEditors->addEditor($propertyToColumnEditor);
758781
759 - $availableEditors->addEditor(createObjectAttributesEditor($viewInformation, $definedMeaningAttributesAttribute, $wgPropertyAttributeName, $definedMeaningIdAttribute, 0, $definedMeaningMeaningName));
 782+ $availableEditors->addEditor(createObjectAttributesEditor($viewInformation, $o->definedMeaningAttributes, $wgPropertyAttributeName, $o->definedMeaningId, 0, $definedMeaningMeaningName));
760783
761784 if ($viewInformation->possiblySynonymousRelationTypeId != 0)
762785 $availableEditors->addEditor($possiblySynonymousEditor);
763786
764 - $definedMeaningEditor = new RecordUnorderedListEditor($definedMeaningAttribute, 4);
 787+ $definedMeaningEditor = new RecordUnorderedListEditor($o->definedMeaning, 4);
765788
766789 foreach ($wdDefinedMeaningAttributesOrder as $attributeId) {
767790 $editor = $availableEditors->getEditorForAttributeId($attributeId);
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php
@@ -64,10 +64,9 @@
6565 function fetchDefinedMeaningReferenceRecords($sql, array &$definedMeaningIds, array &$definedMeaningReferenceRecords, $usedAs='defined-meaning') {
6666 $dc=wdGetDataSetContext();
6767
68 - global
69 - $definedMeaningReferenceStructure, $definedMeaningIdAttribute, $definedMeaningLabelAttribute,
70 - $definedMeaningDefiningExpressionAttribute;
7168
 69+ $o=OmegaWikiAttributes::getInstance();
 70+
7271 $foundDefinedMeaningIds = array();
7372
7473 $dbr =& wfGetDB(DB_SLAVE);
@@ -76,11 +75,11 @@
7776 while ($row = $dbr->fetchObject($queryResult)) {
7877 $definedMeaningId = $row->defined_meaning_id;
7978
80 - $specificStructure=clone $definedMeaningReferenceStructure;
 79+ $specificStructure=clone $o->definedMeaningReferenceStructure;
8180 $specificStructure->setStructureType($usedAs);
8281 $record = new ArrayRecord($specificStructure);
83 - $record->setAttributeValue($definedMeaningIdAttribute, $definedMeaningId);
84 - $record->setAttributeValue($definedMeaningLabelAttribute, $row->label);
 82+ $record->definedMeaningId = $definedMeaningId;
 83+ $record->definedMeaningLabel = $row->label;
8584
8685 $definedMeaningReferenceRecords[$definedMeaningId] = $record;
8786 $foundDefinedMeaningIds[] = $definedMeaningId;
@@ -90,10 +89,9 @@
9190 }
9291
9392 function fetchDefinedMeaningDefiningExpressions(array &$definedMeaningIds, array &$definedMeaningReferenceRecords) {
94 - global
95 - $definedMeaningReferenceStructure, $definedMeaningIdAttribute, $definedMeaningLabelAttribute,
96 - $definedMeaningDefiningExpressionAttribute;
9793
 94+ $o=OmegaWikiAttributes::getInstance();
 95+
9896 $dc=wdGetDataSetContext();
9997
10098 $dbr =& wfGetDB(DB_SLAVE);
@@ -110,25 +108,24 @@
111109 $definedMeaningReferenceRecord = $definedMeaningReferenceRecords[$row->defined_meaning_id];
112110
113111 if ($definedMeaningReferenceRecord == null) {
114 - $definedMeaningReferenceRecord = new ArrayRecord($definedMeaningReferenceStructure);
115 - $definedMeaningReferenceRecord->setAttributeValue($definedMeaningIdAttribute, $row->defined_meaning_id);
116 - $definedMeaningReferenceRecord->setAttributeValue($definedMeaningLabelAttribute, $row->spelling);
 112+ $definedMeaningReferenceRecord = new ArrayRecord($o->definedMeaningReferenceStructure);
 113+ $definedMeaningReferenceRecord->definedMeaningId = $row->defined_meaning_id;
 114+ $definedMeaningReferenceRecord->definedMeaningLabel = $row->spelling;
117115 $definedMeaningReferenceRecords[$row->defined_meaning_id] = $definedMeaningReferenceRecord;
118116 }
119117
120 - $definedMeaningReferenceRecord->setAttributeValue($definedMeaningDefiningExpressionAttribute, $row->spelling);
 118+ $definedMeaningReferenceRecord->definedMeaningDefiningExpression = $row->spelling;
121119 }
122120 }
123121
124122 function getNullDefinedMeaningReferenceRecord() {
125 - global
126 - $definedMeaningReferenceStructure, $definedMeaningIdAttribute, $definedMeaningLabelAttribute,
127 - $definedMeaningDefiningExpressionAttribute;
 123+
 124+ $o=OmegaWikiAttributes::getInstance();
128125
129 - $record = new ArrayRecord($definedMeaningReferenceStructure);
130 - $record->setAttributeValue($definedMeaningIdAttribute, 0);
131 - $record->setAttributeValue($definedMeaningLabelAttribute, "");
132 - $record->setAttributeValue($definedMeaningDefiningExpressionAttribute, "");
 126+ $record = new ArrayRecord($o->definedMeaningReferenceStructure);
 127+ $record->definedMeaningId = 0;
 128+ $record->definedMeaningLabel = "";
 129+ $record->definedMeaningDefiningExpression = "";
133130
134131 return $record;
135132 }
@@ -228,8 +225,8 @@
229226 }
230227
231228 function getExpressionReferenceRecords($expressionIds) {
232 - global
233 - $expressionStructure;
 229+
 230+ $o=OmegaWikiAttributes::getInstance();
234231
235232 $dc=wdGetDataSetContext();
236233
@@ -245,7 +242,7 @@
246243 $result = array();
247244
248245 while ($row = $dbr->fetchObject($queryResult)) {
249 - $record = new ArrayRecord($expressionStructure);
 246+ $record = new ArrayRecord($o->expressionStructure);
250247 $record->language = $row->language_id;
251248 $record->spelling = $row->spelling;
252249
@@ -273,8 +270,8 @@
274271 }
275272
276273 function getExpressionSpellings(array $expressionIds) {
277 - global
278 - $expressionAttribute;
 274+
 275+ $o=OmegaWikiAttributes::getInstance();
279276
280277 $dc=wdGetDataSetContext();
281278
@@ -353,13 +350,13 @@
354351 }
355352
356353 function getExpressionMeaningsRecordSet($expressionId, $exactMeaning, ViewInformation $viewInformation) {
357 - global
358 - $expressionMeaningStructure, $definedMeaningIdAttribute;
359354
 355+ $o=OmegaWikiAttributes::getInstance();
 356+
360357 $dc=wdGetDataSetContext();
361358 $identicalMeaning = $exactMeaning ? 1 : 0;
362359
363 - $recordSet = new ArrayRecordSet($expressionMeaningStructure, new Structure($definedMeaningIdAttribute));
 360+ $recordSet = new ArrayRecordSet($o->expressionMeaningStructure, new Structure($o->definedMeaningId));
364361
365362 $dbr =& wfGetDB(DB_SLAVE);
366363 $queryResult = $dbr->query(
@@ -384,12 +381,12 @@
385382 }
386383
387384 function getExpressionMeaningsRecord($expressionId, ViewInformation $viewInformation) {
388 - global
389 - $expressionMeaningsStructure, $expressionExactMeaningsAttribute, $expressionApproximateMeaningsAttribute;
 385+
 386+ $o=OmegaWikiAttributes::getInstance();
390387
391 - $record = new ArrayRecord($expressionMeaningsStructure);
392 - $record->setAttributeValue($expressionExactMeaningsAttribute, getExpressionMeaningsRecordSet($expressionId, true, $viewInformation));
393 - $record->setAttributeValue($expressionApproximateMeaningsAttribute, getExpressionMeaningsRecordSet($expressionId, false, $viewInformation));
 388+ $record = new ArrayRecord($o->expressionMeaningsStructure);
 389+ $record->expressionExactMeanings = getExpressionMeaningsRecordSet($expressionId, true, $viewInformation);
 390+ $record->expressionApproximateMeanings = getExpressionMeaningsRecordSet($expressionId, false, $viewInformation);
394391
395392 return $record;
396393 }
@@ -459,76 +456,78 @@
460457
461458
462459 function getClassAttributesRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 460+
 461+ $o=OmegaWikiAttributes::getInstance();
463462 global
464 - $classAttributesTable, $classAttributeIdAttribute, $classAttributeLevelAttribute, $classAttributeAttributeAttribute, $classAttributeTypeAttribute, $optionAttributeOptionsAttribute,
465 - $classAttributesStructure;
 463+ $classAttributesTable;
466464
467465 $recordSet = queryRecordSet(
468 - $classAttributesStructure->getStructureType(),
 466+ $o->classAttributesStructure->getStructureType(),
469467 $viewInformation->queryTransactionInformation,
470 - $classAttributeIdAttribute,
 468+ $o->classAttributeId,
471469 new TableColumnsToAttributesMapping(
472 - new TableColumnsToAttribute(array('object_id'), $classAttributeIdAttribute),
473 - new TableColumnsToAttribute(array('level_mid'), $classAttributeLevelAttribute),
474 - new TableColumnsToAttribute(array('attribute_mid'), $classAttributeAttributeAttribute),
475 - new TableColumnsToAttribute(array('attribute_type'),$classAttributeTypeAttribute)
 470+ new TableColumnsToAttribute(array('object_id'), $o->classAttributeId),
 471+ new TableColumnsToAttribute(array('level_mid'), $o->classAttributeLevel),
 472+ new TableColumnsToAttribute(array('attribute_mid'), $o->classAttributeAttribute),
 473+ new TableColumnsToAttribute(array('attribute_type'),$o->classAttributeType)
476474 ),
477475 $classAttributesTable,
478476 array("class_mid=$definedMeaningId")
479477 );
480478
481 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($classAttributeLevelAttribute ,$classAttributeAttributeAttribute));
482 - expandOptionAttributeOptionsInRecordSet($recordSet, $classAttributeIdAttribute, $viewInformation);
 479+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->classAttributeLevel ,$o->classAttributeAttribute));
 480+ expandOptionAttributeOptionsInRecordSet($recordSet, $o->classAttributeId, $viewInformation);
483481
484482 return $recordSet;
485483 }
486484
487485 function expandOptionAttributeOptionsInRecordSet(RecordSet $recordSet, Attribute $attributeIdAttribute, ViewInformation $viewInformation) {
488 - global
489 - $definedMeaningIdAttribute, $optionAttributeOptionsAttribute;
490486
 487+ $o=OmegaWikiAttributes::getInstance();
 488+
491489 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
492490 $record = $recordSet->getRecord($i);
493491
494 - $record->setAttributeValue($optionAttributeOptionsAttribute, getOptionAttributeOptionsRecordSet($record->getAttributeValue($attributeIdAttribute), $viewInformation));
 492+ $record->optionAttributeOptions = getOptionAttributeOptionsRecordSet($record->getAttributeValue($attributeIdAttribute), $viewInformation);
495493 }
496494 }
497495
498496 function getAlternativeDefinitionsRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 497+
 498+ $o=OmegaWikiAttributes::getInstance();
499499 global
500 - $alternativeDefinitionsTable, $definitionIdAttribute, $alternativeDefinitionAttribute, $sourceAttribute,
501 - $alternativeDefinitionsStructure;
 500+ $alternativeDefinitionsTable;
502501
503502 $recordSet = queryRecordSet(
504 - $alternativeDefinitionsStructure->getStructureType(),
 503+ $o->alternativeDefinitionsStructure->getStructureType(),
505504 $viewInformation->queryTransactionInformation,
506 - $definitionIdAttribute,
 505+ $o->definitionId,
507506 new TableColumnsToAttributesMapping(
508 - new TableColumnsToAttribute(array('meaning_text_tcid'), $definitionIdAttribute),
509 - new TableColumnsToAttribute(array('source_id'), $sourceAttribute)
 507+ new TableColumnsToAttribute(array('meaning_text_tcid'), $o->definitionId),
 508+ new TableColumnsToAttribute(array('source_id'), $o->source)
510509 ),
511510 $alternativeDefinitionsTable,
512511 array("meaning_mid=$definedMeaningId")
513512 );
514513
515 - $recordSet->getStructure()->addAttribute($alternativeDefinitionAttribute);
 514+ $recordSet->getStructure()->addAttribute($o->alternativeDefinition);
516515
517 - expandTranslatedContentsInRecordSet($recordSet, $definitionIdAttribute, $alternativeDefinitionAttribute, $viewInformation);
518 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($sourceAttribute));
 516+ expandTranslatedContentsInRecordSet($recordSet, $o->definitionId, $o->alternativeDefinition, $viewInformation);
 517+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->source));
519518
520519 return $recordSet;
521520 }
522521
523522 function getDefinedMeaningDefinitionRecord($definedMeaningId, ViewInformation $viewInformation) {
524 - global
525 - $definitionAttribute, $translatedTextAttribute, $objectAttributesAttribute;
 523+
 524+ $o=OmegaWikiAttributes::getInstance();
526525
527526 $definitionId = getDefinedMeaningDefinitionId($definedMeaningId);
528 - $record = new ArrayRecord(new Structure($definitionAttribute));
529 - $record->setAttributeValue($translatedTextAttribute, getTranslatedContentValue($definitionId, $viewInformation));
 527+ $record = new ArrayRecord(new Structure($o->definition));
 528+ $record->translatedText = getTranslatedContentValue($definitionId, $viewInformation);
530529
531 - $objectAttributesRecord = getObjectAttributesRecord($definitionId, $viewInformation, $objectAttributesAttribute->id);
532 - $record->setAttributeValue($objectAttributesAttribute, $objectAttributesRecord);
 530+ $objectAttributesRecord = getObjectAttributesRecord($definitionId, $viewInformation, $o->objectAttributes->id);
 531+ $record->objectAttributes = $objectAttributesRecord;
533532
534533 applyPropertyToColumnFiltersToRecord($record, $objectAttributesRecord, $viewInformation);
535534
@@ -554,29 +553,26 @@
555554 }
556555
557556 function getObjectAttributesRecord($objectId, ViewInformation $viewInformation, $structuralOverride = null) {
558 - global
559 - $objectIdAttribute,
560 - $linkAttributeValuesAttribute, $textAttributeValuesAttribute,
561 - $translatedTextAttributeValuesAttribute, $optionAttributeValuesAttribute,
562 - $definedMeaningAttributesAttribute;
563557
 558+ $o=OmegaWikiAttributes::getInstance();
 559+
564560 if ($structuralOverride)
565 - $record = new ArrayRecord(new Structure($structuralOverride, $definedMeaningAttributesAttribute));
 561+ $record = new ArrayRecord(new Structure($structuralOverride, $o->definedMeaningAttributes));
566562 else
567 - $record = new ArrayRecord(new Structure($definedMeaningAttributesAttribute));
 563+ $record = new ArrayRecord(new Structure($o->definedMeaningAttributes));
568564
569 - $record->setAttributeValue($objectIdAttribute, $objectId);
570 - $record->setAttributeValue($textAttributeValuesAttribute, getTextAttributesValuesRecordSet(array($objectId), $viewInformation));
571 - $record->setAttributeValue($translatedTextAttributeValuesAttribute, getTranslatedTextAttributeValuesRecordSet(array($objectId), $viewInformation));
572 - $record->setAttributeValue($linkAttributeValuesAttribute, getLinkAttributeValuesRecordSet(array($objectId), $viewInformation));
573 - $record->setAttributeValue($optionAttributeValuesAttribute, getOptionAttributeValuesRecordSet(array($objectId), $viewInformation));
 565+ $record->objectId = $objectId;
 566+ $record->textAttributeValues = getTextAttributesValuesRecordSet(array($objectId), $viewInformation);
 567+ $record->translatedTextAttributeValues = getTranslatedTextAttributeValuesRecordSet(array($objectId), $viewInformation);
 568+ $record->linkAttributeValues = getLinkAttributeValuesRecordSet(array($objectId), $viewInformation);
 569+ $record->optionAttributeValues = getOptionAttributeValuesRecordSet(array($objectId), $viewInformation);
574570
575571 return $record;
576572 }
577573
578574 function filterAttributeValues(RecordSet $sourceRecordSet, Attribute $attributeAttribute, array &$attributeIds) {
579 - global
580 - $definedMeaningIdAttribute;
 575+
 576+ $o=OmegaWikiAttributes::getInstance();
581577
582578 $result = new ArrayRecordSet($sourceRecordSet->getStructure(), $sourceRecordSet->getKey());
583579 $i = 0;
@@ -584,7 +580,7 @@
585581 while ($i < $sourceRecordSet->getRecordCount()) {
586582 $record = $sourceRecordSet->getRecord($i);
587583
588 - if (in_array($record->getAttributeValue($attributeAttribute)->getAttributeValue($definedMeaningIdAttribute), $attributeIds)) {
 584+ if (in_array($record->getAttributeValue($attributeAttribute)->definedMeaningId, $attributeIds)) {
589585 $result->add($record);
590586 $sourceRecordSet->remove($i);
591587 }
@@ -596,37 +592,33 @@
597593 }
598594
599595 function filterObjectAttributesRecord(Record $sourceRecord, array &$attributeIds) {
600 - global
601 - $objectIdAttribute,
602 - $textAttributeValuesAttribute, $textAttributeAttribute,
603 - $translatedTextAttributeAttribute, $translatedTextAttributeValuesAttribute,
604 - $linkAttributeAttribute, $linkAttributeValuesAttribute,
605 - $optionAttributeAttribute, $optionAttributeValuesAttribute;
 596+
 597+ $o=OmegaWikiAttributes::getInstance();
606598
607599 $result = new ArrayRecord($sourceRecord->getStructure());
608 - $result->setAttributeValue($objectIdAttribute, $sourceRecord->getAttributeValue($objectIdAttribute));
 600+ $result->objectId = $sourceRecord->objectId;
609601
610 - $result->setAttributeValue($textAttributeValuesAttribute, filterAttributeValues(
611 - $sourceRecord->getAttributeValue($textAttributeValuesAttribute),
612 - $textAttributeAttribute,
 602+ $result->setAttributeValue($o->textAttributeValues, filterAttributeValues(
 603+ $sourceRecord->textAttributeValues,
 604+ $o->textAttribute,
613605 $attributeIds
614606 ));
615607
616 - $result->setAttributeValue($translatedTextAttributeValuesAttribute, filterAttributeValues(
617 - $sourceRecord->getAttributeValue($translatedTextAttributeValuesAttribute),
618 - $translatedTextAttributeAttribute,
 608+ $result->setAttributeValue($o->translatedTextAttributeValues, filterAttributeValues(
 609+ $sourceRecord->translatedTextAttributeValues,
 610+ $o->translatedTextAttribute,
619611 $attributeIds
620612 ));
621613
622 - $result->setAttributeValue($linkAttributeValuesAttribute, filterAttributeValues(
623 - $sourceRecord->getAttributeValue($linkAttributeValuesAttribute),
624 - $linkAttributeAttribute,
 614+ $result->setAttributeValue($o->linkAttributeValues, filterAttributeValues(
 615+ $sourceRecord->linkAttributeValues,
 616+ $o->linkAttribute,
625617 $attributeIds
626618 ));
627619
628 - $result->setAttributeValue($optionAttributeValuesAttribute, filterAttributeValues(
629 - $sourceRecord->getAttributeValue($optionAttributeValuesAttribute),
630 - $optionAttributeAttribute,
 620+ $result->setAttributeValue($o->optionAttributeValues, filterAttributeValues(
 621+ $sourceRecord->optionAttributeValues,
 622+ $o->optionAttribute,
631623 $attributeIds
632624 ));
633625
@@ -634,8 +626,8 @@
635627 }
636628
637629 function getTranslatedContentValue($translatedContentId, ViewInformation $viewInformation) {
638 - global
639 - $textAttribute;
 630+
 631+ $o=OmegaWikiAttributes::getInstance();
640632
641633 if ($viewInformation->filterLanguageId == 0)
642634 return getTranslatedContentRecordSet($translatedContentId, $viewInformation);
@@ -646,7 +638,7 @@
647639 return $recordSet;
648640 else {
649641 if ($recordSet->getRecordCount() > 0)
650 - return $recordSet->getRecord(0)->getAttributeValue($textAttribute);
 642+ return $recordSet->getRecord(0)->text;
651643 else
652644 return "";
653645 }
@@ -654,14 +646,15 @@
655647 }
656648
657649 function getTranslatedContentRecordSet($translatedContentId, ViewInformation $viewInformation) {
 650+
 651+ $o=OmegaWikiAttributes::getInstance();
658652 global
659 - $translatedContentTable,
660 - $translatedTextStructure;
 653+ $translatedContentTable;
661654
662655 $o=OmegaWikiAttributes::getInstance();
663656
664657 $recordSet = queryRecordSet(
665 - $translatedTextStructure->getStructureType(),
 658+ $o->translatedTextStructure->getStructureType(),
666659 $viewInformation->queryTransactionInformation,
667660 $o->language,
668661 new TableColumnsToAttributesMapping(
@@ -704,9 +697,10 @@
705698 }
706699
707700 function getSynonymAndTranslationRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 701+
 702+ $o=OmegaWikiAttributes::getInstance();
708703 global
709 - $syntransTable, $syntransIdAttribute, $expressionAttribute, $identicalMeaningAttribute, $objectAttributesAttribute,
710 - $synonymsTranslationsStructure;
 704+ $syntransTable;
711705
712706 $dc=wdGetDataSetContext();
713707 $restrictions = array("defined_meaning_id=$definedMeaningId");
@@ -721,33 +715,30 @@
722716 ")";
723717
724718 $recordSet = queryRecordSet(
725 - $synonymsTranslationsStructure->getStructureType(),
 719+ $o->synonymsTranslationsStructure->getStructureType(),
726720 $viewInformation->queryTransactionInformation,
727 - $syntransIdAttribute,
 721+ $o->syntransId,
728722 new TableColumnsToAttributesMapping(
729 - new TableColumnsToAttribute(array('syntrans_sid'), $syntransIdAttribute),
730 - new TableColumnsToAttribute(array('expression_id'), $expressionAttribute),
731 - new TableColumnsToAttribute(array('identical_meaning'),$identicalMeaningAttribute)
 723+ new TableColumnsToAttribute(array('syntrans_sid'), $o->syntransId),
 724+ new TableColumnsToAttribute(array('expression_id'), $o->expression),
 725+ new TableColumnsToAttribute(array('identical_meaning'),$o->identicalMeaning)
732726 ),
733727 $syntransTable,
734728 $restrictions
735729 );
736730
737731 if ($viewInformation->filterLanguageId == 0)
738 - expandExpressionReferencesInRecordSet($recordSet, array($expressionAttribute));
 732+ expandExpressionReferencesInRecordSet($recordSet, array($o->expression));
739733 else
740 - expandExpressionSpellingsInRecordSet($recordSet, array($expressionAttribute));
 734+ expandExpressionSpellingsInRecordSet($recordSet, array($o->expression));
741735
742 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $syntransIdAttribute, $viewInformation);
 736+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->syntransId, $viewInformation);
743737 return $recordSet;
744738 }
745739
746740 function expandObjectAttributesAttribute(RecordSet $recordSet, Attribute $attributeToExpand, Attribute $objectIdAttribute, ViewInformation $viewInformation) {
747 - global
748 - $textAttributeObjectAttribute, $textAttributeValuesAttribute,
749 - $attributeObjectAttribute, $translatedTextAttributeValuesAttribute,
750 - $linkAttributeObjectAttribute, $linkAttributeValuesAttribute,
751 - $optionAttributeObjectAttribute, $optionAttributeValuesAttribute;
 741+
 742+ $o=OmegaWikiAttributes::getInstance();
752743
753744 $recordSetStructure = $recordSet->getStructure();
754745 $recordSetStructure->addAttribute($attributeToExpand);
@@ -767,7 +758,7 @@
768759 $textAttributeValuesRecordSets =
769760 splitRecordSet(
770761 $allTextAttributeValuesRecordSet,
771 - $textAttributeObjectAttribute
 762+ $o->textAttributeObject
772763 );
773764
774765 $emptyTextAttributesRecordSet = new ArrayRecordSet($allTextAttributeValuesRecordSet->getStructure(), $allTextAttributeValuesRecordSet->getKey());
@@ -777,7 +768,7 @@
778769 $translatedTextAttributeValuesRecordSets =
779770 splitRecordSet(
780771 $allTranslatedTextAttributeValuesRecordSet,
781 - $attributeObjectAttribute
 772+ $o->attributeObject
782773 );
783774
784775 $emptyTranslatedTextAttributesRecordSet = new ArrayRecordSet($allTranslatedTextAttributeValuesRecordSet->getStructure(), $allTranslatedTextAttributeValuesRecordSet->getKey());
@@ -787,7 +778,7 @@
788779 $linkAttributeValuesRecordSets =
789780 splitRecordSet(
790781 $allLinkAttributeValuesRecordSet,
791 - $linkAttributeObjectAttribute
 782+ $o->linkAttributeObject
792783 );
793784
794785 $emptyLinkAttributesRecordSet = new ArrayRecordSet($allLinkAttributeValuesRecordSet->getStructure(), $allLinkAttributeValuesRecordSet->getKey());
@@ -797,7 +788,7 @@
798789 $optionAttributeValuesRecordSets =
799790 splitRecordSet(
800791 $allOptionAttributeValuesRecordSet,
801 - $optionAttributeObjectAttribute
 792+ $o->optionAttributeObject
802793 );
803794
804795
@@ -833,10 +824,10 @@
834825
835826 $objectAttributesRecord = new ArrayRecord($objectAttributesRecordStructure);
836827 $objectAttributesRecord->setAttributeValue($objectIdAttribute, $objectId);
837 - $objectAttributesRecord->setAttributeValue($textAttributeValuesAttribute, $textAttributeValuesRecordSet);
838 - $objectAttributesRecord->setAttributeValue($translatedTextAttributeValuesAttribute, $translatedTextAttributeValuesRecordSet);
839 - $objectAttributesRecord->setAttributeValue($linkAttributeValuesAttribute, $linkAttributeValuesRecordSet);
840 - $objectAttributesRecord->setAttributeValue($optionAttributeValuesAttribute, $optionAttributeValuesRecordSet);
 828+ $objectAttributesRecord->textAttributeValues = $textAttributeValuesRecordSet;
 829+ $objectAttributesRecord->translatedTextAttributeValues = $translatedTextAttributeValuesRecordSet;
 830+ $objectAttributesRecord->linkAttributeValues = $linkAttributeValuesRecordSet;
 831+ $objectAttributesRecord->optionAttributeValues = $optionAttributeValuesRecordSet;
841832
842833 $record->setAttributeValue($attributeToExpand, $objectAttributesRecord);
843834 applyPropertyToColumnFiltersToRecord($record, $objectAttributesRecord, $viewInformation);
@@ -845,23 +836,22 @@
846837 }
847838
848839 function getDefinedMeaningReferenceRecord($definedMeaningId) {
849 - global
850 - $definedMeaningReferenceStructure, $definedMeaningIdAttribute, $definedMeaningLabelAttribute,
851 - $definedMeaningDefiningExpressionAttribute;
 840+
 841+ $o=OmegaWikiAttributes::getInstance();
852842
853 - $record = new ArrayRecord($definedMeaningReferenceStructure);
854 - $record->setAttributeValue($definedMeaningIdAttribute, $definedMeaningId);
855 - $record->setAttributeValue($definedMeaningLabelAttribute, definedMeaningExpression($definedMeaningId));
856 - $record->setAttributeValue($definedMeaningDefiningExpressionAttribute, definingExpression($definedMeaningId));
 843+ $record = new ArrayRecord($o->definedMeaningReferenceStructure);
 844+ $record->definedMeaningId = $definedMeaningId;
 845+ $record->definedMeaningLabel = definedMeaningExpression($definedMeaningId);
 846+ $record->definedMeaningDefiningExpression = definingExpression($definedMeaningId);
857847
858848 return $record;
859849 }
860850
861851 function getDefinedMeaningRelationsRecordSet($definedMeaningId, array $filterRelationTypes, ViewInformation $viewInformation) {
 852+
 853+ $o=OmegaWikiAttributes::getInstance();
862854 global
863 - $meaningRelationsTable, $relationIdAttribute, $relationTypeAttribute,
864 - $objectAttributesAttribute, $otherDefinedMeaningAttribute,
865 - $relationStructure;
 855+ $meaningRelationsTable;
866856
867857 $restrictions = array("meaning1_mid=$definedMeaningId");
868858
@@ -869,63 +859,64 @@
870860 $restrictions[] = "relationtype_mid NOT IN (". implode(", ", $filterRelationTypes) .")";
871861
872862 $recordSet = queryRecordSet(
873 - $relationStructure->getStructureType(),
 863+ $o->relationStructure->getStructureType(),
874864 $viewInformation->queryTransactionInformation,
875 - $relationIdAttribute,
 865+ $o->relationId,
876866 new TableColumnsToAttributesMapping(
877 - new TableColumnsToAttribute(array('relation_id'), $relationIdAttribute),
878 - new TableColumnsToAttribute(array('relationtype_mid'), $relationTypeAttribute),
879 - new TableColumnsToAttribute(array('meaning2_mid'), $otherDefinedMeaningAttribute)
 867+ new TableColumnsToAttribute(array('relation_id'), $o->relationId),
 868+ new TableColumnsToAttribute(array('relationtype_mid'), $o->relationType),
 869+ new TableColumnsToAttribute(array('meaning2_mid'), $o->otherDefinedMeaning)
880870 ),
881871 $meaningRelationsTable,
882872 $restrictions,
883873 array('add_transaction_id')
884874 );
885875
886 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($relationTypeAttribute, $otherDefinedMeaningAttribute));
887 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $relationIdAttribute, $viewInformation);
 876+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->relationType, $o->otherDefinedMeaning));
 877+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->relationId, $viewInformation);
888878
889879 return $recordSet;
890880 }
891881
892882 function getDefinedMeaningReciprocalRelationsRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 883+
 884+ $o=OmegaWikiAttributes::getInstance();
893885 global
894 - $meaningRelationsTable, $relationIdAttribute, $relationTypeAttribute,
895 - $otherDefinedMeaningAttribute, $objectAttributesAttribute,
896 - $reciprocalRelationsAttribute;
 886+ $meaningRelationsTable;
897887
898888 $recordSet = queryRecordSet(
899 - $reciprocalRelationsAttribute->id,
 889+ $o->reciprocalRelations->id,
900890 $viewInformation->queryTransactionInformation,
901 - $relationIdAttribute,
 891+ $o->relationId,
902892 new TableColumnsToAttributesMapping(
903 - new TableColumnsToAttribute(array('relation_id'), $relationIdAttribute),
904 - new TableColumnsToAttribute(array('relationtype_mid'), $relationTypeAttribute),
905 - new TableColumnsToAttribute(array('meaning1_mid'), $otherDefinedMeaningAttribute)
 893+ new TableColumnsToAttribute(array('relation_id'), $o->relationId),
 894+ new TableColumnsToAttribute(array('relationtype_mid'), $o->relationType),
 895+ new TableColumnsToAttribute(array('meaning1_mid'), $o->otherDefinedMeaning)
906896 ),
907897 $meaningRelationsTable,
908898 array("meaning2_mid=$definedMeaningId"),
909899 array('relationtype_mid')
910900 );
911901
912 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($relationTypeAttribute, $otherDefinedMeaningAttribute));
913 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $relationIdAttribute, $viewInformation);
 902+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->relationType, $o->otherDefinedMeaning));
 903+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->relationId, $viewInformation);
914904
915905 return $recordSet;
916906 }
917907
918908 function getPossiblySynonymousRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 909+
 910+ $o=OmegaWikiAttributes::getInstance();
919911 global
920 - $meaningRelationsTable, $possiblySynonymousIdAttribute, $possibleSynonymAttribute,
921 - $objectAttributesAttribute, $otherDefinedMeaningAttribute;
 912+ $meaningRelationsTable;
922913
923914 $recordSet = queryRecordSet(
924915 null,
925916 $viewInformation->queryTransactionInformation,
926 - $possiblySynonymousIdAttribute,
 917+ $o->possiblySynonymousId,
927918 new TableColumnsToAttributesMapping(
928 - new TableColumnsToAttribute(array('relation_id'), $possiblySynonymousIdAttribute),
929 - new TableColumnsToAttribute(array('meaning2_mid'), $possibleSynonymAttribute)
 919+ new TableColumnsToAttribute(array('relation_id'), $o->possiblySynonymousId),
 920+ new TableColumnsToAttribute(array('meaning2_mid'), $o->possibleSynonym)
930921 ),
931922 $meaningRelationsTable,
932923 array(
@@ -935,186 +926,192 @@
936927 array('add_transaction_id')
937928 );
938929
939 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($possibleSynonymAttribute));
940 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $possiblySynonymousIdAttribute, $viewInformation);
 930+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->possibleSynonym));
 931+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->possiblySynonymousId, $viewInformation);
941932
942933 return $recordSet;
943934 }
944935
945936 function getGotoSourceRecord($record) {
946 - global
947 - $gotoSourceStructure, $collectionIdAttribute, $sourceIdentifierAttribute;
 937+
 938+ $o=OmegaWikiAttributes::getInstance();
948939
949 - $result = new ArrayRecord($gotoSourceStructure);
950 - $result->setAttributeValue($collectionIdAttribute, $record->getAttributeValue($collectionIdAttribute));
951 - $result->setAttributeValue($sourceIdentifierAttribute, $record->getAttributeValue($sourceIdentifierAttribute));
 940+ $result = new ArrayRecord($o->gotoSourceStructure);
 941+ $result->collectionId = $record->collectionId;
 942+ $result->sourceIdentifier = $record->sourceIdentifier;
952943
953944 return $result;
954945 }
955946
956947 function getDefinedMeaningCollectionMembershipRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 948+
 949+ $o=OmegaWikiAttributes::getInstance();
957950 global
958 - $collectionMembershipsTable, $collectionIdAttribute, $collectionMeaningAttribute, $sourceIdentifierAttribute,
959 - $gotoSourceAttribute, $collectionMembershipStructure;
 951+ $collectionMembershipsTable;
960952
961953 $recordSet = queryRecordSet(
962 - $collectionMembershipStructure->getStructureType(),
 954+ $o->collectionMembershipStructure->getStructureType(),
963955 $viewInformation->queryTransactionInformation,
964 - $collectionIdAttribute,
 956+ $o->collectionId,
965957 new TableColumnsToAttributesMapping(
966 - new TableColumnsToAttribute(array('collection_id'), $collectionIdAttribute),
967 - new TableColumnsToAttribute(array('internal_member_id'), $sourceIdentifierAttribute)
 958+ new TableColumnsToAttribute(array('collection_id'), $o->collectionId),
 959+ new TableColumnsToAttribute(array('internal_member_id'), $o->sourceIdentifier)
968960 ),
969961 $collectionMembershipsTable,
970962 array("member_mid=$definedMeaningId")
971963 );
972964
973 - $recordSet->getStructure()->addAttribute($collectionMeaningAttribute);
 965+ $recordSet->getStructure()->addAttribute($o->collectionMeaning);
974966
975967 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
976968 $record = $recordSet->getRecord($i);
977 - $record->setAttributeValue($collectionMeaningAttribute, getCollectionMeaningId($record->getAttributeValue($collectionIdAttribute)));
978 - $record->setAttributeValue($gotoSourceAttribute, getGotoSourceRecord($record));
 969+ $record->collectionMeaning = getCollectionMeaningId($record->collectionId);
 970+ $record->gotoSource = getGotoSourceRecord($record);
979971 }
980972
981 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($collectionMeaningAttribute));
 973+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->collectionMeaning));
982974
983975 return $recordSet;
984976 }
985977
986978 function getTextAttributesValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
 979+
 980+ $o=OmegaWikiAttributes::getInstance();
987981 global
988 - $textAttributeValuesTable, $textAttributeIdAttribute, $textAttributeObjectAttribute,
989 - $textAttributeAttribute, $textAttribute, $objectAttributesAttribute,
990 - $textAttributeValuesStructure;
 982+ $textAttributeValuesTable;
991983
992984 $recordSet = queryRecordSet(
993 - $textAttributeValuesStructure->getStructureType(),
 985+ $o->textAttributeValuesStructure->getStructureType(),
994986 $viewInformation->queryTransactionInformation,
995 - $textAttributeIdAttribute,
 987+ $o->textAttributeId,
996988 new TableColumnsToAttributesMapping(
997 - new TableColumnsToAttribute(array('value_id'), $textAttributeIdAttribute),
998 - new TableColumnsToAttribute(array('object_id'), $textAttributeObjectAttribute),
999 - new TableColumnsToAttribute(array('attribute_mid'), $textAttributeAttribute),
1000 - new TableColumnsToAttribute(array('text'), $textAttribute)
 989+ new TableColumnsToAttribute(array('value_id'), $o->textAttributeId),
 990+ new TableColumnsToAttribute(array('object_id'), $o->textAttributeObject),
 991+ new TableColumnsToAttribute(array('attribute_mid'), $o->textAttribute),
 992+ new TableColumnsToAttribute(array('text'), $o->text)
1001993 ),
1002994 $textAttributeValuesTable,
1003995 array("object_id IN (" . implode(", ", $objectIds) . ")")
1004996 );
1005997
1006 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($textAttributeAttribute));
1007 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $textAttributeIdAttribute, $viewInformation);
 998+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->textAttribute));
 999+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->textAttributeId, $viewInformation);
10081000
10091001 return $recordSet;
10101002 }
10111003
10121004 function getLinkAttributeValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
 1005+
 1006+ $o=OmegaWikiAttributes::getInstance();
10131007 global
1014 - $linkAttributeValuesTable, $linkAttributeIdAttribute, $linkAttributeObjectAttribute,
1015 - $linkAttributeAttribute, $linkAttribute, $objectAttributesAttribute,
1016 - $linkAttributeValuesStructure;
 1008+ $linkAttributeValuesTable;
10171009
10181010 $recordSet = queryRecordSet(
1019 - $linkAttributeValuesStructure->getStructureType(),
 1011+ $o->linkAttributeValuesStructure->getStructureType(),
10201012 $viewInformation->queryTransactionInformation,
1021 - $linkAttributeIdAttribute,
 1013+ $o->linkAttributeId,
10221014 new TableColumnsToAttributesMapping(
1023 - new TableColumnsToAttribute(array('value_id'), $linkAttributeIdAttribute),
1024 - new TableColumnsToAttribute(array('object_id'), $linkAttributeObjectAttribute),
1025 - new TableColumnsToAttribute(array('attribute_mid'), $linkAttributeAttribute),
1026 - new TableColumnsToAttribute(array('label', 'url'), $linkAttribute)
 1015+ new TableColumnsToAttribute(array('value_id'), $o->linkAttributeId),
 1016+ new TableColumnsToAttribute(array('object_id'), $o->linkAttributeObject),
 1017+ new TableColumnsToAttribute(array('attribute_mid'), $o->linkAttribute),
 1018+ new TableColumnsToAttribute(array('label', 'url'), $o->link)
10271019 ),
10281020 $linkAttributeValuesTable,
10291021 array("object_id IN (" . implode(", ", $objectIds) . ")")
10301022 );
10311023
1032 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($linkAttributeAttribute));
1033 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $linkAttributeIdAttribute, $viewInformation);
 1024+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->linkAttribute));
 1025+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->linkAttributeId, $viewInformation);
10341026
10351027 return $recordSet;
10361028 }
10371029
10381030 function getTranslatedTextAttributeValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
 1031+
 1032+ $o=OmegaWikiAttributes::getInstance();
10391033 global
1040 - $translatedTextAttributeIdAttribute, $translatedContentAttributeValuesTable, $translatedTextAttributeAttribute,
1041 - $objectAttributesAttribute, $attributeObjectAttribute, $translatedTextValueAttribute, $translatedTextValueIdAttribute,
1042 - $translatedTextAttributeValuesStructure;
 1034+ $translatedContentAttributeValuesTable;
10431035
10441036 $recordSet = queryRecordSet(
1045 - $translatedTextAttributeValuesStructure->getStructureType(),
 1037+ $o->translatedTextAttributeValuesStructure->getStructureType(),
10461038 $viewInformation->queryTransactionInformation,
1047 - $translatedTextAttributeIdAttribute,
 1039+ $o->translatedTextAttributeId,
10481040 new TableColumnsToAttributesMapping(
1049 - new TableColumnsToAttribute(array('value_id'), $translatedTextAttributeIdAttribute),
1050 - new TableColumnsToAttribute(array('object_id'), $attributeObjectAttribute),
1051 - new TableColumnsToAttribute(array('attribute_mid'), $translatedTextAttributeAttribute),
1052 - new TableColumnsToAttribute(array('value_tcid'), $translatedTextValueIdAttribute)
 1041+ new TableColumnsToAttribute(array('value_id'), $o->translatedTextAttributeId),
 1042+ new TableColumnsToAttribute(array('object_id'), $o->attributeObject),
 1043+ new TableColumnsToAttribute(array('attribute_mid'), $o->translatedTextAttribute),
 1044+ new TableColumnsToAttribute(array('value_tcid'), $o->translatedTextValueId)
10531045 ),
10541046 $translatedContentAttributeValuesTable,
10551047 array("object_id IN (" . implode(", ", $objectIds) . ")")
10561048 );
10571049
1058 - $recordSet->getStructure()->addAttribute($translatedTextValueAttribute);
 1050+ $recordSet->getStructure()->addAttribute($o->translatedTextValue);
10591051
1060 - expandTranslatedContentsInRecordSet($recordSet, $translatedTextValueIdAttribute, $translatedTextValueAttribute, $viewInformation);
1061 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($translatedTextAttributeAttribute));
1062 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $translatedTextAttributeIdAttribute, $viewInformation);
 1052+ expandTranslatedContentsInRecordSet($recordSet, $o->translatedTextValueId, $o->translatedTextValue, $viewInformation);
 1053+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->translatedTextAttribute));
 1054+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->translatedTextAttributeId, $viewInformation);
10631055 return $recordSet;
10641056 }
10651057
10661058 function getOptionAttributeOptionsRecordSet($attributeId, ViewInformation $viewInformation) {
 1059+
 1060+ $o=OmegaWikiAttributes::getInstance();
10671061 global
1068 - $optionAttributeOptionIdAttribute, $optionAttributeAttribute, $optionAttributeOptionAttribute, $optionAttributeOptionsTable;
 1062+ $optionAttributeOptionsTable;
10691063
10701064 $o=OmegaWikiAttributes::getInstance();
10711065 $recordSet = queryRecordSet(
10721066 null,
10731067 $viewInformation->queryTransactionInformation,
1074 - $optionAttributeOptionIdAttribute,
 1068+ $o->optionAttributeOptionId,
10751069 new TableColumnsToAttributesMapping(
1076 - new TableColumnsToAttribute(array('option_id'), $optionAttributeOptionIdAttribute),
1077 - new TableColumnsToAttribute(array('attribute_id'), $optionAttributeAttribute),
1078 - new TableColumnsToAttribute(array('option_mid'), $optionAttributeOptionAttribute),
 1070+ new TableColumnsToAttribute(array('option_id'), $o->optionAttributeOptionId),
 1071+ new TableColumnsToAttribute(array('attribute_id'), $o->optionAttribute),
 1072+ new TableColumnsToAttribute(array('option_mid'), $o->optionAttributeOption),
10791073 new TableColumnsToAttribute(array('language_id'), $o->language)
10801074 ),
10811075 $optionAttributeOptionsTable,
10821076 array('attribute_id = ' . $attributeId)
10831077 );
10841078
1085 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($optionAttributeOptionAttribute));
 1079+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->optionAttributeOption));
10861080
10871081 return $recordSet;
10881082 }
10891083
10901084 function getOptionAttributeValuesRecordSet(array $objectIds, ViewInformation $viewInformation) {
 1085+
 1086+ $o=OmegaWikiAttributes::getInstance();
10911087 global
1092 - $optionAttributeIdAttribute, $optionAttributeObjectAttribute, $optionAttributeOptionIdAttribute, $optionAttributeAttribute,$optionAttributeOptionAttribute, $optionAttributeValuesTable, $objectAttributesAttribute,
1093 - $optionAttributeValuesStructure;
 1088+ $optionAttributeValuesTable;
10941089
10951090 $recordSet = queryRecordSet(
1096 - $optionAttributeValuesStructure->getStructureType(),
 1091+ $o->optionAttributeValuesStructure->getStructureType(),
10971092 $viewInformation->queryTransactionInformation,
1098 - $optionAttributeIdAttribute,
 1093+ $o->optionAttributeId,
10991094 new TableColumnsToAttributesMapping(
1100 - new TableColumnsToAttribute(array('value_id'), $optionAttributeIdAttribute),
1101 - new TableColumnsToAttribute(array('object_id'), $optionAttributeObjectAttribute),
1102 - new TableColumnsToAttribute(array('option_id'), $optionAttributeOptionIdAttribute)
 1095+ new TableColumnsToAttribute(array('value_id'), $o->optionAttributeId),
 1096+ new TableColumnsToAttribute(array('object_id'), $o->optionAttributeObject),
 1097+ new TableColumnsToAttribute(array('option_id'), $o->optionAttributeOptionId)
11031098 ),
11041099 $optionAttributeValuesTable,
11051100 array("object_id IN (" . implode(", ", $objectIds) . ")")
11061101 );
11071102
11081103 expandOptionsInRecordSet($recordSet, $viewInformation);
1109 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($optionAttributeAttribute, $optionAttributeOptionAttribute));
1110 - expandObjectAttributesAttribute($recordSet, $objectAttributesAttribute, $optionAttributeIdAttribute, $viewInformation);
 1104+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->optionAttribute, $o->optionAttributeOption));
 1105+ expandObjectAttributesAttribute($recordSet, $o->objectAttributes, $o->optionAttributeId, $viewInformation);
11111106
11121107 return $recordSet;
11131108 }
11141109
11151110 /* XXX: This can probably be combined with other functions. In fact, it probably should be. Do it. */
11161111 function expandOptionsInRecordSet(RecordSet $recordSet, ViewInformation $viewInformation) {
 1112+
 1113+ $o=OmegaWikiAttributes::getInstance();
11171114 global
1118 - $optionAttributeOptionIdAttribute, $optionAttributeIdAttribute, $optionAttributeAttribute, $optionAttributeOptionAttribute, $optionAttributeOptionsTable, $classAttributesTable;
 1115+ $optionAttributeOptionsTable, $classAttributesTable;
11191116
11201117 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
11211118 $record = $recordSet->getRecord($i);
@@ -1122,74 +1119,67 @@
11231120 $optionRecordSet = queryRecordSet(
11241121 null,
11251122 $viewInformation->queryTransactionInformation,
1126 - $optionAttributeOptionIdAttribute,
 1123+ $o->optionAttributeOptionId,
11271124 new TableColumnsToAttributesMapping(
1128 - new TableColumnsToAttribute(array('attribute_id'), $optionAttributeIdAttribute),
1129 - new TableColumnsToAttribute(array('option_mid'), $optionAttributeOptionAttribute)
 1125+ new TableColumnsToAttribute(array('attribute_id'), $o->optionAttributeId),
 1126+ new TableColumnsToAttribute(array('option_mid'), $o->optionAttributeOption)
11301127 ),
11311128 $optionAttributeOptionsTable,
1132 - array('option_id = ' . $record->getAttributeValue($optionAttributeOptionIdAttribute))
 1129+ array('option_id = ' . $record->optionAttributeOptionId)
11331130 );
11341131
11351132 $optionRecord = $optionRecordSet->getRecord(0);
1136 - $record->setAttributeValue(
1137 - $optionAttributeOptionAttribute,
1138 - $optionRecord->getAttributeValue($optionAttributeOptionAttribute)
1139 - );
 1133+ $record->optionAttributeOption = $optionRecord->optionAttributeOption;
11401134
11411135 $optionRecordSet = queryRecordSet(
11421136 null,
11431137 $viewInformation->queryTransactionInformation,
1144 - $optionAttributeIdAttribute,
1145 - new TableColumnsToAttributesMapping(new TableColumnsToAttribute(array('attribute_mid'), $optionAttributeAttribute)),
 1138+ $o->optionAttributeId,
 1139+ new TableColumnsToAttributesMapping(new TableColumnsToAttribute(array('attribute_mid'), $o->optionAttribute)),
11461140 $classAttributesTable,
1147 - array('object_id = ' . $optionRecord->getAttributeValue($optionAttributeIdAttribute))
 1141+ array('object_id = ' . $optionRecord->optionAttributeId)
11481142 );
11491143
11501144 $optionRecord = $optionRecordSet->getRecord(0);
1151 - $record->setAttributeValue(
1152 - $optionAttributeAttribute,
1153 - $optionRecord->getAttributeValue($optionAttributeAttribute)
1154 - );
 1145+ $record->optionAttribute = $optionRecord->optionAttribute;
11551146 }
11561147 }
11571148
11581149 function getDefinedMeaningClassMembershipRecordSet($definedMeaningId, ViewInformation $viewInformation) {
 1150+
 1151+ $o=OmegaWikiAttributes::getInstance();
11591152 global
1160 - $classMembershipsTable, $classMembershipIdAttribute, $classAttribute,
1161 - $classMembershipStructure;
 1153+ $classMembershipsTable;
11621154
11631155 $recordSet = queryRecordSet(
1164 - $classMembershipStructure->getStructureType(),
 1156+ $o->classMembershipStructure->getStructureType(),
11651157 $viewInformation->queryTransactionInformation,
1166 - $classMembershipIdAttribute,
 1158+ $o->classMembershipId,
11671159 new TableColumnsToAttributesMapping(
1168 - new TableColumnsToAttribute(array('class_membership_id'), $classMembershipIdAttribute),
1169 - new TableColumnsToAttribute(array('class_mid'), $classAttribute)
 1160+ new TableColumnsToAttribute(array('class_membership_id'), $o->classMembershipId),
 1161+ new TableColumnsToAttribute(array('class_mid'), $o->class)
11701162 ),
11711163 $classMembershipsTable,
11721164 array("class_member_mid=$definedMeaningId")
11731165 );
11741166
1175 - expandDefinedMeaningReferencesInRecordSet($recordSet, array($classAttribute));
 1167+ expandDefinedMeaningReferencesInRecordSet($recordSet, array($o->class));
11761168
11771169 return $recordSet;
11781170 }
11791171
11801172 function getDefiningExpressionRecord($definedMeaningId) {
11811173
1182 - global
1183 - $definedMeaningCompleteDefiningExpressionAttribute,
1184 - $definedMeaningDefiningExpressionAttribute,
1185 - $expressionIdAttribute;
11861174
 1175+ $o=OmegaWikiAttributes::getInstance();
 1176+
11871177 $o=OmegaWikiAttributes::getInstance();
11881178
11891179 $definingExpression=definingExpressionRow($definedMeaningId);
1190 - $definingExpressionRecord = new ArrayRecord($definedMeaningCompleteDefiningExpressionAttribute->type);
1191 - $definingExpressionRecord->setAttributeValue($expressionIdAttribute, $definingExpression[0]);
1192 - $definingExpressionRecord->setAttributeValue($definedMeaningDefiningExpressionAttribute, $definingExpression[1]);
1193 - $definingExpressionRecord->setAttributeValue($o->language, $definingExpression[2]);
 1180+ $definingExpressionRecord = new ArrayRecord($o->definedMeaningCompleteDefiningExpression->type);
 1181+ $definingExpressionRecord->expressionId = $definingExpression[0];
 1182+ $definingExpressionRecord->definedMeaningDefiningExpression = $definingExpression[1];
 1183+ $definingExpressionRecord->language = $definingExpression[2];
11941184 return $definingExpressionRecord;
11951185
11961186 }
Index: trunk/extensions/Wikidata/OmegaWiki/Transaction.php
@@ -59,10 +59,10 @@
6060
6161 class QueryHistoryTransactionInformation extends DefaultQueryTransactionInformation {
6262 public function versioningAttributes() {
63 - global
64 - $recordLifeSpanAttribute;
 63+
 64+ $o=OmegaWikiAttributes::getInstance();
6565
66 - return array($recordLifeSpanAttribute);
 66+ return array($o->recordLifeSpan);
6767 }
6868
6969 public function versioningFields($tableName) {
@@ -74,10 +74,10 @@
7575 }
7676
7777 public function setVersioningAttributes(Record $record, $row) {
78 - global
79 - $recordLifeSpanAttribute;
 78+
 79+ $o=OmegaWikiAttributes::getInstance();
8080
81 - $record->setAttributeValue($recordLifeSpanAttribute, getRecordLifeSpanTuple($row['add_transaction_id'], $row['remove_transaction_id']));
 81+ $record->recordLifeSpan = getRecordLifeSpanTuple($row['add_transaction_id'], $row['remove_transaction_id']);
8282 }
8383 }
8484
@@ -95,11 +95,11 @@
9696 }
9797
9898 public function versioningAttributes() {
99 - global
100 - $recordLifeSpanAttribute;
 99+
 100+ $o=OmegaWikiAttributes::getInstance();
101101
102102 if ($this->addAttributes)
103 - return array($recordLifeSpanAttribute);
 103+ return array($o->recordLifeSpan);
104104 else
105105 return array();
106106 }
@@ -109,11 +109,11 @@
110110 }
111111
112112 public function setVersioningAttributes(Record $record, $row) {
113 - global
114 - $recordLifeSpanAttribute;
 113+
 114+ $o=OmegaWikiAttributes::getInstance();
115115
116116 if ($this->addAttributes)
117 - $record->setAttributeValue($recordLifeSpanAttribute, getRecordLifeSpanTuple($row['add_transaction_id'], $row['remove_transaction_id']));
 117+ $record->recordLifeSpan = getRecordLifeSpanTuple($row['add_transaction_id'], $row['remove_transaction_id']);
118118 }
119119 }
120120
@@ -218,25 +218,22 @@
219219 return " ($table.add_transaction_id=$transactionId OR $table.remove_transaction_id=$transactionId) ";
220220 }
221221
222 -global
223 - $transactionIdAttribute, $userAttribute, $userIPAttribute, $timestampAttribute,
224 - $transactionStructure, $transactionAttribute, $summaryAttribute,
225 - $addTransactionAttribute, $removeTransactionAttribute,
226 - $recordLifeSpanAttribute, $recordLifeSpanStructure;
 222+
 223+$o=OmegaWikiAttributes::getInstance();
227224
228 -$transactionIdAttribute = new Attribute('transaction-id', 'Transaction ID', 'integer');
229 -$userAttribute = new Attribute('user', 'User', 'user');
230 -$userIPAttribute = new Attribute('user-ip', 'User IP', 'IP');
231 -$timestampAttribute = new Attribute('timestamp', 'Time', 'timestamp');
232 -$summaryAttribute = new Attribute('summary', 'Summary', 'text');
233 -$transactionStructure = new Structure($transactionIdAttribute, $userAttribute, $userIPAttribute, $timestampAttribute, $summaryAttribute);
234 -$transactionAttribute = new Attribute('transaction', 'Transaction', $transactionStructure);
 225+$o->transactionId = new Attribute('transaction-id', 'Transaction ID', 'integer');
 226+$o->user = new Attribute('user', 'User', 'user');
 227+$o->userIP = new Attribute('user-ip', 'User IP', 'IP');
 228+$o->timestamp = new Attribute('timestamp', 'Time', 'timestamp');
 229+$o->summary = new Attribute('summary', 'Summary', 'text');
 230+$transactionStructure = new Structure($o->transactionId, $o->user, $o->userIP, $o->timestamp, $o->summary);
 231+$o->transaction = new Attribute('transaction', 'Transaction', $transactionStructure);
235232
236 -$addTransactionAttribute = new Attribute('add-transaction', 'Added', $transactionStructure);
237 -$removeTransactionAttribute = new Attribute('remove-transaction', 'Removed', $transactionStructure);
 233+$o->addTransaction = new Attribute('add-transaction', 'Added', $transactionStructure);
 234+$o->removeTransaction = new Attribute('remove-transaction', 'Removed', $transactionStructure);
238235
239 -$recordLifeSpanStructure = new Structure($addTransactionAttribute, $removeTransactionAttribute);
240 -$recordLifeSpanAttribute = new Attribute('record-life-span', 'Record life span', $recordLifeSpanStructure);
 236+$recordLifeSpanStructure = new Structure($o->addTransaction, $o->removeTransaction);
 237+$o->recordLifeSpan = new Attribute('record-life-span', 'Record life span', $recordLifeSpanStructure);
241238
242239 function getUserName($userId) {
243240 $dbr =& wfGetDB(DB_SLAVE);
@@ -257,83 +254,80 @@
258255 return "Unknown";
259256 }
260257
261 -function expandUserIDsInRecordSet(RecordSet $recordSet, Attribute $userIDAttribute, Attribute $userIPAttribute) {
 258+function expandUserIDsInRecordSet(RecordSet $recordSet, Attribute $userID, Attribute $userIP) {
262259 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
263260 $record = $recordSet->getRecord($i);
264261 $record->setAttributeValue(
265262 $userIDAttribute,
266263 getUserLabel(
267 - $record->getAttributeValue($userIDAttribute),
268 - $record->getAttributeValue($userIPAttribute)
 264+ $record->$userIDAttribute,
 265+ $record->$userIP
269266 )
270267 );
271268 }
272269 }
273270
274 -function expandTransactionIdsInRecordSet(RecordSet $recordSet, Attribute $transactionIdAttribute, Attribute $transactionAttribute) {
 271+function expandTransactionIdsInRecordSet(RecordSet $recordSet, Attribute $transactionId, Attribute $transaction) {
275272 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {
276273 $record = $recordSet->getRecord($i);
277 - $record->setAttributeValue(
278 - $transactionAttribute,
279 - getTransactionRecord($record->getAttributeValue($transactionIdAttribute))
280 - );
 274+ $record->$transaction = getTransactionRecord($record->$transactionId);
281275 }
282276 }
283277
284278 function getTransactionRecord($transactionId) {
285 - global
286 - $transactionStructure, $transactionIdAttribute, $userAttribute, $timestampAttribute, $summaryAttribute;
 279+
 280+ $o=OmegaWikiAttributes::getInstance();
287281
288282 $dc=wdGetDataSetContext();
289283 $result = new ArrayRecord($transactionStructure);
290 - $result->setAttributeValue($transactionIdAttribute, $transactionId);
 284+ $result->transactionId = $transactionId;
291285
292286 if ($transactionId > 0) {
293287 $dbr =& wfGetDB(DB_SLAVE);
294288 $queryResult = $dbr->query("SELECT user_id, user_ip, timestamp, comment FROM {$dc}_transactions WHERE transaction_id=$transactionId");
295289
296290 if ($transaction = $dbr->fetchObject($queryResult)) {
297 - $result->setAttributeValue($userAttribute, getUserLabel($transaction->user_id, $transaction->user_ip));
298 - $result->setAttributeValue($timestampAttribute, $transaction->timestamp);
299 - $result->setAttributeValue($summaryAttribute, $transaction->comment);
 291+ $result->user = getUserLabel($transaction->user_id, $transaction->user_ip);
 292+ $result->timestamp = $transaction->timestamp;
 293+ $result->summary = $transaction->comment;
300294 }
301295 }
302296 else {
303297 if ($transactionId != null)
304 - $result->setAttributeValue($userAttribute, "Unknown");
 298+ $result->user = "Unknown";
305299 else
306 - $result->setAttributeValue($userAttribute, "");
 300+ $result->user = "";
307301
308 - $result->setAttributeValue($timestampAttribute, "");
309 - $result->setAttributeValue($summaryAttribute, "");
 302+ $result->timestamp = "";
 303+ $result->summary = "";
310304 }
311305
312306 return $result;
313307 }
314308
315309 function getRecordLifeSpanTuple($addTransactionId, $removeTransactionId) {
316 - global
317 - $recordLifeSpanStructure, $addTransactionAttribute, $removeTransactionAttribute;
 310+
 311+ $o=OmegaWikiAttributes::getInstance();
318312
319313 $result = new ArrayRecord($recordLifeSpanStructure);
320 - $result->setAttributeValue($addTransactionAttribute, getTransactionRecord($addTransactionId));
321 - $result->setAttributeValue($removeTransactionAttribute, getTransactionRecord($removeTransactionId));
 314+ $result->addTransaction = getTransactionRecord($addTransactionId);
 315+ $result->removeTransaction = getTransactionRecord($removeTransactionId);
322316
323317 return $result;
324318 }
325319
326320 function getTransactionLabel($transactionId) {
327 - global
328 - $timestampAttribute, $userAttribute, $summaryAttribute;
 321+
 322+ $o=OmegaWikiAttributes::getInstance();
329323
330324 if ($transactionId > 0) {
331325 $record = getTransactionRecord($transactionId);
332326
333327 $label =
334 - timestampAsText($record->getAttributeValue($timestampAttribute)) . ', ' .
335 - $record->getAttributeValue($userAttribute);
 328+ timestampAsText($record->timestamp) . ', ' .
 329+ $record->user;
336330
337 - $summary = $record->getAttributeValue($summaryAttribute);
 331+ $summary = $record->summary;
338332
339333 if ($summary != "")
340334 $label .= ', ' . $summary;

Status & tagging log