Author: david
Date: Thu Oct  8 16:57:29 2009
New Revision: 3705

Log:
Remove 'SUBJECT_ID' term constant. --force

Modified:
   trunk/data/fixtures/taxonomyTerms.yml
   trunk/lib/model/QubitTerm.php
   trunk/lib/task/migrate/QubitMigrate107to108.class.php

Modified: trunk/data/fixtures/taxonomyTerms.yml
==============================================================================
--- trunk/data/fixtures/taxonomyTerms.yml       Thu Oct  8 16:33:47 2009        
(r3704)
+++ trunk/data/fixtures/taxonomyTerms.yml       Thu Oct  8 16:57:29 2009        
(r3705)
@@ -305,19 +305,6 @@
       nl: Vervaardig
       pt: Produção
       sl: Ustvarjanje
-  QubitTerm_112:
-    taxonomy_id: QubitTaxonomy_10
-    parent_id: QubitTerm_110
-    id: <?php echo QubitTerm::SUBJECT_ID."\n" ?>
-    source_culture: en
-    name:
-      de: Gegenstand
-      en: Subject
-      fr: Sujet
-      it: Soggetto
-      nl: Onderwerp
-      pt: Assunto
-      sl: Osebek
   QubitTerm_113:
     taxonomy_id: QubitTaxonomy_10
     parent_id: QubitTerm_110
@@ -2050,16 +2037,6 @@
     source_culture: en
     content:
       en: 'ISAD(G) 3.2.1, 3.1.3; DC 1.1 core element (Creator); Rules for 
Archival Description 1.4B'
-  QubitNote_2:
-    object_id: QubitTerm_112
-    type_id: QubitTerm_122
-    scope: QubitTerm
-    source_culture: en
-    content:
-      en: Subject
-      fr: Sujet
-      nl: Onderwerp
-      pt: Assunto
   QubitNote_3:
     object_id: QubitTerm_113
     type_id: QubitTerm_122

Modified: trunk/lib/model/QubitTerm.php
==============================================================================
--- trunk/lib/model/QubitTerm.php       Thu Oct  8 16:33:47 2009        (r3704)
+++ trunk/lib/model/QubitTerm.php       Thu Oct  8 16:57:29 2009        (r3705)
@@ -36,7 +36,6 @@
 
   //EventType taxonomy
   const CREATION_ID = 111;
-  const SUBJECT_ID = 112;
   const CUSTODY_ID = 113;
   const PUBLICATION_ID = 114;
   const CONTRIBUTION_ID = 115;
@@ -106,7 +105,6 @@
     //The following terms cannot be edited by users because their values are 
used in application logic
     return $this->getId() == QubitTerm::ROOT_ID ||
     $this->getId() == QubitTerm::CREATION_ID ||
-    $this->getId() == QubitTerm::SUBJECT_ID ||
     $this->getId() == QubitTerm::CUSTODY_ID ||
     $this->getId() == QubitTerm::PUBLICATION_ID ||
     $this->getId() == QubitTerm::CONTRIBUTION_ID ||

Modified: trunk/lib/task/migrate/QubitMigrate107to108.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate107to108.class.php       Thu Oct  8 
16:33:47 2009        (r3704)
+++ trunk/lib/task/migrate/QubitMigrate107to108.class.php       Thu Oct  8 
16:57:29 2009        (r3705)
@@ -970,6 +970,18 @@
       }
     }
 
+    // Remove the "SUBJECT_ID" event type term
+    if ($subjectTermKey = $this->getTermKey('<?php echo 
QubitTerm::SUBJECT_ID."\n" ?>'))
+    {
+      // Remove the related QubitNote defining the possessive declension
+      while ($key = $this->getRowKey('QubitNote', 'object_id', 
$subjectTermKey))
+      {
+        unset($this->data['QubitNote'][$key]);
+      }
+
+      unset($this->data['QubitTerm'][$subjectTermKey]);
+    }
+
     return $this;
   }
 
@@ -998,7 +1010,6 @@
       'ROOT_ID',
       //EventType taxonomy
       'CREATION_ID',
-      'SUBJECT_ID',
       'CUSTODY_ID',
       'PUBLICATION_ID',
       'CONTRIBUTION_ID',

--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to