Author: jablko
Date: Tue Oct 26 10:01:01 2010
New Revision: 8507

Log:
Migrate "permalink" property to "slug"

Modified:
   trunk/data/fixtures/settings.yml
   trunk/lib/task/migrate/QubitMigrate109.class.php

Modified: trunk/data/fixtures/settings.yml
==============================================================================
--- trunk/data/fixtures/settings.yml    Tue Oct 26 09:53:50 2010        (r8506)
+++ trunk/data/fixtures/settings.yml    Tue Oct 26 10:01:01 2010        (r8507)
@@ -3,7 +3,7 @@
     name: version
     editable: 0
     deleteable: 0
-    value: 54
+    value: 55
   QubitSetting_2:
     name: upload_dir
     editable: 0

Modified: trunk/lib/task/migrate/QubitMigrate109.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate109.class.php    Tue Oct 26 09:53:50 
2010        (r8506)
+++ trunk/lib/task/migrate/QubitMigrate109.class.php    Tue Oct 26 10:01:01 
2010        (r8507)
@@ -80,6 +80,19 @@
 
       case 53:
         $this->activateIsdfPlugin();
+
+      case 54:
+        
+        // Replace "permalink" property with "slug"
+        foreach ($this->data['QubitStaticPage'] as $key => $value)
+        {
+          if (isset($value['permalink']))
+          {
+            $this->data['QubitStaticPage'][$key]['slug'] = $value['permalink'];
+
+            unset($this->data['QubitStaticPage'][$key]['permalink']);
+          }
+        }
     }
 
     // Delete "stub" objects

-- 
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