Import/Core_notify.php
authorEdward <edward@roojs.com>
Wed, 11 Feb 2015 07:57:46 +0000 (15:57 +0800)
committerEdward <edward@roojs.com>
Wed, 11 Feb 2015 07:57:46 +0000 (15:57 +0800)
Import/Core_notify.php

index a779748..eeffb05 100644 (file)
@@ -35,24 +35,33 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         
         $this->etype();
         
-        $this->defaults();
-        
-        foreach ($this->defaults as $k => $v){
-            $enum = DB_DataObject::factory('core_enum');
-            $enum->setFrom(array(
-                'etype' => $this->etype->name,
-                'name' => $k,
-                'active' => 1
-            ));
-            
-            if($enum->find(true)){
-                continue;
-            }
-            
-            $enum->display_name = $v;
-            $enum->insert();
-        }
-        
+//        $this->defaults();
+//        
+//        foreach ($this->defaults as $k => $v){
+//            $enum = DB_DataObject::factory('core_enum');
+//            $enum->setFrom(array(
+//                'etype' => $this->etype->name,
+//                'name' => $k,
+//                'active' => 1
+//            ));
+//            
+//            if($enum->find(true)){
+//                continue;
+//            }
+//            
+//            $enum->display_name = $v;
+//            $enum->insert();
+//        }
+//        
+        $notify = DB_DataObject::factory('core_notify');
+        $notify->selectAdd();
+        $notify->selectAdd("
+            DISTINCT(evtype) AS evtype
+        ");
+        
+        $types = $notify->fetchAll();
+        
+        print_r($types);exit;