Author: david
Date: Wed Oct 26 15:53:37 2011
New Revision: 10203
Log:
Can't pass object to setPublicationStatus(). Fixes issue 2086
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Wed Oct 26 15:34:10 2011 (r10202)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Wed Oct 26 15:53:37 2011 (r10203)
@@ -578,14 +578,18 @@
$childLevel = new QubitInformationObject;
$childLevel->identifier = $item['identifier'];
$childLevel->title = $item['title'];
-
$childLevel->setPublicationStatus($this->resource->getPublicationStatus());
- if (0 < $item['levelOfDescription'] && (null !==
QubitTerm::getById($item['levelOfDescription'])))
+ if (null != ($pubStatus = $this->resource->getPublicationStatus()))
+ {
+ $childLevel->setPublicationStatus($pubStatus->statusId);
+ }
+
+ if (0 < strlen($item['levelOfDescription']) && (null !==
QubitTerm::getById($item['levelOfDescription'])))
{
$childLevel->levelOfDescriptionId = $item['levelOfDescription'];
}
- if (0 < $item['levelOfDescription']
+ if (0 < strlen($item['levelOfDescription'])
|| 0 < strlen($item['identifier'])
|| 0 < strlen($item['title']))
{
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.