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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Jan 12 12:42:22 EST 2022


Author: jondaley
Date: 2022-01-12 12:42:22 -0500 (Wed, 12 Jan 2022)
New Revision: 7256

Modified:
   plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php
Log:
don't do anything when adding posts or comments if the plugin is installed but not enabled

Modified: plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php
===================================================================
--- plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php	2022-01-12 16:40:49 UTC (rev 7255)
+++ plugins/branches/lifetype-1.2/subscribe/pluginsubscribe.class.php	2022-01-12 17:42:22 UTC (rev 7256)
@@ -118,6 +118,9 @@
             
             switch($eventType){
               case EVENT_POST_POST_ADD:
+               if(!$this->isEnabled())
+                 return;
+               
                 $article = $params["article"];
                 if(!$article || $article->getStatus() != POST_STATUS_PUBLISHED)
                     return;
@@ -150,6 +153,9 @@
                 break;
 
               case EVENT_POST_COMMENT_ADD:
+               if(!$this->isEnabled())
+                 return;
+               
                 lt_include(PLOG_CLASS_PATH.
                              "class/dao/usercomment.class.php");
                 lt_include(PLOG_CLASS_PATH.
@@ -233,4 +239,4 @@
         }
         
     }
-?>
\ No newline at end of file
+?>



More information about the pLog-svn mailing list