r23666 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23665‎ | r23666 | r23667 >
Date:14:32, 3 July 2007
Author:proes
Status:old
Tags:
Comment:
* Rolled out ViewInformation to the functions that construct the editors
* Introduced some type hints in OmegaWikiEditors.php, will do this wherever appropriate
* A RecordSetTableEditor now can be configured whether to show empty columns or not, used for suggestion drop downs
* Note: DefinedMeaningModel->save() may not work properly anymore due to not well understood cannibalized hacking :-), please review
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaningModel.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Editor.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWiki.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/ViewInformation.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Wikidata.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWiki.php
@@ -29,7 +29,7 @@
3030 $spelling = $wgTitle->getText();
3131
3232 $wgOut->addHTML(
33 - getExpressionsEditor($spelling, $this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, $this->shouldShowAuthorities)->view(
 33+ getExpressionsEditor($spelling, $this->viewInformation)->view(
3434 $this->getIdStack(),
3535 getExpressionsRecordSet($spelling, $this->viewInformation)
3636 )
@@ -47,7 +47,7 @@
4848 $spelling = $wgTitle->getText();
4949
5050 $wgOut->addHTML(
51 - getExpressionsEditor($spelling, $this->filterLanguageId, $this->possiblySynonymousRelationTypeId, $this->showRecordLifeSpan, false)->view(
 51+ getExpressionsEditor($spelling, $this->viewInformation)->view(
5252 $this->getIdStack(),
5353 getExpressionsRecordSet($spelling, $this->viewInformation)
5454 )
@@ -65,7 +65,7 @@
6666
6767 $spelling = $wgTitle->getText();
6868
69 - getExpressionsEditor($spelling, $this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, false)->save(
 69+ getExpressionsEditor($spelling, $this->viewInformation)->save(
7070 $this->getIdStack(),
7171 getExpressionsRecordSet($spelling, $this->viewInformation)
7272 );
@@ -81,7 +81,7 @@
8282 $spelling = $wgTitle->getText();
8383
8484 $wgOut->addHTML(
85 - getExpressionsEditor($spelling, $this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, false)->edit(
 85+ getExpressionsEditor($spelling, $this->viewInformation)->edit(
8686 $this->getIdStack(),
8787 getExpressionsRecordSet($spelling, $this->viewInformation)
8888 )
Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaningModel.php
@@ -46,12 +46,16 @@
4747 }
4848
4949 /*horrible cannibalised hack. Use at own risk*/
 50+ /* Sorry, don't know what horrible cannibalised hacks are. Therefore I cannot update code properly.
 51+ * Please check if it still works correctly. Peter-Jan Roes.
 52+ */
5053 public function save() {
5154 initializeOmegaWikiAttributes($this->filterLanguageId != 0, false);
52 - initializeObjectAttributeEditors($this->filterLanguageId, false);
 55+ initializeObjectAttributeEditors($this->viewInformation);
 56+
5357 $definedMeaningId = $this->getDefinedMeaningID();
5458
55 - getDefinedMeaningEditor($this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, false)->save(
 59+ getDefinedMeaningEditor($this->viewInformation)->save(
5660 $this->getIdStack($definedMeaningId),
5761 $this->getRecord()
5862 );
Index: trunk/extensions/Wikidata/OmegaWiki/ViewInformation.php
@@ -2,8 +2,8 @@
33
44 /**
55 * ViewInformation is used to capture various settings that influence the way a page will be viewed
6 - * depending on different use case scenarios. For instance, by specifying a filterLanguageId a page
7 - * with be filtered entirely on one language, collapsing record sets to records where appropiate.
 6+ * depending on different use case scenarios. For instance, by specifying a filterLanguageId, a page
 7+ * will be filtered entirely on one language, collapsing record sets to records where appropiate.
88 *
99 * A ViewInformation can be constructed based on various conditions. The language filtering for instance
1010 * could be an application wide setting, or a setting that can be controlled by the user. Functions that
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php
@@ -398,6 +398,7 @@
399399 class RecordSetTableEditor extends RecordSetEditor {
400400 protected $rowHTMLAttributes = array();
401401 protected $repeatInput = false;
 402+ protected $hideEmptyColumns = true;
402403
403404 protected function getRowAttributesText() {
404405 $result = array();
@@ -473,7 +474,11 @@
474475 $structure = $value->getStructure();
475476 $key = $value->getKey();
476477 $rowAttributes = $this->getRowAttributesText();
477 - $visibleColumnEditors = $this->getColumnEditorsShowingData($this, $value);
 478+
 479+ if ($this->hideEmptyColumns)
 480+ $visibleColumnEditors = $this->getColumnEditorsShowingData($this, $value);
 481+ else
 482+ $visibleColumnEditors = $this->getAllColumnEditors($this, $value);
478483
479484 foreach (getStructureAsTableHeaderRows($this->getTableStructure($this, $visibleColumnEditors), 0, $idPath) as $headerRow)
480485 $result .= '<tr>' . $headerRow . '</tr>'.EOL;
@@ -614,6 +619,10 @@
615620
616621 return new Structure($attributes);
617622 }
 623+
 624+ public function setHideEmptyColumns($hideEmptyColumns) {
 625+ $this->hideEmptyColumns = $hideEmptyColumns;
 626+ }
618627 }
619628
620629 abstract class RecordEditor extends DefaultEditor {
@@ -1144,7 +1153,7 @@
11451154 protected $attributesLevelName;
11461155 protected $objectIdFetcher;
11471156
1148 - public function __construct($attribute, $permissionController, $isAddField, $attributesLevelName, $objectIdFetcher) {
 1157+ public function __construct($attribute, $permissionController, $isAddField, $attributesLevelName, Fetcher $objectIdFetcher) {
11491158 parent::__construct($attribute, $permissionController, $isAddField);
11501159
11511160 $this->attributesLevelName = $attributesLevelName;
Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php
@@ -30,8 +30,7 @@
3131 $dmModel=new DefinedMeaningModel($definedMeaningId, $this->viewInformation);
3232
3333 $wgOut->addHTML(
34 - getDefinedMeaningEditor(
35 - $this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, $this->shouldShowAuthorities)->view(
 34+ getDefinedMeaningEditor($this->viewInformation)->view(
3635 $this->getIdStack($definedMeaningId),
3736 $dmModel->getRecord()
3837 )
@@ -51,7 +50,7 @@
5251 $dmModel = new DefinedMeaningModel($definedMeaningId, $this->viewInformation);
5352
5453 $wgOut->addHTML(
55 - getDefinedMeaningEditor($this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, false)->edit(
 54+ getDefinedMeaningEditor($this->viewInformation)->edit(
5655 $this->getIdStack($definedMeaningId),
5756 $dmModel->getRecord()
5857 )
@@ -68,7 +67,7 @@
6968 $definedMeaningId = $this->getDefinedMeaningIdFromTitle($wgTitle->getText());
7069 $dmModel=new DefinedMeaningModel($definedMeaningId, $this->viewInformation);
7170 $wgOut->addHTML(
72 - getDefinedMeaningEditor($this->filterLanguageId, $this->possiblySynonymousRelationTypeId, $this->showRecordLifeSpan, false)->view(
 71+ getDefinedMeaningEditor($this->viewInformation)->view(
7372 new IdStack("defined-meaning"),
7473 $dmModel->getRecord()
7574 )
@@ -98,10 +97,10 @@
9998 parent::save($referenceQueryTransactionInformation);
10099 $definedMeaningId = $this->getDefinedMeaningIdFromTitle($wgTitle->getText());
101100
102 - $dmModel =new DefinedMeaningModel($definedMeaningId, $this->viewInformation);
 101+ $dmModel = new DefinedMeaningModel($definedMeaningId, $this->viewInformation);
103102 $definedMeaningId = $this->getDefinedMeaningIdFromTitle($wgTitle->getText());
104103
105 - getDefinedMeaningEditor($this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, false)->save(
 104+ getDefinedMeaningEditor($this->viewInformation)->save(
106105 $this->getIdStack($definedMeaningId),
107106 $dmModel->getRecord()
108107 );
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php
@@ -84,10 +84,13 @@
8585 $classMembershipAttribute = new Attribute(null, $wgClassMembershipAttributeName, $classMembershipStructure);
8686
8787 global
88 - $possiblySynonymousIdAttribute, $possiblySynonymousAttribute, $wgPossibleSynonymAttributeName, $possiblySynonymousStructure, $possiblySynonymousAttribute, $wgPossiblySynonymousAttributeName, $wgPossiblySynonymousAttributeId;
 88+ $possiblySynonymousIdAttribute,
 89+ $possibleSynonymAttribute,
 90+ $wgPossibleSynonymAttributeName, $possiblySynonymousStructure, $possiblySynonymousAttribute,
 91+ $wgPossiblySynonymousAttributeName, $wgPossiblySynonymousAttributeId;
8992
9093 $possiblySynonymousIdAttribute = new Attribute("possibly-synonymous-id", "Possibly synonymous id", "integer");
91 - $possiblySynonymousAttribute = new Attribute("possible-synonym", $wgPossibleSynonymAttributeName, $definedMeaningReferenceStructure);
 94+ $possibleSynonymAttribute = new Attribute("possible-synonym", $wgPossibleSynonymAttributeName, $definedMeaningReferenceStructure);
9295 $possiblySynonymousStructure = new Structure("possibly-synonymous", $possiblySynonymousIdAttribute, $possiblySynonymousAttribute);
9396 $possiblySynonymousAttribute = new Attribute(null, $wgPossiblySynonymousAttributeName, $possiblySynonymousStructure);
9497
Index: trunk/extensions/Wikidata/OmegaWiki/Wikidata.php
@@ -88,8 +88,6 @@
8989
9090 $wgOut->setPageTitle($title);
9191
92 - initializeOmegaWikiAttributes($this->filterLanguageId != 0);
93 - initializeObjectAttributeEditors($this->filterLanguageId, false);
9492 $this->queryTransactionInformation = new QueryLatestTransactionInformation();
9593
9694 $viewInformation = new ViewInformation();
@@ -100,6 +98,9 @@
10199 $viewInformation->queryTransactionInformation = $this->queryTransactionInformation;
102100
103101 $this->viewInformation = $viewInformation;
 102+
 103+ initializeOmegaWikiAttributes($this->filterLanguageId != 0);
 104+ initializeObjectAttributeEditors($viewInformation);
104105 }
105106
106107 protected function getDataSetPanel() {
@@ -125,15 +126,15 @@
126127 }
127128
128129 protected function save($referenceQueryTransactionInformation) {
129 - initializeOmegaWikiAttributes($this->filterLanguageId != 0, false);
130 - initializeObjectAttributeEditors($this->filterLanguageId, false);
131 -
132130 $viewInformation = new ViewInformation();
133131 $viewInformation->filterLanguageId = $this->filterLanguageId;
134132 $viewInformation->possiblySynonymousRelationTypeId = $this->possiblySynonymousRelationTypeId;
135133 $viewInformation->queryTransactionInformation = $referenceQueryTransactionInformation;
136134
137135 $this->viewInformation = $viewInformation;
 136+
 137+ initializeOmegaWikiAttributes($this->filterLanguageId != 0, false);
 138+ initializeObjectAttributeEditors($this->viewInformation);
138139 }
139140
140141 public function saveWithinTransaction() {
@@ -178,9 +179,6 @@
179180 if ($this->showLanguageSelector)
180181 $wgOut->addHTML($this->getLanguageSelector());
181182
182 - initializeOmegaWikiAttributes($this->filterLanguageId != 0, false);
183 - initializeObjectAttributeEditors($this->filterLanguageId, false, false);
184 -
185183 $viewInformation = new ViewInformation();
186184 $viewInformation->filterLanguageId = $this->filterLanguageId;
187185 $viewInformation->possiblySynonymousRelationTypeId = $this->possiblySynonymousRelationTypeId;
@@ -190,6 +188,9 @@
191189
192190 $this->viewInformation = $viewInformation;
193191
 192+ initializeOmegaWikiAttributes($this->filterLanguageId != 0, false);
 193+ initializeObjectAttributeEditors($this->viewInformation);
 194+
194195 return true;
195196 }
196197
@@ -235,17 +236,17 @@
236237 'history'
237238 ));
238239
239 - initializeOmegaWikiAttributes($this->filterLanguageId != 0, true);
240 - initializeObjectAttributeEditors($this->filterLanguageId, $this->showRecordLifeSpan, false);
241 -
242240 $viewInformation = new ViewInformation();
243241 $viewInformation->filterLanguageId = $this->filterLanguageId;
244242 $viewInformation->possiblySynonymousRelationTypeId = $this->possiblySynonymousRelationTypeId;
245243 $viewInformation->showRecordLifeSpan = $this->showRecordLifeSpan;
246 - $viewInformation->showAuthority = $this->shouldShowAuthorities;
 244+ $viewInformation->showAuthority = false;
247245 $viewInformation->queryTransactionInformation = $this->queryTransactionInformation;
248246
249247 $this->viewInformation = $viewInformation;
 248+
 249+ initializeOmegaWikiAttributes($this->filterLanguageId != 0, true);
 250+ initializeObjectAttributeEditors($viewInformation);
250251 }
251252
252253 protected function outputEditHeader() {
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php
@@ -6,9 +6,9 @@
77 require_once('Fetcher.php');
88 require_once('WikiDataGlobals.php');
99 require_once('GotoSourceTemplate.php');
 10+require_once('ViewInformation.php');
1011
11 -function initializeObjectAttributeEditors($filterLanguageId, $showRecordLifeSpan) {
12 - $showAuthority=false;
 12+function initializeObjectAttributeEditors(ViewInformation $viewInformation) {
1313 global
1414 $objectAttributesAttribute, $definedMeaningAttributesAttribute,
1515 $definedMeaningObjectAttributesEditor, $definedMeaningIdAttribute,
@@ -34,18 +34,18 @@
3535 $translatedTextValueObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5);
3636 $optionValueObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5);
3737
38 - setObjectAttributesEditor($definedMeaningObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $definedMeaningIdAttribute), $definedMeaningMeaningName, new ObjectIdFetcher(0, $definedMeaningIdAttribute));
39 - setObjectAttributesEditor($definitionObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new DefinitionObjectIdFetcher(0, $definedMeaningIdAttribute), $definitionMeaningName, new ObjectIdFetcher(0, $definedMeaningIdAttribute));
40 - setObjectAttributesEditor($synonymsAndTranslationsObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $syntransIdAttribute), $synTransMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
41 - setObjectAttributesEditor($possiblySynonymousObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $possiblySynonymousIdAttribute), $relationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
42 - setObjectAttributesEditor($relationsObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $relationIdAttribute), $relationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
43 - setObjectAttributesEditor($textValueObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $textAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
44 - setObjectAttributesEditor($urlValueObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $textAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
45 - setObjectAttributesEditor($translatedTextValueObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $translatedTextAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
46 - setObjectAttributesEditor($optionValueObjectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, new ObjectIdFetcher(0, $optionAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 38+ setObjectAttributesEditor($definedMeaningObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $definedMeaningIdAttribute), $definedMeaningMeaningName, new ObjectIdFetcher(0, $definedMeaningIdAttribute));
 39+ setObjectAttributesEditor($definitionObjectAttributesEditor, $viewInformation, new DefinitionObjectIdFetcher(0, $definedMeaningIdAttribute), $definitionMeaningName, new ObjectIdFetcher(0, $definedMeaningIdAttribute));
 40+ setObjectAttributesEditor($synonymsAndTranslationsObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $syntransIdAttribute), $synTransMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 41+ setObjectAttributesEditor($possiblySynonymousObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $possiblySynonymousIdAttribute), $relationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 42+ setObjectAttributesEditor($relationsObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $relationIdAttribute), $relationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 43+ setObjectAttributesEditor($textValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $textAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 44+ setObjectAttributesEditor($urlValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $textAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 45+ setObjectAttributesEditor($translatedTextValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $translatedTextAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
 46+ setObjectAttributesEditor($optionValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $optionAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute));
4747 }
4848
49 -function getTransactionEditor($attribute) {
 49+function getTransactionEditor(Attribute $attribute) {
5050 global
5151 $userAttribute, $timestampAttribute;
5252
@@ -56,7 +56,7 @@
5757 return $transactionEditor;
5858 }
5959
60 -function createTableLifeSpanEditor($attribute) {
 60+function createTableLifeSpanEditor(Attribute $attribute) {
6161 global
6262 $addTransactionAttribute, $removeTransactionAttribute;
6363
@@ -67,7 +67,7 @@
6868 return $result;
6969 }
7070
71 -function addTableLifeSpanEditor($editor, $showRecordLifeSpan) {
 71+function addTableLifeSpanEditor(Editor $editor, $showRecordLifeSpan) {
7272 global
7373 $recordLifeSpanAttribute, $addTransactionAttribute, $removeTransactionAttribute, $wgRequest;
7474
@@ -75,7 +75,7 @@
7676 $editor->addEditor(createTableLifeSpanEditor($recordLifeSpanAttribute));
7777 }
7878
79 -function addTableAuthorityEditor($editor, $showAuthority) {
 79+function addTableAuthorityEditor(Editor $editor, $showAuthority) {
8080 global
8181 $authorityAttribute;
8282
@@ -83,38 +83,38 @@
8484 $editor->addEditor(createShortTextViewer($authorityAttribute));
8585 }
8686
87 -function addTableMetadataEditors($editor, $showRecordLifeSpan) {
88 - addTableLifeSpanEditor($editor, $showRecordLifeSpan);
 87+function addTableMetadataEditors($editor, ViewInformation $viewInformation) {
 88+ addTableLifeSpanEditor($editor, $viewInformation->showRecordLifeSpan);
8989 }
9090
91 -function getDefinitionEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority) {
 91+function getDefinitionEditor(ViewInformation $viewInformation) {
9292 global
9393 $definitionAttribute, $translatedTextAttribute, $definitionObjectAttributesEditor, $wgPopupAnnotationName;
9494
95 - if ($filterLanguageId == 0)
 95+ if ($viewInformation->filterLanguageId == 0)
9696 $controller = new DefinedMeaningDefinitionController();
9797 else
98 - $controller = new DefinedMeaningFilteredDefinitionController($filterLanguageId);
 98+ $controller = new DefinedMeaningFilteredDefinitionController($viewInformation->filterLanguageId);
9999
100100 $editor = new RecordDivListEditor($definitionAttribute);
101 - $editor->addEditor(getTranslatedTextEditor($translatedTextAttribute, $controller, $filterLanguageId, $showRecordLifeSpan));
 101+ $editor->addEditor(getTranslatedTextEditor($translatedTextAttribute, $controller, $viewInformation));
102102 $editor->addEditor(new PopUpEditor($definitionObjectAttributesEditor, $wgPopupAnnotationName));
103103
104104 return $editor;
105105 }
106106
107 -function getTranslatedTextEditor($attribute, $controller, $filterLanguageId, $showRecordLifeSpan) {
 107+function getTranslatedTextEditor(Attribute $attribute, UpdateController $controller, ViewInformation $viewInformation) {
108108 global
109109 $languageAttribute, $textAttribute;
110110
111 - if ($filterLanguageId == 0 || $showRecordLifeSpan) {
 111+ if ($viewInformation->filterLanguageId == 0 || $viewInformation->showRecordLifeSpan) {
112112 $editor = new RecordSetTableEditor($attribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, true, $controller);
113113
114 - if ($filterLanguageId == 0)
 114+ if ($viewInformation->filterLanguageId == 0)
115115 $editor->addEditor(new LanguageEditor($languageAttribute, new SimplePermissionController(false), true));
116116
117117 $editor->addEditor(new TextEditor($textAttribute, new SimplePermissionController(true), true));
118 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 118+ addTableMetadataEditors($editor, $viewInformation);
119119 }
120120 else
121121 $editor = new TextEditor($attribute, new SimplePermissionController(true), true, false, 0, $controller);
@@ -122,36 +122,45 @@
123123 return $editor;
124124 }
125125
126 -function setObjectAttributesEditor($objectAttributesEditor, $filterLanguageId, $showRecordLifeSpan, $showAuthority, $objectIdFetcher, $levelDefinedMeaningName, $dmObjectIdFetcher) {
127 - $objectAttributesEditor->addEditor(getTextAttributeValuesEditor($showRecordLifeSpan, $showAuthority, new TextAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher));
128 - $objectAttributesEditor->addEditor(getTranslatedTextAttributeValuesEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority, new TranslatedTextAttributeValuesController($objectIdFetcher, $filterLanguageId), $levelDefinedMeaningName, $dmObjectIdFetcher));
129 - $objectAttributesEditor->addEditor(getURLAttributeValuesEditor($showRecordLifeSpan, $showAuthority, new URLAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher));
130 - $objectAttributesEditor->addEditor(getOptionAttributeValuesEditor($showRecordLifeSpan, $showAuthority, new OptionAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher));
 126+function setObjectAttributesEditor(Editor $objectAttributesEditor, ViewInformation $viewInformation, Fetcher $objectIdFetcher, $levelDefinedMeaningName, Fetcher $dmObjectIdFetcher) {
 127+ $objectAttributesEditor->addEditor(getTextAttributeValuesEditor($viewInformation, new TextAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher));
 128+ $objectAttributesEditor->addEditor(getTranslatedTextAttributeValuesEditor($viewInformation, new TranslatedTextAttributeValuesController($objectIdFetcher, $viewInformation->filterLanguageId), $levelDefinedMeaningName, $dmObjectIdFetcher));
 129+ $objectAttributesEditor->addEditor(getURLAttributeValuesEditor($viewInformation, new URLAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher));
 130+ $objectAttributesEditor->addEditor(getOptionAttributeValuesEditor($viewInformation, new OptionAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher));
131131 }
132132
133 -function getAlternativeDefinitionsEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority) {
 133+function getAlternativeDefinitionsEditor(ViewInformation $viewInformation) {
134134 global
135135 $alternativeDefinitionsAttribute, $alternativeDefinitionAttribute, $sourceAttribute;
136136
137 - if ($filterLanguageId == 0)
 137+ if ($viewInformation->filterLanguageId == 0)
138138 $alternativeDefinitionController = new DefinedMeaningAlternativeDefinitionController();
139139 else
140 - $alternativeDefinitionController = new DefinedMeaningFilteredAlternativeDefinitionController($filterLanguageId);
 140+ $alternativeDefinitionController = new DefinedMeaningFilteredAlternativeDefinitionController($viewInformation);
141141
142 - $editor = new RecordSetTableEditor($alternativeDefinitionsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningAlternativeDefinitionsController($filterLanguageId));
143 - $editor->addEditor(getTranslatedTextEditor($alternativeDefinitionAttribute, $alternativeDefinitionController, $filterLanguageId, $showRecordLifeSpan));
 142+ $editor = new RecordSetTableEditor(
 143+ $alternativeDefinitionsAttribute,
 144+ new SimplePermissionController(true),
 145+ new ShowEditFieldChecker(true),
 146+ new AllowAddController(true),
 147+ true,
 148+ false,
 149+ new DefinedMeaningAlternativeDefinitionsController($viewInformation->filterLanguageId)
 150+ );
 151+
 152+ $editor->addEditor(getTranslatedTextEditor($alternativeDefinitionAttribute, $alternativeDefinitionController, $viewInformation));
144153 $editor->addEditor(new DefinedMeaningReferenceEditor($sourceAttribute, new SimplePermissionController(false), true));
145154
146 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 155+ addTableMetadataEditors($editor, $viewInformation);
147156
148157 return $editor;
149158 }
150159
151 -function getExpressionTableCellEditor($attribute, $filterLanguageId) {
 160+function getExpressionTableCellEditor(Attribute $attribute, ViewInformation $viewInformation) {
152161 global
153162 $languageAttribute, $spellingAttribute;
154163
155 - if ($filterLanguageId == 0) {
 164+ if ($viewInformation->filterLanguageId == 0) {
156165 $editor = new RecordTableCellEditor($attribute);
157166 $editor->addEditor(new LanguageEditor($languageAttribute, new SimplePermissionController(false), true));
158167 $editor->addEditor(new SpellingEditor($spellingAttribute, new SimplePermissionController(false), true));
@@ -162,7 +171,7 @@
163172 return $editor;
164173 }
165174
166 -function getClassAttributesEditor($showRecordLifeSpan, $showAuthority) {
 175+function getClassAttributesEditor(ViewInformation $viewInformation) {
167176 global
168177 $definedMeaningIdAttribute, $classAttributesAttribute, $classAttributeLevelAttribute, $classAttributeAttributeAttribute, $classAttributeTypeAttribute;
169178
@@ -172,27 +181,36 @@
173182 $tableEditor->addEditor(new ClassAttributesTypeEditor($classAttributeTypeAttribute, new SimplePermissionController(false), true));
174183 $tableEditor->addEditor(new PopupEditor(getOptionAttributeOptionsEditor(), 'Options'));
175184
176 - addTableMetadataEditors($tableEditor, $showRecordLifeSpan);
 185+ addTableMetadataEditors($tableEditor, $viewInformation);
177186
178187 return $tableEditor;
179188 }
180189
181 -function getSynonymsAndTranslationsEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority) {
 190+function getSynonymsAndTranslationsEditor(ViewInformation $viewInformation) {
182191 global
183192 $synonymsAndTranslationsAttribute, $identicalMeaningAttribute, $expressionIdAttribute,
184193 $expressionAttribute, $synonymsAndTranslationsObjectAttributesEditor, $wgPopupAnnotationName;
185194
186 - $tableEditor = new RecordSetTableEditor($synonymsAndTranslationsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new SynonymTranslationController($filterLanguageId));
187 - $tableEditor->addEditor(getExpressionTableCellEditor($expressionAttribute, $filterLanguageId));
 195+ $tableEditor = new RecordSetTableEditor(
 196+ $synonymsAndTranslationsAttribute,
 197+ new SimplePermissionController(true),
 198+ new ShowEditFieldChecker(true),
 199+ new AllowAddController(true),
 200+ true,
 201+ false,
 202+ new SynonymTranslationController($viewInformation->filterLanguageId)
 203+ );
 204+
 205+ $tableEditor->addEditor(getExpressionTableCellEditor($expressionAttribute, $viewInformation));
188206 $tableEditor->addEditor(new BooleanEditor($identicalMeaningAttribute, new SimplePermissionController(true), true, true));
189207 $tableEditor->addEditor(new PopUpEditor($synonymsAndTranslationsObjectAttributesEditor, $wgPopupAnnotationName));
190208
191 - addTableMetadataEditors($tableEditor, $showRecordLifeSpan);
 209+ addTableMetadataEditors($tableEditor, $viewInformation);
192210
193211 return $tableEditor;
194212 }
195213
196 -function getDefinedMeaningRelationsEditor($showRecordLifeSpan, $showAuthority) {
 214+function getDefinedMeaningRelationsEditor(ViewInformation $viewInformation) {
197215 global
198216 $relationsAttribute, $relationTypeAttribute, $otherDefinedMeaningAttribute,
199217 $relationsObjectAttributesEditor, $wgPopupAnnotationName;
@@ -202,12 +220,12 @@
203221 $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true));
204222 $editor->addEditor(new PopUpEditor($relationsObjectAttributesEditor, $wgPopupAnnotationName));
205223
206 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 224+ addTableMetadataEditors($editor, $viewInformation);
207225
208226 return $editor;
209227 }
210228
211 -function getDefinedMeaningReciprocalRelationsEditor($showRecordLifeSpan, $showAuthority) {
 229+function getDefinedMeaningReciprocalRelationsEditor(ViewInformation $viewInformation) {
212230 global
213231 $reciprocalRelationsAttribute, $relationTypeAttribute, $otherDefinedMeaningAttribute,
214232 $relationsObjectAttributesEditor, $wgPopupAnnotationName;
@@ -217,24 +235,24 @@
218236 $editor->addEditor(new RelationTypeReferenceEditor($relationTypeAttribute, new SimplePermissionController(false), true));
219237 $editor->addEditor(new PopUpEditor($relationsObjectAttributesEditor, $wgPopupAnnotationName));
220238
221 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 239+ addTableMetadataEditors($editor, $viewInformation);
222240
223241 return $editor;
224242 }
225243
226 -function getDefinedMeaningClassMembershipEditor($showRecordLifeSpan, $showAuthority) {
 244+function getDefinedMeaningClassMembershipEditor(ViewInformation $viewInformation) {
227245 global
228246 $classMembershipAttribute, $classAttribute;
229247
230248 $editor = new RecordSetTableEditor($classMembershipAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningClassMembershipController());
231249 $editor->addEditor(new ClassReferenceEditor($classAttribute, new SimplePermissionController(false), true));
232250
233 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 251+ addTableMetadataEditors($editor, $viewInformation);
234252
235253 return $editor;
236254 }
237255
238 -function getGroupedRelationTypeEditor($groupedRelationsAttribute, $groupedRelationIdAttribute, $otherDefinedMeaningAttribute, $relationTypeId, $showRecordLifeSpan, $showAuthority, $objectAttributesEditor) {
 256+function getGroupedRelationTypeEditor(Attribute $groupedRelationsAttribute, Attribute $groupedRelationIdAttribute, Attribute $otherDefinedMeaningAttribute, $relationTypeId, ViewInformation $viewInformation, Editor $objectAttributesEditor) {
239257 global
240258 $wgPopupAnnotationName;
241259
@@ -253,12 +271,12 @@
254272 if ($objectAttributesEditor != null)
255273 $editor->addEditor(new PopUpEditor($objectAttributesEditor, $wgPopupAnnotationName));
256274
257 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 275+ addTableMetadataEditors($editor, $viewInformation);
258276
259277 return $editor;
260278 }
261279
262 -function getDefinedMeaningCollectionMembershipEditor($showRecordLifeSpan, $showAuthority) {
 280+function getDefinedMeaningCollectionMembershipEditor(ViewInformation $viewInformation) {
263281 global
264282 $collectionMembershipAttribute, $collectionMeaningAttribute, $sourceIdentifierAttribute,
265283 $gotoSourceAttribute, $wgGotoSourceTemplates;
@@ -270,12 +288,12 @@
271289 if (count($wgGotoSourceTemplates) > 0)
272290 $editor->addEditor(new GotoSourceEditor($gotoSourceAttribute, new SimplePermissionController(true), true));
273291
274 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 292+ addTableMetadataEditors($editor, $viewInformation);
275293
276294 return $editor;
277295 }
278296
279 -function getTextAttributeValuesEditor($showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) {
 297+function getTextAttributeValuesEditor(ViewInformation $viewInformation, $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
280298 global
281299 $textAttributeAttribute, $textAttribute, $textAttributeValuesAttribute, $textValueObjectAttributesEditor,
282300 $wgPopupAnnotationName;
@@ -285,12 +303,12 @@
286304 $editor->addEditor(new TextEditor($textAttribute, new SimplePermissionController(true), true));
287305 $editor->addEditor(new PopUpEditor($textValueObjectAttributesEditor, $wgPopupAnnotationName));
288306
289 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 307+ addTableMetadataEditors($editor, $viewInformation);
290308
291309 return $editor;
292310 }
293311
294 -function getURLAttributeValuesEditor($showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) {
 312+function getURLAttributeValuesEditor(ViewInformation $viewInformation, UpdateController $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
295313 global
296314 $urlAttributeAttribute, $urlAttribute, $urlAttributeValuesAttribute, $urlValueObjectAttributesEditor,
297315 $wgPopupAnnotationName;
@@ -300,32 +318,32 @@
301319 $editor->addEditor(new URLEditor($urlAttribute, new SimplePermissionController(true), true));
302320 $editor->addEditor(new PopUpEditor($urlValueObjectAttributesEditor, $wgPopupAnnotationName));
303321
304 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 322+ addTableMetadataEditors($editor, $viewInformation);
305323
306324 return $editor;
307325 }
308326
309 -function getTranslatedTextAttributeValuesEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) {
 327+function getTranslatedTextAttributeValuesEditor(ViewInformation $viewInformation, UpdateController $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
310328 global
311329 $translatedTextAttributeAttribute, $translatedTextValueAttribute, $translatedTextAttributeValuesAttribute,
312330 $translatedTextValueObjectAttributesEditor, $wgPopupAnnotationName;
313331
314 - if ($filterLanguageId == 0)
 332+ if ($viewInformation->filterLanguageId == 0)
315333 $translatedTextAttributeValueController = new TranslatedTextAttributeValueController();
316334 else
317 - $translatedTextAttributeValueController = new FilteredTranslatedTextAttributeValueController($filterLanguageId);
 335+ $translatedTextAttributeValueController = new FilteredTranslatedTextAttributeValueController($viewInformation->filterLanguageId);
318336
319337 $editor = new RecordSetTableEditor($translatedTextAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller);
320338 $editor->addEditor(new TranslatedTextAttributeEditor($translatedTextAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher));
321 - $editor->addEditor(getTranslatedTextEditor($translatedTextValueAttribute, $translatedTextAttributeValueController, $filterLanguageId, $showRecordLifeSpan));
 339+ $editor->addEditor(getTranslatedTextEditor($translatedTextValueAttribute, $translatedTextAttributeValueController, $viewInformation));
322340 $editor->addEditor(new PopUpEditor($translatedTextValueObjectAttributesEditor, $wgPopupAnnotationName));
323341
324 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 342+ addTableMetadataEditors($editor, $viewInformation);
325343
326344 return $editor;
327345 }
328346
329 -function getOptionAttributeValuesEditor($showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) {
 347+function getOptionAttributeValuesEditor(ViewInformation $viewInformation, UpdateController $controller, $levelDefinedMeaningName, Fetcher $objectIdFetcher) {
330348 global
331349 $optionAttributeAttribute, $optionAttributeOptionAttribute, $optionAttributeValuesAttribute,
332350 $optionValueObjectAttributesEditor, $wgPopupAnnotationName;
@@ -336,7 +354,7 @@
337355 $editor->addEditor(new OptionSelectEditor($optionAttributeOptionAttribute, new SimplePermissionController(false), true));
338356 $editor->addEditor(new PopUpEditor($optionValueObjectAttributesEditor, $wgPopupAnnotationName));
339357
340 - addTableMetadataEditors($editor, $showRecordLifeSpan);
 358+ addTableMetadataEditors($editor, $viewInformation);
341359
342360 return $editor;
343361 }
@@ -352,39 +370,49 @@
353371 return $editor;
354372 }
355373
356 -function getExpressionMeaningsEditor($attribute, $allowAdd, $filterLanguageId, $possiblySynonymousRelationTypeId, $showRecordLifeSpan, $showAuthority) {
 374+function getExpressionMeaningsEditor(Attribute $attribute, $allowAdd, ViewInformation $viewInformation) {
357375 global
358376 $definedMeaningIdAttribute;
359377
360 - $definedMeaningEditor = getDefinedMeaningEditor($filterLanguageId, $possiblySynonymousRelationTypeId, $showRecordLifeSpan, $showAuthority);
 378+ $definedMeaningEditor = getDefinedMeaningEditor($viewInformation);
361379
362380 $definedMeaningCaptionEditor = new DefinedMeaningHeaderEditor($definedMeaningIdAttribute, new SimplePermissionController(false), true, 75);
363381 $definedMeaningCaptionEditor->setAddText("New exact meaning");
364382
365 - $expressionMeaningsEditor = new RecordSetListEditor($attribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController($allowAdd), false, $allowAdd, new ExpressionMeaningController($filterLanguageId), 3, false);
 383+ $expressionMeaningsEditor = new RecordSetListEditor($attribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController($allowAdd), false, $allowAdd, new ExpressionMeaningController($viewInformation->filterLanguageId), 3, false);
366384 $expressionMeaningsEditor->setCaptionEditor($definedMeaningCaptionEditor);
367385 $expressionMeaningsEditor->setValueEditor($definedMeaningEditor);
368386
369387 return $expressionMeaningsEditor;
370388 }
371389
372 -function getExpressionsEditor($spelling, $filterLanguageId, $possiblySynonymousRelationTypeId, $showRecordLifeSpan, $showAuthority) {
 390+function getExpressionsEditor($spelling, ViewInformation $viewInformation) {
373391 global
374392 $expressionMeaningsAttribute, $expressionExactMeaningsAttribute, $expressionApproximateMeaningsAttribute, $expressionAttribute, $languageAttribute, $expressionsAttribute;
375393
376394 $expressionMeaningsRecordEditor = new RecordUnorderedListEditor($expressionMeaningsAttribute, 3);
377395
378 - $exactMeaningsEditor = getExpressionMeaningsEditor($expressionExactMeaningsAttribute, true, $filterLanguageId, $possiblySynonymousRelationTypeId, $showRecordLifeSpan, $showAuthority);
 396+ $exactMeaningsEditor = getExpressionMeaningsEditor($expressionExactMeaningsAttribute, true, $viewInformation);
379397 $expressionMeaningsRecordEditor->addEditor($exactMeaningsEditor);
380 - $expressionMeaningsRecordEditor->addEditor(getExpressionMeaningsEditor($expressionApproximateMeaningsAttribute, false, $filterLanguageId, $possiblySynonymousRelationTypeId, $showRecordLifeSpan, $showAuthority));
 398+ $expressionMeaningsRecordEditor->addEditor(getExpressionMeaningsEditor($expressionApproximateMeaningsAttribute, false, $viewInformation));
381399
382400 $expressionMeaningsRecordEditor->expandEditor($exactMeaningsEditor);
383401
384 - if ($filterLanguageId == 0) {
 402+ if ($viewInformation->filterLanguageId == 0) {
385403 $expressionEditor = new RecordSpanEditor($expressionAttribute, ': ', ' - ');
386404 $expressionEditor->addEditor(new LanguageEditor($languageAttribute, new SimplePermissionController(false), true));
387405
388 - $expressionsEditor = new RecordSetListEditor($expressionsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), false, false, new ExpressionController($spelling, $filterLanguageId), 2, true);
 406+ $expressionsEditor = new RecordSetListEditor(
 407+ $expressionsAttribute,
 408+ new SimplePermissionController(true),
 409+ new ShowEditFieldChecker(true),
 410+ new AllowAddController(true),
 411+ false,
 412+ false,
 413+ new ExpressionController($spelling, $viewInformation->filterLanguageId),
 414+ 2,
 415+ true
 416+ );
389417 $expressionsEditor->setCaptionEditor($expressionEditor);
390418 $expressionsEditor->setValueEditor($expressionMeaningsRecordEditor);
391419 }
@@ -392,7 +420,15 @@
393421 $expressionEditor = new RecordSubRecordEditor($expressionAttribute);
394422 $expressionEditor->setSubRecordEditor($expressionMeaningsRecordEditor);
395423
396 - $expressionsEditor = new RecordSetFirstRecordEditor($expressionsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), false, false, new ExpressionController($spelling, $filterLanguageId));
 424+ $expressionsEditor = new RecordSetFirstRecordEditor(
 425+ $expressionsAttribute,
 426+ new SimplePermissionController(true),
 427+ new ShowEditFieldChecker(true),
 428+ new AllowAddController(true),
 429+ false,
 430+ false,
 431+ new ExpressionController($spelling, $viewInformation->filterLanguageId)
 432+ );
397433 $expressionsEditor->setRecordEditor($expressionEditor);
398434 }
399435
@@ -413,27 +449,27 @@
414450 }
415451 }
416452
417 -function getDefinedMeaningEditor($filterLanguageId, $possiblySynonymousRelationTypeId, $showRecordLifeSpan, $showAuthority) {
 453+function getDefinedMeaningEditor(ViewInformation $viewInformation) {
418454 global
419455 $wdDefinedMeaningAttributesOrder,
420456 $definedMeaningAttribute, $possiblySynonymousIdAttribute, $possiblySynonymousAttribute,
421457 $possibleSynonymAttribute, $definedMeaningObjectAttributesEditor, $possiblySynonymousObjectAttributesEditor;
422458
423 - $definitionEditor = getDefinitionEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority);
424 - $alternativeDefinitionsEditor = getAlternativeDefinitionsEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority);
425 - $classAttributesEditor = getClassAttributesEditor($showRecordLifeSpan, $showAuthority);
426 - $synonymsAndTranslationsEditor = getSynonymsAndTranslationsEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority);
427 - $relationsEditor = getDefinedMeaningRelationsEditor($showRecordLifeSpan, $showAuthority);
428 - $reciprocalRelationsEditor = getDefinedMeaningReciprocalRelationsEditor($showRecordLifeSpan, $showAuthority);
429 - $classMembershipEditor = getDefinedMeaningClassMembershipEditor($showRecordLifeSpan, $showAuthority);
430 - $collectionMembershipEditor = getDefinedMeaningCollectionMembershipEditor($showRecordLifeSpan, $showAuthority);
 459+ $definitionEditor = getDefinitionEditor($viewInformation);
 460+ $alternativeDefinitionsEditor = getAlternativeDefinitionsEditor($viewInformation);
 461+ $classAttributesEditor = getClassAttributesEditor($viewInformation);
 462+ $synonymsAndTranslationsEditor = getSynonymsAndTranslationsEditor($viewInformation);
 463+ $relationsEditor = getDefinedMeaningRelationsEditor($viewInformation);
 464+ $reciprocalRelationsEditor = getDefinedMeaningReciprocalRelationsEditor($viewInformation);
 465+ $classMembershipEditor = getDefinedMeaningClassMembershipEditor($viewInformation);
 466+ $collectionMembershipEditor = getDefinedMeaningCollectionMembershipEditor($viewInformation);
 467+
431468 $possiblySynonymousEditor = getGroupedRelationTypeEditor(
432469 $possiblySynonymousAttribute,
433470 $possiblySynonymousIdAttribute,
434471 $possibleSynonymAttribute,
435 - $possiblySynonymousRelationTypeId,
436 - $showRecordLifeSpan,
437 - $showAuthority,
 472+ $viewInformation->possiblySynonymousRelationTypeId,
 473+ $viewInformation,
438474 $possiblySynonymousObjectAttributesEditor
439475 );
440476
@@ -448,7 +484,7 @@
449485 $availableEditors->addEditor($collectionMembershipEditor);
450486 $availableEditors->addEditor($definedMeaningObjectAttributesEditor);
451487
452 - if ($possiblySynonymousRelationTypeId != 0)
 488+ if ($viewInformation->possiblySynonymousRelationTypeId != 0)
453489 $availableEditors->addEditor($possiblySynonymousEditor);
454490
455491 $definedMeaningEditor = new RecordUnorderedListEditor($definedMeaningAttribute, 4);
@@ -467,7 +503,15 @@
468504 }
469505
470506 function createTableViewer($attribute) {
471 - return new RecordSetTableEditor($attribute, new SimplePermissionController(false), new ShowEditFieldChecker(true), new AllowAddController(false), false, false, null);
 507+ return new RecordSetTableEditor(
 508+ $attribute,
 509+ new SimplePermissionController(false),
 510+ new ShowEditFieldChecker(true),
 511+ new AllowAddController(false),
 512+ false,
 513+ false,
 514+ null
 515+ );
472516 }
473517
474518 function createLanguageViewer($attribute) {
@@ -498,6 +542,7 @@
499543
500544 function createSuggestionsTableViewer($attribute) {
501545 $result = createTableViewer($attribute);
 546+ $result->setHideEmptyColumns(false);
502547 $result->setRowHTMLAttributes(array(
503548 "class" => "suggestion-row",
504549 "onclick" => "suggestRowClicked(event, this)",
@@ -523,3 +568,4 @@
524569 return $result;
525570 }
526571
 572+?>
\ No newline at end of file

Status & tagging log