Author: jablko
Date: Sun Nov 29 13:13:40 2009
New Revision: 3999

Log:
Enable metadata standard plugins by default, add migration to enable metadata 
standard plugins and bump migration version

Added:
   trunk/plugins/sfDcPlugin/config/
   trunk/plugins/sfDcPlugin/config/sfDcPluginConfiguration.class.php   
(contents, props changed)
   trunk/plugins/sfEadPlugin/config/
   trunk/plugins/sfEadPlugin/config/sfEadPluginConfiguration.class.php   
(contents, props changed)
   trunk/plugins/sfIsadPlugin/config/
   trunk/plugins/sfIsadPlugin/config/sfIsadPluginConfiguration.class.php   
(contents, props changed)
   trunk/plugins/sfModsPlugin/config/
   trunk/plugins/sfModsPlugin/config/sfModsPluginConfiguration.class.php   
(contents, props changed)
   trunk/plugins/sfRadPlugin/config/
   trunk/plugins/sfRadPlugin/config/sfRadPluginConfiguration.class.php   
(contents, props changed)
Modified:
   trunk/data/fixtures/settings.yml
   trunk/lib/task/migrate/QubitMigrate108to110.class.php

Modified: trunk/data/fixtures/settings.yml
==============================================================================
--- trunk/data/fixtures/settings.yml    Sun Nov 29 13:03:51 2009        (r3998)
+++ trunk/data/fixtures/settings.yml    Sun Nov 29 13:13:40 2009        (r3999)
@@ -3,7 +3,7 @@
     name: version
     editable: 0
     deleteable: 0
-    value: 3
+    value: 4
   QubitSetting_2:
     name: upload_dir
     editable: 0
@@ -301,6 +301,9 @@
     editable: 1
     deleteable: 0
     value: 1
+  plugins:
+    name: plugins
+    value: 
'a:5:{i:0;s:10:"sfDcPlugin";i:1;s:11:"sfEadPlugin";i:2;s:12:"sfIsadPlugin";i:3;s:12:"sfModsPlugin";i:4;s:11:"sfRadPlugin";}'
   toggleDescription:
     name: toggleDescription
     value: 1

Modified: trunk/lib/task/migrate/QubitMigrate108to110.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate108to110.class.php       Sun Nov 29 
13:03:51 2009        (r3998)
+++ trunk/lib/task/migrate/QubitMigrate108to110.class.php       Sun Nov 29 
13:13:40 2009        (r3999)
@@ -44,6 +44,35 @@
 
       case 2:
         $this->moveActorNameToOtherName();
+
+      case 3:
+
+        // Enable new plugins
+        $plugins = array('sfDcPlugin', 'sfEadPlugin', 'sfIsadPlugin', 
'sfModsPlugin', 'sfRadPlugin');
+
+        // Find setting
+        foreach ($this->data['QubitSetting'] as $key => $value)
+        {
+          if ('plugins' == $value['name'])
+          {
+            break;
+          }
+        }
+
+        if ('plugins' == $value['name'])
+        {
+          // Found setting, add new plugins
+          $this->data['QubitSetting'][$key]['value'] = 
serialize(array_unique(array_merge(unserialize($value['value'][$value['source_culture']]),
 $plugins)));
+        }
+        else
+        {
+          // No setting, add one
+          $value = array();
+          $value['name'] = 'plugins';
+          $value['value'] = serialize($plugins);
+
+          $this->data['QubitSetting'][rand()] = $value;
+        }
     }
 
     // Delete "stub" objects

Added: trunk/plugins/sfDcPlugin/config/sfDcPluginConfiguration.class.php
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/plugins/sfDcPlugin/config/sfDcPluginConfiguration.class.php   Sun Nov 
29 13:13:40 2009        (r3999)
@@ -0,0 +1,40 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class sfDcPluginConfiguration extends sfPluginConfiguration
+{
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function configure()
+  {
+    $this->summary = '';
+    $this->version = '1.0.0';
+  }
+
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function initialize()
+  {
+    $moduleDirs = sfConfig::get('sf_module_dirs');
+    $moduleDirs[$this->rootDir.'/modules'] = false;
+    sfConfig::set('sf_module_dirs', $moduleDirs);
+  }
+}

Added: trunk/plugins/sfEadPlugin/config/sfEadPluginConfiguration.class.php
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/plugins/sfEadPlugin/config/sfEadPluginConfiguration.class.php Sun Nov 
29 13:13:40 2009        (r3999)
@@ -0,0 +1,40 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class sfEadPluginConfiguration extends sfPluginConfiguration
+{
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function configure()
+  {
+    $this->summary = '';
+    $this->version = '1.0.0';
+  }
+
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function initialize()
+  {
+    $moduleDirs = sfConfig::get('sf_module_dirs');
+    $moduleDirs[$this->rootDir.'/modules'] = false;
+    sfConfig::set('sf_module_dirs', $moduleDirs);
+  }
+}

Added: trunk/plugins/sfIsadPlugin/config/sfIsadPluginConfiguration.class.php
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/plugins/sfIsadPlugin/config/sfIsadPluginConfiguration.class.php       
Sun Nov 29 13:13:40 2009        (r3999)
@@ -0,0 +1,40 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class sfIsadPluginConfiguration extends sfPluginConfiguration
+{
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function configure()
+  {
+    $this->summary = '';
+    $this->version = '1.0.0';
+  }
+
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function initialize()
+  {
+    $moduleDirs = sfConfig::get('sf_module_dirs');
+    $moduleDirs[$this->rootDir.'/modules'] = false;
+    sfConfig::set('sf_module_dirs', $moduleDirs);
+  }
+}

Added: trunk/plugins/sfModsPlugin/config/sfModsPluginConfiguration.class.php
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/plugins/sfModsPlugin/config/sfModsPluginConfiguration.class.php       
Sun Nov 29 13:13:40 2009        (r3999)
@@ -0,0 +1,40 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class sfModsPluginConfiguration extends sfPluginConfiguration
+{
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function configure()
+  {
+    $this->summary = '';
+    $this->version = '1.0.0';
+  }
+
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function initialize()
+  {
+    $moduleDirs = sfConfig::get('sf_module_dirs');
+    $moduleDirs[$this->rootDir.'/modules'] = false;
+    sfConfig::set('sf_module_dirs', $moduleDirs);
+  }
+}

Added: trunk/plugins/sfRadPlugin/config/sfRadPluginConfiguration.class.php
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/plugins/sfRadPlugin/config/sfRadPluginConfiguration.class.php Sun Nov 
29 13:13:40 2009        (r3999)
@@ -0,0 +1,40 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class sfRadPluginConfiguration extends sfPluginConfiguration
+{
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function configure()
+  {
+    $this->summary = '';
+    $this->version = '1.0.0';
+  }
+
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function initialize()
+  {
+    $moduleDirs = sfConfig::get('sf_module_dirs');
+    $moduleDirs[$this->rootDir.'/modules'] = false;
+    sfConfig::set('sf_module_dirs', $moduleDirs);
+  }
+}

--

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.


Reply via email to