Import/Core_notify.php
[Pman.Core] / Import / Core_notify.php
index a7a2472..551d545 100644 (file)
@@ -30,7 +30,9 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this, 'onPearError'));
         
         $this->modules = $this->modulesList();
-        print_R($this->modules);exit;
+        
+        $this->defaults();
+        
         $this->etype();
         
         
@@ -53,4 +55,24 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         
         $this->etype->insert();
     }
+    
+    function defaults()
+    {
+        foreach ($this->modules as $m){
+            $file = $this->rootDir. "/Pman/$m/Core.NotifyType.json";
+            
+            if(!file_exists($file)){
+                continue;
+            }
+            
+            $this->defaults[$m] = json_decode(file_get_contents($file), true);
+            
+        }
+        
+    }
+    
+    function log($str)
+    {
+        echo "$str \n";
+    }
 }
\ No newline at end of file