Author: sevein
Date: Mon Oct 18 03:29:06 2010
New Revision: 8220
Log:
Bump data version and update migration script to enable sfIsdfPlugin.
Modified:
trunk/data/fixtures/settings.yml
trunk/lib/task/migrate/QubitMigrate109.class.php
Modified: trunk/data/fixtures/settings.yml
==============================================================================
--- trunk/data/fixtures/settings.yml Mon Oct 18 03:19:35 2010 (r8219)
+++ trunk/data/fixtures/settings.yml Mon Oct 18 03:29:06 2010 (r8220)
@@ -3,7 +3,7 @@
name: version
editable: 0
deleteable: 0
- value: 53
+ value: 54
QubitSetting_2:
name: upload_dir
editable: 0
Modified: trunk/lib/task/migrate/QubitMigrate109.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate109.class.php Mon Oct 18 03:19:35
2010 (r8219)
+++ trunk/lib/task/migrate/QubitMigrate109.class.php Mon Oct 18 03:29:06
2010 (r8220)
@@ -77,6 +77,9 @@
case 52:
$this->setPubStatusExplictly();
+
+ case 53:
+ $this->activateIsdfPlugin();
}
// Delete "stub" objects
@@ -499,6 +502,41 @@
}
/**
+ * Ver 54: Activate sfIsdfPlugin plugin
+ *
+ * @return QubitMigrate109 this object
+ */
+ protected function activateIsdfPlugin()
+ {
+ $plugin = array('sfIsdfPlugin');
+
+ // Find setting
+ $found = false;
+ foreach ($this->data['QubitSetting'] as $key => $value)
+ {
+ if ('plugins' == $value['name'])
+ {
+ // Found setting, add new plugins
+ $found = true;
+ $this->data['QubitSetting'][$key]['value'][$value['source_culture']] =
serialize(array_unique(array_merge(unserialize($value['value'][$value['source_culture']]),
$plugin)));
+
+ break;
+ }
+ }
+
+ if (!$found)
+ {
+ // No setting, add one
+ $value = array();
+ $value['name'] = 'plugins';
+ $value['source_culture'] = 'en';
+ $value['value']['en'] = serialize($plugin);
+
+ $this->data['QubitSetting'][rand()] = $value;
+ }
+ }
+
+ /**
* Sort information objects by lft value so that parent objects are inserted
* before their children.
*
--
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.