DataObjects/core.sql
[Pman.Core] / UpdateDatabase.php
index ed558cf..3e34258 100644 (file)
@@ -392,6 +392,16 @@ class Pman_Core_UpdateDatabase extends Pman
         $groups = DB_DataObject::factory('groups');
         $groups->initGroups();
         
+        $groups->initDatabase($this,array(
+            array(
+                'name' => 'bcc-email', // group who are bcc'ed on all requests.
+                'type' => 0, // system
+            ),
+            
+        ));
+        
+        
+        
         // fix comptypes enums..
         $c = DB_DataObject::Factory('Companies');
         $c->selectAdd();
@@ -400,10 +410,12 @@ class Pman_Core_UpdateDatabase extends Pman
            $ctb[0]['cn'][] = array( 'name' => $cts, 'display_name' => ucfirst(strtolower($cts)));
         
         }
+        
+         
         $c = DB_DataObject::Factory('core_enum');
          
         $c->initEnums($ctb);
-        
+        //DB_DataObject::debugLevel(1);
         // fix comptypeid
         $c = DB_DataObject::Factory('Companies');
         $c->query("
@@ -412,10 +424,12 @@ class Pman_Core_UpdateDatabase extends Pman
                     comptype_id = (SELECT id FROM core_enum where etype='comptype' and name=Companies.comptype)
                 WHERE
                     comptype_id = 0
+                    AND
+                    LENGTH(comptype) > 0
                   
                   
                   ");
-        
+