Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php |
— | — | @@ -394,6 +394,8 @@ |
395 | 395 | $t->expressionId, |
396 | 396 | $t->language |
397 | 397 | ); |
| 398 | + #try this |
| 399 | + $t->definedMeaningCompleteDefiningExpressionStructure->setStructureType("expression"); |
398 | 400 | $t->definedMeaningCompleteDefiningExpression=new Attribute(null, "Defining expression", $t->definedMeaningCompleteDefiningExpressionStructure); |
399 | 401 | global |
400 | 402 | $definedMeaningReferenceType; |
Index: trunk/extensions/Wikidata/OmegaWiki/RecordHelper.php |
— | — | @@ -63,6 +63,7 @@ |
64 | 64 | abstract class Helper { |
65 | 65 | protected $record; |
66 | 66 | protected $saved; |
| 67 | + protected $UUID; |
67 | 68 | public function __construct($record) { |
68 | 69 | $this->record=$record; |
69 | 70 | } |
— | — | @@ -71,7 +72,7 @@ |
72 | 73 | return $this->saved; |
73 | 74 | } |
74 | 75 | |
75 | | - public function setSaved($saved) { |
| 76 | + public function setSaved($saved=True) { |
76 | 77 | $this->saved=$saved; |
77 | 78 | } |
78 | 79 | |
— | — | @@ -91,8 +92,17 @@ |
92 | 93 | $sql=$this->getSaveSQL(); |
93 | 94 | $dbr = &wfGetDB(DB_MASTER); |
94 | 95 | $dbr->query($sql); |
| 96 | + $self->setSaved(); |
95 | 97 | } |
96 | 98 | |
| 99 | + public function setUUID($UUID) { |
| 100 | + $this->UUID=$UUID; |
| 101 | + } |
| 102 | + |
| 103 | + public function getUUID($UUID) { |
| 104 | + return $this->UUID; |
| 105 | + } |
| 106 | + |
97 | 107 | } |
98 | 108 | |
99 | 109 | class DefinitionHelper extends Helper { |
— | — | @@ -135,6 +145,14 @@ |
136 | 146 | public function save() { |
137 | 147 | |
138 | 148 | } |
| 149 | + |
| 150 | + public function getUUID() { |
| 151 | + if (is_null($this->UUID)) { |
| 152 | + /* and now magic happens ... except wait, this is a recordset... |
| 153 | + * where magical things, don't happen, very often. :-(*/ |
| 154 | + } |
| 155 | + return $this->UUID; |
| 156 | + } |
139 | 157 | } |
140 | 158 | |
141 | 159 | |
Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaningModel.php |
— | — | @@ -213,11 +213,12 @@ |
214 | 214 | */ |
215 | 215 | protected function getIdStack($definedMeaningId) { |
216 | 216 | global |
217 | | - $definedMeaningIdAttribute; |
| 217 | + $omegaWikiAttributes; |
| 218 | + $o=$omegaWikiAttributes; |
218 | 219 | |
219 | | - $definedMeaningIdStructure = new Structure($definedMeaningIdAttribute); |
| 220 | + $definedMeaningIdStructure = new Structure($o->$definedMeaningId); |
220 | 221 | $definedMeaningIdRecord = new ArrayRecord($definedMeaningIdStructure, $definedMeaningIdStructure); |
221 | | - $definedMeaningIdRecord->setAttributeValue($definedMeaningIdAttribute, $definedMeaningId); |
| 222 | + $definedMeaningIdRecord->definedMeaningId= $definedMeaningId; |
222 | 223 | |
223 | 224 | $idStack = new IdStack("defined-meaning"); |
224 | 225 | $idStack->pushKey($definedMeaningIdRecord); |