Import/Core_notify.php
[Pman.Core] / Import / Core_notify.php
index cf02810..551d545 100644 (file)
@@ -29,6 +29,10 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         
         PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this, 'onPearError'));
         
+        $this->modules = $this->modulesList();
+        
+        $this->defaults();
+        
         $this->etype();
         
         
@@ -52,8 +56,23 @@ class Pman_Core_Import_Core_notify extends Pman_Roo
         $this->etype->insert();
     }
     
-    function modules()
+    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