Author: peter
Date: Thu Sep 24 15:05:21 2009
New Revision: 3516
Log:
fix migrate tasks to ensure that all existing information objects have their
publication status set to 'published'
Modified:
trunk/lib/task/migrate/QubitMigrate107to108.class.php
Modified: trunk/lib/task/migrate/QubitMigrate107to108.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate107to108.class.php Thu Sep 24
14:59:01 2009 (r3515)
+++ trunk/lib/task/migrate/QubitMigrate107to108.class.php Thu Sep 24
15:05:21 2009 (r3516)
@@ -860,12 +860,15 @@
'status_id' => '<?php echo QubitTerm::PUBLICATION_STATUS_DRAFT_ID."\n"
?>'
);
- // Assume all pre-existing information objects are published
+ // Identify QubitInformationObject Root
+ $rootKey = $this->getRowKey('QubitInformationObject', 'lft', '1');
+
foreach ($this->data['QubitInformationObject'] as $key => $value)
{
+ // Assume all pre-existing information objects are published
// Publication status is inherited by descendants so we only need to set
it for
// collection roots and orphans
- if ($value['parent_id'] == 'QubitInformationObject_1')
+ if ($value['parent_id'] == $rootKey)
{
$this->data['QubitStatus']['publication_status_'.$key] = array(
'object_id' => $key,
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---