Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit a258a72

Browse files
author
Charles Ma
committed
BUG: fixed bug #187 Midas3 to Midas2 import does not work
fixed bug #205 Adding metadata for an item displays warnings
1 parent a535a3c commit a258a72

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed

core/controllers/components/MIDAS2MigrationComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ private function _createFolderForCommunity($communityidMIDAS2, $parentFolderid)
440440
}
441441
$userDao = $User->getByEmail($email);
442442

443-
$Folderpolicyuser->createPolicy($user, $folderDao, $policyValue);
443+
$Folderpolicyuser->createPolicy($userDao, $folderDao, $policyValue);
444444
}
445445
}
446446
catch(Zend_Exception $e)

core/database/mysql/3.1.0.sql

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,35 @@ CREATE TABLE IF NOT EXISTS `metadata` (
352352
KEY `metadatatype_id` (`metadatatype`)
353353
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
354354

355+
INSERT INTO metadata (metadatatype,element,qualifier,description)
356+
VALUES ('0','contributor','author','Author of the data');
357+
INSERT INTO metadata (metadatatype,element,qualifier,description)
358+
VALUES ('0','date','uploaded','Date when the data was uploaded');
359+
INSERT INTO metadata (metadatatype,element,qualifier,description)
360+
VALUES ('0','date','issued','Date when the data was released');
361+
INSERT INTO metadata (metadatatype,element,qualifier,description)
362+
VALUES ('0','date','created','Date when the data was created');
363+
INSERT INTO metadata (metadatatype,element,qualifier,description)
364+
VALUES ('0','identifier','citation','Citation of the data');
365+
INSERT INTO metadata (metadatatype,element,qualifier,description)
366+
VALUES ('0','identifier','uri','URI identifier');
367+
INSERT INTO metadata (metadatatype,element,qualifier,description)
368+
VALUES ('0','identifier','pubmed','PubMed identifier');
369+
INSERT INTO metadata (metadatatype,element,qualifier,description)
370+
VALUES ('0','identifier','doi','Digital Object Identifier');
371+
INSERT INTO metadata (metadatatype,element,qualifier,description)
372+
VALUES ('0','description','general','General description field');
373+
INSERT INTO metadata (metadatatype,element,qualifier,description)
374+
VALUES ('0','description','provenance','Provenance of the data');
375+
INSERT INTO metadata (metadatatype,element,qualifier,description)
376+
VALUES ('0','description','sponsorship','Sponsor of the data');
377+
INSERT INTO metadata (metadatatype,element,qualifier,description)
378+
VALUES ('0','description','publisher','Publisher of the data');
379+
INSERT INTO metadata (metadatatype,element,qualifier,description)
380+
VALUES ('0','subject','keyword','Keyword');
381+
INSERT INTO metadata (metadatatype,element,qualifier,description)
382+
VALUES ('0','subject','ocis','OCIS subject');
383+
355384
-- --------------------------------------------------------
356385

357386
--

core/database/pgsql/3.1.0.sql

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,35 @@ CREATE TABLE metadatavalue (
372372
metadatavalue_id integer NOT NULL
373373
);
374374

375+
INSERT INTO metadata (metadatatype,element,qualifier,description)
376+
VALUES ('0','contributor','author','Author of the data');
377+
INSERT INTO metadata (metadatatype,element,qualifier,description)
378+
VALUES ('0','date','uploaded','Date when the data was uploaded');
379+
INSERT INTO metadata (metadatatype,element,qualifier,description)
380+
VALUES ('0','date','issued','Date when the data was released');
381+
INSERT INTO metadata (metadatatype,element,qualifier,description)
382+
VALUES ('0','date','created','Date when the data was created');
383+
INSERT INTO metadata (metadatatype,element,qualifier,description)
384+
VALUES ('0','identifier','citation','Citation of the data');
385+
INSERT INTO metadata (metadatatype,element,qualifier,description)
386+
VALUES ('0','identifier','uri','URI identifier');
387+
INSERT INTO metadata (metadatatype,element,qualifier,description)
388+
VALUES ('0','identifier','pubmed','PubMed identifier');
389+
INSERT INTO metadata (metadatatype,element,qualifier,description)
390+
VALUES ('0','identifier','doi','Digital Object Identifier');
391+
INSERT INTO metadata (metadatatype,element,qualifier,description)
392+
VALUES ('0','description','general','General description field');
393+
INSERT INTO metadata (metadatatype,element,qualifier,description)
394+
VALUES ('0','description','provenance','Provenance of the data');
395+
INSERT INTO metadata (metadatatype,element,qualifier,description)
396+
VALUES ('0','description','sponsorship','Sponsor of the data');
397+
INSERT INTO metadata (metadatatype,element,qualifier,description)
398+
VALUES ('0','description','publisher','Publisher of the data');
399+
INSERT INTO metadata (metadatatype,element,qualifier,description)
400+
VALUES ('0','subject','keyword','Keyword');
401+
INSERT INTO metadata (metadatatype,element,qualifier,description)
402+
VALUES ('0','subject','ocis','OCIS subject');
403+
375404

376405
--
377406
-- TOC entry 1622 (class 1259 OID 43224)

core/models/pdo/MetadataModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function getAllMetadata()
3535
{
3636
$rowset = $this->database->fetchAll($this->database->select());
3737

38-
$metadata = array();
38+
$metadata = array('raw' => array(), 'sorted' => array());
3939
foreach($rowset as $row)
4040
{
4141
$dao = $this->initDao('Metadata', $row);

0 commit comments

Comments
 (0)