r25277 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25276‎ | r25277 | r25278 >
Date:11:34, 29 August 2007
Author:erik
Status:old
Tags:
Comment:
fix addcollection dataset association
small fixes
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php
@@ -263,7 +263,7 @@
264264 foreach($datasets as $datasetid=>$dataset) {
265265 $name=$dataset->fetchName();
266266 $dc2=$datasetid;
267 - $html.="<a href='extensions/Wikidata/util/copy.php?dmid=$dmid&dc1=$dc1&dc2=$dc2'>$name</a><br>\n";
 267+ $html.="<a href='../extensions/Wikidata/util/copy.php?dmid=$dmid&dc1=$dc1&dc2=$dc2'>$name</a><br>\n";
268268 }
269269
270270 return $html;
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php
@@ -34,7 +34,7 @@
3535 require_once('WikiDataAPI.php');
3636 require_once('Transaction.php');
3737
38 - $dc = $wgRequest->getText('Dataset');
 38+ $dc = $wgRequest->getText('dataset');
3939 $collectionName = $wgRequest->getText('collection');
4040 startNewTransaction($wgUser->getID(), wfGetIP(), 'Add collection ' . $collectionName);
4141 bootstrapCollection($collectionName,$wgRequest->getText('language'),$wgRequest->getText('type'), $dc);
@@ -51,7 +51,7 @@
5252 'Collection name' => getTextBox('collection'),
5353 'Language of name' => getSuggest('language','language'),
5454 'Collection type' => getSelect('type',array('' => 'None','RELT' => 'RELT','LEVL' => 'LEVL','CLAS' => 'CLAS', 'MAPP' => 'MAPP')),
55 - 'Dataset' => getSelect('Dataset',$datasetarray)
 55+ 'Dataset' => getSelect('dataset',$datasetarray)
5656 ),
5757 '',array('create' => 'Create')
5858 ));
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php
@@ -662,7 +662,6 @@
663663 function getOptionAttributeOptionsEditor() {
664664
665665 $o=OmegaWikiAttributes::getInstance();
666 - $o=OmegaWikiAttributes::getInstance();
667666
668667 $editor = new RecordSetTableEditor($o->optionAttributeOptions, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new OptionAttributeOptionsController());
669668 $editor->addEditor(new DefinedMeaningReferenceEditor($o->optionAttributeOption, new SimplePermissionController(false), true));
@@ -691,8 +690,6 @@
692691
693692 $o=OmegaWikiAttributes::getInstance();
694693
695 - $o=OmegaWikiAttributes::getInstance();
696 -
697694 $expressionMeaningsRecordEditor = new RecordUnorderedListEditor($o->expressionMeanings, 3);
698695
699696 $exactMeaningsEditor = getExpressionMeaningsEditor($o->expressionExactMeanings, true, $viewInformation);
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php
@@ -399,7 +399,7 @@
400400 $languageRestriction = $viewInformation->filterLanguageId != 0 ? " AND language_id=". $viewInformation->filterLanguageId : "";
401401
402402 $dbr =& wfGetDB(DB_SLAVE);
403 - $queryResult = $dbr->query(
 403+ $sql=
404404 "SELECT expression_id, language_id " .
405405 " FROM {$dc}_expression_ns" .
406406 " WHERE spelling=BINARY " . $dbr->addQuotes($spelling) .
@@ -410,8 +410,8 @@
411411 " FROM {$dc}_syntrans " .
412412 " WHERE {$dc}_syntrans.expression_id={$dc}_expression_ns.expression_id" .
413413 " AND ". getLatestTransactionRestriction("{$dc}_syntrans")
414 - .")"
415 - );
 414+ .")";
 415+ $queryResult = $dbr->query($sql);
416416
417417 $result = new ArrayRecordSet($o->expressionsStructure, new Structure("expression-id", $o->expressionId));
418418 $languageStructure = new Structure("language", $o->language);

Status & tagging log