Author: david
Date: Mon Nov 14 08:44:30 2011
New Revision: 10310
Log:
Rollback r10202. Fixes issue #2169
Modified:
trunk/lib/QubitXmlImport.class.php
trunk/lib/model/QubitInformationObject.php
Modified: trunk/lib/QubitXmlImport.class.php
==============================================================================
--- trunk/lib/QubitXmlImport.class.php Fri Nov 11 13:51:30 2011 (r10309)
+++ trunk/lib/QubitXmlImport.class.php Mon Nov 14 08:44:30 2011 (r10310)
@@ -417,6 +417,12 @@
}
}
+ // make sure we have a publication status set before indexing
+ if ($currentObject instanceof QubitInformationObject &&
count($currentObject->statuss) == 0)
+ {
+
$currentObject->setPublicationStatus(sfConfig::get('app_defaultPubStatus',
QubitTerm::PUBLICATION_STATUS_DRAFT_ID));
+ }
+
// save the object after it's fully-populated
$currentObject->save();
Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php Fri Nov 11 13:51:30 2011
(r10309)
+++ trunk/lib/model/QubitInformationObject.php Mon Nov 14 08:44:30 2011
(r10310)
@@ -205,14 +205,8 @@
}
// Save updated Status
- $hasPubStatus = false;
foreach ($this->statuss as $item)
{
- if (QubitTerm::STATUS_TYPE_PUBLICATION_ID == $item->typeId)
- {
- $hasPubStatus = true;
- }
-
$item->setIndexOnSave(false);
// TODO Needed if $this is new, should be transparent
@@ -221,18 +215,6 @@
$item->save($connection);
}
- // Force a publication status
- if ($this->id != QubitInformationObject::ROOT_ID && !$hasPubStatus)
- {
- $status = new QubitStatus;
- $status->objectId = $this->id;
- $status->typeId = QubitTerm::STATUS_TYPE_PUBLICATION_ID;
- $status->statusId = sfConfig::get('app_defaultPubStatus',
QubitTerm::PUBLICATION_STATUS_DRAFT_ID);
- $status->setIndexOnSave(false);
-
- $status->save($connection);
- }
-
QubitSearch::updateInformationObject($this);
return $this;
--
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.