Index: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php |
— | — | @@ -501,9 +501,9 @@ |
502 | 502 | |
503 | 503 | $recordSet = new ArrayRecordSet(new Structure($idAttribute, $languageAttribute), new Structure($idAttribute)); |
504 | 504 | |
505 | | - while ($row = $dbr->fetchObject($queryResult)) |
| 505 | + while ($row = $dbr->fetchObject($queryResult)) { |
506 | 506 | $recordSet->addRecord(array($row->row_id, $row->language_name)); |
507 | | - |
| 507 | + } |
508 | 508 | $editor = createSuggestionsTableViewer(null); |
509 | 509 | $editor->addEditor(createShortTextViewer($languageAttribute)); |
510 | 510 | |
Index: trunk/extensions/Wikidata/OmegaWiki/Record.php |
— | — | @@ -128,7 +128,6 @@ |
129 | 129 | foreach ($structure->getAttributes() as $attribute) { |
130 | 130 | $type = $attribute->type; |
131 | 131 | $value = $record->getAttributeValue($attribute); |
132 | | - |
133 | 132 | if ($type instanceof Structure) |
134 | 133 | $result->setAttributeValue($attribute, project($record, $type->getStructure())); |
135 | 134 | else |
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | protected function getKeyIds($record) { |
33 | 33 | $ids = array(); |
34 | 34 | |
35 | | - foreach($record->getStructure() as $attribute) |
| 35 | + foreach($record->getStructure()->getAttributes() as $attribute) |
36 | 36 | $ids[] = $record->getAttributeValue($attribute); |
37 | 37 | |
38 | 38 | return $ids; |