[pLog-svn] r7019 - plugins/branches/lifetype-1.2/akismet

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Aug 4 22:26:19 EDT 2010


Author: jondaley
Date: 2010-08-04 22:26:19 -0400 (Wed, 04 Aug 2010)
New Revision: 7019

Modified:
   plugins/branches/lifetype-1.2/akismet/pluginakismet.class.php
Log:
updated for compatibility with CSRF

Modified: plugins/branches/lifetype-1.2/akismet/pluginakismet.class.php
===================================================================
--- plugins/branches/lifetype-1.2/akismet/pluginakismet.class.php	2010-08-05 02:21:18 UTC (rev 7018)
+++ plugins/branches/lifetype-1.2/akismet/pluginakismet.class.php	2010-08-05 02:26:19 UTC (rev 7019)
@@ -32,7 +32,7 @@
 			$this->desc    = "Akismet checks your comments against the Akismet web serivce to see if they look like spam or not.";
 			$this->author  = "Paul Westbrook (Akismet php library provided by <a href=\"http://miphp.net/blog/view/php4_akismet_class\">Bret Kuhns</a>)";
 			$this->locales = Array( "en_UK" );
-            		$this->version = "20080228";
+            $this->version = "20100804";
 
 			if( $source == "admin" )
 				$this->initAdmin();
@@ -89,7 +89,7 @@
 
                 // load the current contents of the template
             $content = $params["content"];
-            $regexp = "/<div class=\"list_action_button\">.*?<\/div>/s";
+            $regexp = "/<div class=\"list_action_button\">(.*?)<\/div>/s";
             preg_match_all($regexp, $content, $matches, PREG_SET_ORDER);
 
                 // now process each one of the matches and do the replacements
@@ -97,8 +97,8 @@
                 if($action == "akismetSubmitComment"){
                         // fetch the comment id
                     $res = preg_match(
-                        "/<a href=\"\?op=deleteComment&amp;commentId=([0-9]+)&amp;/i",
-                        $match[0], $result);
+                        "/<a href=\"\?op=deleteComment&amp;.*commentId=([0-9]+)&amp;/Ui",
+                        $match[1], $result);
                 }
                 
 



More information about the pLog-svn mailing list