From: Alan Knowles Date: Tue, 25 Apr 2017 04:06:10 +0000 (+0800) Subject: Notify.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=5ff4d5ffbdad938aed7d97018e967941dea16348 Notify.php --- diff --git a/Notify.php b/Notify.php index 648e1d60..3f3321c3 100644 --- a/Notify.php +++ b/Notify.php @@ -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(); + } + + } }