r23040 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23039‎ | r23040 | r23041 >
Date:21:56, 16 June 2007
Author:erik
Status:old
Tags:
Comment:
fix structure bug
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/Editor.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Record.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
@@ -501,9 +501,9 @@
502502
503503 $recordSet = new ArrayRecordSet(new Structure($idAttribute, $languageAttribute), new Structure($idAttribute));
504504
505 - while ($row = $dbr->fetchObject($queryResult))
 505+ while ($row = $dbr->fetchObject($queryResult)) {
506506 $recordSet->addRecord(array($row->row_id, $row->language_name));
507 -
 507+ }
508508 $editor = createSuggestionsTableViewer(null);
509509 $editor->addEditor(createShortTextViewer($languageAttribute));
510510
Index: trunk/extensions/Wikidata/OmegaWiki/Record.php
@@ -128,7 +128,6 @@
129129 foreach ($structure->getAttributes() as $attribute) {
130130 $type = $attribute->type;
131131 $value = $record->getAttributeValue($attribute);
132 -
133132 if ($type instanceof Structure)
134133 $result->setAttributeValue($attribute, project($record, $type->getStructure()));
135134 else
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php
@@ -31,7 +31,7 @@
3232 protected function getKeyIds($record) {
3333 $ids = array();
3434
35 - foreach($record->getStructure() as $attribute)
 35+ foreach($record->getStructure()->getAttributes() as $attribute)
3636 $ids[] = $record->getAttributeValue($attribute);
3737
3838 return $ids;

Status & tagging log