[pLog-svn] r7264 - plugins/branches/lifetype-1.2/subscribe

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Jan 10 07:59:49 EST 2024


Author: jondaley
Date: 2024-01-10 07:59:49 -0500 (Wed, 10 Jan 2024)
New Revision: 7264

Modified:
   plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php
Log:
process needs to call register first?  Otherwise process gets called before register so isEnabled() returns false.  Need to check if I wrote something wrong with this plugin

Modified: plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php
===================================================================
--- plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php	2024-01-10 12:12:12 UTC (rev 7263)
+++ plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php	2024-01-10 12:59:49 UTC (rev 7264)
@@ -110,16 +110,20 @@
          * This method processes our event notifications
          */        
         function process($eventType, $params){        
+          $this->register();
+            lt_include( PLOG_CLASS_PATH."class/logger/loggermanager.class.php" );
+            $logger =& LoggerManager::getLogger( "debug" );
+
             lt_include(PLOG_CLASS_PATH."class/data/textfilter.class.php");
             lt_include(PLOG_CLASS_PATH."class/dao/article.class.php");
             lt_include(PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );	
 
             $locale = $this->blogInfo->getLocale();
-            
+
             switch($eventType){
               case EVENT_POST_POST_ADD:
                if(!$this->isEnabled())
-                 return;
+                 return true;
                
                 $article = $params["article"];
                 if(!$article || $article->getStatus() != POST_STATUS_PUBLISHED)
@@ -133,6 +137,7 @@
                 $rg = RequestGenerator::getRequestGenerator($this->blogInfo);
                 $arr = Subscriptions::getSubscriptions($article->getCategoryIds(),
                                         SUBSCRIBE_POSTS_IN_CATEGORY);
+
                 foreach($arr as $email){
                         // TODO: provide a templating
                         // mechanism for the body of the email



More information about the pLog-svn mailing list