Browse Source

Changed the way ContentModel assigned names to objects

pull/38/head
Alan Stanley 13 years ago
parent
commit
24f7bfb1e9
  1. 4
      ContentModel.inc

4
ContentModel.inc

@ -203,6 +203,9 @@ class ContentModel extends XMLDatastream {
try { try {
if (self::valid_pid($pid)) { if (self::valid_pid($pid)) {
$fedoraItem = new Fedora_Item($pid); $fedoraItem = new Fedora_Item($pid);
if (!$name) {
$name = $fedoraItem->objectProfile->objLabel;
}
$dsid = ($dsid != NULL && self::valid_dsid($dsid)) ? $dsid : ContentModel::getDefaultDSID(); $dsid = ($dsid != NULL && self::valid_dsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
$ds = $fedoraItem->get_datastream_dissemination($dsid); $ds = $fedoraItem->get_datastream_dissemination($dsid);
if (!empty($ds)) { if (!empty($ds)) {
@ -497,7 +500,6 @@ class ContentModel extends XMLDatastream {
* *
* @return String * @return String
*/ */
public function getDatastreamNameDSID() { public function getDatastreamNameDSID() {
$datastreams = $this->xml->getElementsByTagName('datastreams'); $datastreams = $this->xml->getElementsByTagName('datastreams');
$datastream = $datastreams->item(0); $datastream = $datastreams->item(0);

Loading…
Cancel
Save