r23957 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23956‎ | r23957 | r23958 >
Date:14:14, 10 July 2007
Author:proes
Status:old
Tags:
Comment:
Solved bug when editing through property to column filters.
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php
@@ -90,14 +90,11 @@
9191 return $editor;
9292 }
9393
94 -function addPropertyToColumnFilterEditors(Editor $editor, ViewInformation $viewInformation, $levelsFromDefinedMeaning, $levelName) {
95 - global
96 - $definedMeaningIdAttribute;
97 -
 94+function addPropertyToColumnFilterEditors(Editor $editor, ViewInformation $viewInformation, Attribute $idAttribute, $levelsFromDefinedMeaning, $levelName) {
9895 foreach ($viewInformation->getPropertyToColumnFilters() as $propertyToColumnFilter) {
9996 $attribute = $propertyToColumnFilter->getAttribute();
10097 $editor->addEditor(new PopUpEditor(
101 - createObjectAttributesEditor($viewInformation, $attribute, $definedMeaningIdAttribute, $levelsFromDefinedMeaning, $levelName),
 98+ createObjectAttributesEditor($viewInformation, $attribute, $idAttribute, $levelsFromDefinedMeaning, $levelName),
10299 $attribute->name
103100 ));
104101 }
@@ -239,7 +236,7 @@
240237 $tableEditor->addEditor(getExpressionTableCellEditor($expressionAttribute, $viewInformation));
241238 $tableEditor->addEditor(new BooleanEditor($identicalMeaningAttribute, new SimplePermissionController(true), true, true));
242239
243 - addPropertyToColumnFilterEditors($tableEditor, $viewInformation, 1, $synTransMeaningName);
 240+ addPropertyToColumnFilterEditors($tableEditor, $viewInformation, $syntransIdAttribute, 1, $synTransMeaningName);
244241
245242 $tableEditor->addEditor(new PopUpEditor(
246243 createObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $syntransIdAttribute, 1, $synTransMeaningName),
@@ -260,7 +257,7 @@
261258 $editor->addEditor(new RelationTypeReferenceEditor($relationTypeAttribute, new SimplePermissionController(false), true));
262259 $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true));
263260
264 - addPropertyToColumnFilterEditors($editor, $viewInformation, 1, $relationMeaningName);
 261+ addPropertyToColumnFilterEditors($editor, $viewInformation, $relationIdAttribute, 1, $relationMeaningName);
265262
266263 $editor->addEditor(new PopUpEditor(
267264 createObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $relationIdAttribute, 1, $relationMeaningName),
@@ -281,7 +278,7 @@
282279 $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true));
283280 $editor->addEditor(new RelationTypeReferenceEditor($relationTypeAttribute, new SimplePermissionController(false), true));
284281
285 - addPropertyToColumnFilterEditors($editor, $viewInformation, 1, $relationMeaningName);
 282+ addPropertyToColumnFilterEditors($editor, $viewInformation, $relationIdAttribute, 1, $relationMeaningName);
286283
287284 $editor->addEditor(new PopUpEditor(
288285 createObjectAttributesEditor($viewInformation, $objectAttributesAttribute, $relationIdAttribute, 1, $relationMeaningName),

Status & tagging log