r24284 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24283‎ | r24284 | r24285 >
Date:11:34, 20 July 2007
Author:kim
Status:old
Tags:
Comment:
Pushing out some minor changes still on my machine so svn is up to date

Will be working on save and attributes some more, so expect occaisional minor breakage this coming week
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaningModel.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/RecordHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php
@@ -394,6 +394,8 @@
395395 $t->expressionId,
396396 $t->language
397397 );
 398+ #try this
 399+ $t->definedMeaningCompleteDefiningExpressionStructure->setStructureType("expression");
398400 $t->definedMeaningCompleteDefiningExpression=new Attribute(null, "Defining expression", $t->definedMeaningCompleteDefiningExpressionStructure);
399401 global
400402 $definedMeaningReferenceType;
Index: trunk/extensions/Wikidata/OmegaWiki/RecordHelper.php
@@ -63,6 +63,7 @@
6464 abstract class Helper {
6565 protected $record;
6666 protected $saved;
 67+ protected $UUID;
6768 public function __construct($record) {
6869 $this->record=$record;
6970 }
@@ -71,7 +72,7 @@
7273 return $this->saved;
7374 }
7475
75 - public function setSaved($saved) {
 76+ public function setSaved($saved=True) {
7677 $this->saved=$saved;
7778 }
7879
@@ -91,8 +92,17 @@
9293 $sql=$this->getSaveSQL();
9394 $dbr = &wfGetDB(DB_MASTER);
9495 $dbr->query($sql);
 96+ $self->setSaved();
9597 }
9698
 99+ public function setUUID($UUID) {
 100+ $this->UUID=$UUID;
 101+ }
 102+
 103+ public function getUUID($UUID) {
 104+ return $this->UUID;
 105+ }
 106+
97107 }
98108
99109 class DefinitionHelper extends Helper {
@@ -135,6 +145,14 @@
136146 public function save() {
137147
138148 }
 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+ }
139157 }
140158
141159
Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaningModel.php
@@ -213,11 +213,12 @@
214214 */
215215 protected function getIdStack($definedMeaningId) {
216216 global
217 - $definedMeaningIdAttribute;
 217+ $omegaWikiAttributes;
 218+ $o=$omegaWikiAttributes;
218219
219 - $definedMeaningIdStructure = new Structure($definedMeaningIdAttribute);
 220+ $definedMeaningIdStructure = new Structure($o->$definedMeaningId);
220221 $definedMeaningIdRecord = new ArrayRecord($definedMeaningIdStructure, $definedMeaningIdStructure);
221 - $definedMeaningIdRecord->setAttributeValue($definedMeaningIdAttribute, $definedMeaningId);
 222+ $definedMeaningIdRecord->definedMeaningId= $definedMeaningId;
222223
223224 $idStack = new IdStack("defined-meaning");
224225 $idStack->pushKey($definedMeaningIdRecord);

Status & tagging log