Notify.php
authorAlan Knowles <alan@roojs.com>
Tue, 25 Apr 2017 04:06:10 +0000 (12:06 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 25 Apr 2017 04:06:10 +0000 (12:06 +0800)
Notify.php

index 648e1d6..3f3321c 100644 (file)
@@ -296,7 +296,32 @@ class Pman_Core_Notify extends Pman
     {
         // this should check each module for 'GenerateNotifications.php' class..
         //and run it if found..
+       
+     
+        $modules = array_reverse($this->modulesList());
+        
+        // move 'project' one to the end...
         
+        foreach ($modules as $module){
+            if(in_array($module, $this->disabled)){
+                continue;
+            }
+            $file = $this->rootDir. "/Pman/$module/GenerateNotifications.php";
+            if(!file_exists($file)){
+                continue;
+            }
+            
+            require_once $file;
+            $class = "Pman_{$module}_GenerateNotifications";
+            $x = new $class;
+            if(!method_exists($x, 'generate')){
+                continue;
+            };
+            //echo "$module\n";
+            $x->updateData();
+        }
+                
+    }
     }