Author: david
Date: Wed Nov 30 12:20:39 2011
New Revision: 10360
Log:
Merge r10355:10359 from trunk
Modified:
tags/release-1.2/ (props changed)
tags/release-1.2/config/rsync_exclude.txt
tags/release-1.2/data/fixtures/settings.yml
tags/release-1.2/lib/task/migrate/QubitMigrate110.class.php
tags/release-1.2/plugins/qbAclPlugin/lib/vendor/Zend/ (props changed)
tags/release-1.2/plugins/sfDrupalPlugin/vendor/drupal/ (props changed)
tags/release-1.2/vendor/symfony/ (props changed)
tags/release-1.2/vendor/symfony/lib/task/i18n/sfI18nExtractPluginTask.class.php
(props changed)
tags/release-1.2/vendor/yui/ (props changed)
Modified: tags/release-1.2/config/rsync_exclude.txt
==============================================================================
--- tags/release-1.2/config/rsync_exclude.txt Wed Nov 30 10:54:14 2011
(r10359)
+++ tags/release-1.2/config/rsync_exclude.txt Wed Nov 30 12:20:39 2011
(r10360)
@@ -13,6 +13,7 @@
/patches
/test
+/.htaccess
/index.php
/config/ProjectConfiguration.class.php
/apps/qubit/config/qubitConfiguration.class.php
Modified: tags/release-1.2/data/fixtures/settings.yml
==============================================================================
--- tags/release-1.2/data/fixtures/settings.yml Wed Nov 30 10:54:14 2011
(r10359)
+++ tags/release-1.2/data/fixtures/settings.yml Wed Nov 30 12:20:39 2011
(r10360)
@@ -3,7 +3,7 @@
name: version
editable: 0
deleteable: 0
- value: 74
+ value: 75
QubitSetting_2:
name: upload_dir
editable: 0
Modified: tags/release-1.2/lib/task/migrate/QubitMigrate110.class.php
==============================================================================
--- tags/release-1.2/lib/task/migrate/QubitMigrate110.class.php Wed Nov 30
10:54:14 2011 (r10359)
+++ tags/release-1.2/lib/task/migrate/QubitMigrate110.class.php Wed Nov 30
12:20:39 2011 (r10360)
@@ -85,6 +85,9 @@
case 73:
$this->addGlobalReplaceMenu();
+
+ case 74:
+ $this->ensurePublicationStatus();
}
// Delete "stub" objects
@@ -808,6 +811,56 @@
}
/**
+ * Ensure all information objects get an explicit publication status
+ *
+ * @return QubitMigrate110 SELF
+ */
+ protected function ensurePublicationStatus()
+ {
+ foreach ($this->data['QubitInformationObject'] as $key => &$item)
+ {
+ // Ignore ROOT
+ if ('<?php echo QubitInformationObject::ROOT_ID."\n" ?>' == $item['id'])
+ {
+ continue;
+ }
+
+ // Don't do anything if this node already has a publication status
+ if ($this->findRowKeyForColumnValue($this->data['QubitStatus'],
'object_id', $key) ||
+ $this->findRowKeyForColumnValue($this->data['QubitStatus'],
'object_id', $item['id']))
+ {
+ continue;
+ }
+
+ // Search up hierarchy for ancestor with status
+ $inheritedStatusKey = null;
+ $node = $item;
+
+ while (!isset($inheritedStatusKey))
+ {
+ $parentKey = $node['parent_id'];
+ $statusKey =
$this->findRowKeyForColumnValue($this->data['QubitStatus'], 'object_id',
$parentKey);
+
+ if ($statusKey)
+ {
+ $inheritedStatusKey = $statusKey;
+ }
+ else
+ {
+ $node = $this->data['QubitInformationObject'][$parentKey];
+ }
+ }
+
+ $this->data['QubitStatus']['QubitStatus_'.$key] = array(
+ 'object_id' => $key,
+ 'type_id' =>
$this->data['QubitStatus'][$inheritedStatusKey]['type_id'],
+ 'status_id' =>
$this->data['QubitStatus'][$inheritedStatusKey]['status_id']);
+ }
+
+ return $this;
+ }
+
+ /**
* Slugs are inserted when some resources are inserted, but slugs are dumped
* separately when data is dumped. So loading slug data will try to insert
* duplicate slugs. To work around this, turn slugs into resource properties
--
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.