Author: david
Date: Thu Oct 28 16:48:11 2010
New Revision: 8641

Log:
Migrate QubitTerm::RELATION_NOTE_DATE_DISPLAY_ID to RELATION_NOTE_DATE_ID like 
r8551.

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

Modified: trunk/data/fixtures/settings.yml
==============================================================================
--- trunk/data/fixtures/settings.yml    Thu Oct 28 16:32:29 2010        (r8640)
+++ trunk/data/fixtures/settings.yml    Thu Oct 28 16:48:11 2010        (r8641)
@@ -3,7 +3,7 @@
     name: version
     editable: 0
     deleteable: 0
-    value: 61
+    value: 62
   QubitSetting_2:
     name: upload_dir
     editable: 0

Modified: trunk/lib/task/migrate/QubitMigrate109.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate109.class.php    Thu Oct 28 16:32:29 
2010        (r8640)
+++ trunk/lib/task/migrate/QubitMigrate109.class.php    Thu Oct 28 16:48:11 
2010        (r8641)
@@ -208,6 +208,9 @@
             $this->data['QubitEvent'][$key]['end_date'] = $value['start_date'];
           }
         }
+
+      case 61:
+        $this->renameRelationNoteDateConstant();
     }
 
     // Delete "stub" objects
@@ -665,6 +668,31 @@
   }
 
   /**
+   * Ver 62: Update name of QubitTerm::RELATION_NOTE_DATE_ID
+   *
+   * @return QubitMigrate109 this object
+   */
+  protected function renameRelationNoteDateConstant()
+  {
+    foreach ($this->data['QubitTerm'] as $key => &$item)
+    {
+      if (false !== strpos($item['id'], 'RELATION_NOTE_DATE_DISPLAY_ID'))
+      {
+        $item['id'] = str_replace('RELATION_NOTE_DATE_DISPLAY_ID', 
'RELATION_NOTE_DATE_ID', $item['id']);
+      }
+    }
+
+    foreach($this->data['QubitNote'] as $key => &$item)
+    {
+      if (false !== strpos($item['type_id'], 'RELATION_NOTE_DATE_DISPLAY_ID'))
+      {
+        $item['type_id'] = str_replace('RELATION_NOTE_DATE_DISPLAY_ID', 
'RELATION_NOTE_DATE_ID', $item['type_id']);
+      }
+    }
+  }
+
+
+  /**
    * 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.

Reply via email to