r23048 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23047‎ | r23048 | r23049 >
Date:16:12, 17 June 2007
Author:erik
Status:old
Tags:
Comment:
fix DM save
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Record.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php
@@ -117,21 +117,6 @@
118118 $wgTitle;
119119
120120 parent::save($referenceTransaction);
121 -
122 -/* $definedMeaningId = $this->getDefinedMeaningIdFromTitle($wgTitle->getText());
123 - getDefinedMeaningEditor($this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, false)->save(
124 - $this->getIdStack($definedMeaningId),
125 - getDefinedMeaningRecord(
126 - $definedMeaningId,
127 - $this->filterLanguageId,
128 - $this->possiblySynonymousRelationTypeId,
129 - $referenceTransaction
130 - )
131 - );*/
132 -
133 - global
134 - $wgTitle;
135 -
136121 $definedMeaningId = $this->getDefinedMeaningIdFromTitle($wgTitle->getText());
137122
138123 $dmModel=new DefinedMeaningModel(
@@ -141,6 +126,12 @@
142127 $referenceTransaction
143128 );
144129
 130+ $definedMeaningId = $this->getDefinedMeaningIdFromTitle($wgTitle->getText());
 131+ getDefinedMeaningEditor($this->filterLanguageId, $this->possiblySynonymousRelationTypeId, false, false)->save(
 132+ $this->getIdStack($definedMeaningId),
 133+ $dmModel->getRecord()
 134+ );
 135+
145136 }
146137
147138 protected function getIdStack($definedMeaningId) {
Index: trunk/extensions/Wikidata/OmegaWiki/Record.php
@@ -128,6 +128,7 @@
129129 foreach ($structure->getAttributes() as $attribute) {
130130 $type = $attribute->type;
131131 $value = $record->getAttributeValue($attribute);
 132+
132133 if ($type instanceof Structure)
133134 $result->setAttributeValue($attribute, project($record, $type->getStructure()));
134135 else

Status & tagging log