Import/Core_notify.php
[Pman.Core] / Import / Core_notify.php
index 8f76cdc..99ea3b7 100644 (file)
@@ -20,6 +20,8 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         
     }
 
+    var $defaults = array();
+    
     function get()
     {   
         
@@ -31,7 +33,9 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         
         $this->modules = $this->modulesList();
         
-        $this->config();
+        $this->defaults();
+        
+        print_r($this->defaults);exit;
         
         $this->etype();
         
@@ -56,11 +60,18 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         $this->etype->insert();
     }
     
-    function config()
+    function defaults()
     {
         foreach ($this->modules as $m){
-            $file = $this->rootDir. "/Pman/$m/NotifyType.json";
+            $file = $this->rootDir. "/Pman/$m/Core.NotifyType.json";
+            
+            if(!file_exists($file)){
+                continue;
+            }
+            
+            $this->defaults = array_merge($this->defaults, json_decode(file_get_contents($file), true)) ;
         }
+        
     }
     
     function log($str)