Index: trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php |
— | — | @@ -30,17 +30,24 @@ |
31 | 31 | require_once('WikiDataAPI.php'); |
32 | 32 | require_once('Transaction.php'); |
33 | 33 | |
| 34 | + $dc = $wgRequest->getText('Dataset'); |
34 | 35 | $collectionName = $wgRequest->getText('collection'); |
35 | 36 | 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); |
37 | 38 | $wgOut->addHTML('<strong>Collection ' . $collectionName . ' added.</strong><br />'); |
38 | 39 | } |
| 40 | + $datasets=wdGetDatasets(); |
| 41 | + $datasetarray['']=wfMsg('ow_none_selected'); |
| 42 | + foreach($datasets as $datasetid=>$dataset) { |
| 43 | + $datasetarray[$datasetid]=$dataset->fetchName(); |
| 44 | + } |
39 | 45 | |
40 | 46 | $wgOut->addHTML(getOptionPanel( |
41 | 47 | array( |
42 | 48 | 'Collection name' => getTextBox('collection'), |
43 | 49 | '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) |
45 | 52 | ), |
46 | 53 | '',array('create' => 'Create') |
47 | 54 | )); |
Index: trunk/extensions/Wikidata/OmegaWiki/RecordHelper.php |
— | — | @@ -55,7 +55,8 @@ |
56 | 56 | $this->record=$record; |
57 | 57 | } |
58 | 58 | |
59 | | - public abstract function save(); |
| 59 | + //public abstract function getSQL(); |
| 60 | + //public abstract function save(); |
60 | 61 | |
61 | 62 | } |
62 | 63 | |
— | — | @@ -118,6 +119,10 @@ |
119 | 120 | echo $record; |
120 | 121 | } |
121 | 122 | |
| 123 | + public function getSQL() { |
| 124 | + |
| 125 | + } |
| 126 | + |
122 | 127 | public function save() { |
123 | 128 | /*what to do here eh?*/ |
124 | 129 | } |