Author: david
Date: Wed Nov 10 12:44:00 2010
New Revision: 8816
Log:
Use setStatus().
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 Nov 10 12:40:17 2010 (r8815)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Wed Nov 10 12:44:00 2010 (r8816)
@@ -570,18 +570,8 @@
// Update pub status of descendants
foreach ($this->resource->descendants as $descendant)
{
- if (null === $descendantPubStatus =
$descendant->getStatus(array('typeId' =>
QubitTerm::STATUS_TYPE_PUBLICATION_ID)))
- {
- $descendantPubStatus = new QubitStatus;
- $descendantPubStatus->typeId = QubitTerm::STATUS_TYPE_PUBLICATION_ID;
- $descendantPubStatus->objectId = $descendant->id;
- }
-
- if ($pubStatusId != $descendantPubStatus->statusId)
- {
- $descendantPubStatus->statusId = $pubStatusId;
- $descendantPubStatus->save();
- }
+ $descendant->setStatus(array('typeId' =>
QubitTerm::STATUS_TYPE_PUBLICATION_ID, 'statusId' => $pubStatusId));
+ $descendant->save();
}
}
}
--
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.