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

Commit

Permalink
BUG: fixed bug #187 Midas3 to Midas2 import does not work
Browse files Browse the repository at this point in the history
fixed bug #205 Adding metadata for an item displays warnings
  • Loading branch information
Charles Ma committed Jul 28, 2011
1 parent a535a3c commit a258a72
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/controllers/components/MIDAS2MigrationComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ private function _createFolderForCommunity($communityidMIDAS2, $parentFolderid)
}
$userDao = $User->getByEmail($email);

$Folderpolicyuser->createPolicy($user, $folderDao, $policyValue);
$Folderpolicyuser->createPolicy($userDao, $folderDao, $policyValue);
}
}
catch(Zend_Exception $e)
Expand Down
29 changes: 29 additions & 0 deletions core/database/mysql/3.1.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,35 @@ CREATE TABLE IF NOT EXISTS `metadata` (
KEY `metadatatype_id` (`metadatatype`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;

INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','contributor','author','Author of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','date','uploaded','Date when the data was uploaded');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','date','issued','Date when the data was released');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','date','created','Date when the data was created');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','citation','Citation of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','uri','URI identifier');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','pubmed','PubMed identifier');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','doi','Digital Object Identifier');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','general','General description field');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','provenance','Provenance of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','sponsorship','Sponsor of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','publisher','Publisher of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','subject','keyword','Keyword');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','subject','ocis','OCIS subject');

-- --------------------------------------------------------

--
Expand Down
29 changes: 29 additions & 0 deletions core/database/pgsql/3.1.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,35 @@ CREATE TABLE metadatavalue (
metadatavalue_id integer NOT NULL
);

INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','contributor','author','Author of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','date','uploaded','Date when the data was uploaded');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','date','issued','Date when the data was released');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','date','created','Date when the data was created');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','citation','Citation of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','uri','URI identifier');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','pubmed','PubMed identifier');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','identifier','doi','Digital Object Identifier');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','general','General description field');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','provenance','Provenance of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','sponsorship','Sponsor of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','description','publisher','Publisher of the data');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','subject','keyword','Keyword');
INSERT INTO metadata (metadatatype,element,qualifier,description)
VALUES ('0','subject','ocis','OCIS subject');


--
-- TOC entry 1622 (class 1259 OID 43224)
Expand Down
2 changes: 1 addition & 1 deletion core/models/pdo/MetadataModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function getAllMetadata()
{
$rowset = $this->database->fetchAll($this->database->select());

$metadata = array();
$metadata = array('raw' => array(), 'sorted' => array());
foreach($rowset as $row)
{
$dao = $this->initDao('Metadata', $row);
Expand Down

0 comments on commit a258a72

Please sign in to comment.