r23183 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23182‎ | r23183 | r23184 >
Date:22:41, 21 June 2007
Author:kim
Status:old
Tags:
Comment:
Add a Dataset selection dialogue to SpecialAddCollection.php

this should make Erik van mulligens life a lot easier already. :-)
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/RecordHelper.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php
@@ -30,17 +30,24 @@
3131 require_once('WikiDataAPI.php');
3232 require_once('Transaction.php');
3333
 34+ $dc = $wgRequest->getText('Dataset');
3435 $collectionName = $wgRequest->getText('collection');
3536 startNewTransaction($wgUser->getID(), wfGetIP(), 'Add collection ' . $collectionName);
36 - bootstrapCollection($collectionName,$wgRequest->getText('language'),$wgRequest->getText('type'));
 37+ bootstrapCollection($collectionName,$wgRequest->getText('language'),$wgRequest->getText('type'), $dc);
3738 $wgOut->addHTML('<strong>Collection ' . $collectionName . ' added.</strong><br />');
3839 }
 40+ $datasets=wdGetDatasets();
 41+ $datasetarray['']=wfMsg('ow_none_selected');
 42+ foreach($datasets as $datasetid=>$dataset) {
 43+ $datasetarray[$datasetid]=$dataset->fetchName();
 44+ }
3945
4046 $wgOut->addHTML(getOptionPanel(
4147 array(
4248 'Collection name' => getTextBox('collection'),
4349 'Language of name' => getSuggest('language','language'),
44 - 'Collection type' => getSelect('type',array('' => 'None','RELT' => 'RELT','LEVL' => 'LEVL','CLAS' => 'CLAS', 'MAPP' => 'MAPP'))
 50+ 'Collection type' => getSelect('type',array('' => 'None','RELT' => 'RELT','LEVL' => 'LEVL','CLAS' => 'CLAS', 'MAPP' => 'MAPP')),
 51+ 'Dataset' => getSelect('Dataset',$datasetarray)
4552 ),
4653 '',array('create' => 'Create')
4754 ));
Index: trunk/extensions/Wikidata/OmegaWiki/RecordHelper.php
@@ -55,7 +55,8 @@
5656 $this->record=$record;
5757 }
5858
59 - public abstract function save();
 59+ //public abstract function getSQL();
 60+ //public abstract function save();
6061
6162 }
6263
@@ -118,6 +119,10 @@
119120 echo $record;
120121 }
121122
 123+ public function getSQL() {
 124+
 125+ }
 126+
122127 public function save() {
123128 /*what to do here eh?*/
124129 }

Status & tagging log