OSDN Git Service

v1.0.3
authorhsur <hsur@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 20 Feb 2007 08:06:07 +0000 (08:06 +0000)
committerhsur <hsur@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 20 Feb 2007 08:06:07 +0000 (08:06 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@533 1ca29b6e-896d-4ea0-84a5-967f57386b96

trunk/NP_Blacklist/NP_Blacklist.php
trunk/NP_Blacklist/blacklist/blacklist_lib.php

index 673aab8..bea0c39 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 /**
-  * NP_Blacklist(JP) ($Revision: 1.8 $)
+  * NP_Blacklist(JP) ($Revision: 1.9 $)
   * by hsur ( http://blog.cles.jp/np_cles )
-  * $Id: NP_Blacklist.php,v 1.8 2007-02-11 08:57:12 hsur Exp $
+  * $Id: NP_Blacklist.php,v 1.9 2007-02-20 08:06:07 hsur Exp $
   *
   * Based on NP_Blacklist 0.98
   * by xiffy
@@ -41,10 +41,10 @@ class NP_Blacklist extends NucleusPlugin {
                return 'http://blog.cles.jp/np_cles/category/31/subcatid/11';
        }
        function getVersion() {
-               return '1.0.2';
+               return '1.0.3';
        }
        function getDescription() {
-               return '[$Revision: 1.8 $]<br />'.NP_BLACKLIST_description;
+               return '[$Revision: 1.9 $]<br />'.NP_BLACKLIST_description;
        }
        function supportsFeature($what) {
                switch ($what) {
@@ -317,7 +317,7 @@ class NP_Blacklist extends NucleusPlugin {
                // setup settings
                if ($this->_is_writable($settingsDir)) {
                        foreach ($settings as $setting) {
-                               touch($settingsDir.$setting);
+                               @touch($settingsDir.$setting);
                        }
                        // setup personal blacklist
                        if (!file_exists($personalBlacklist)) {
index d474b8d..83ab53f 100644 (file)
@@ -19,7 +19,7 @@
 //
 // Modified by hsur
 // http://blog.cles.jp
-// $Id: blacklist_lib.php,v 1.7 2007-02-06 16:15:37 hsur Exp $
+// $Id: blacklist_lib.php,v 1.8 2007-02-20 08:06:07 hsur Exp $
 
 define('__WEBLOG_ROOT', dirname(dirname(realpath(__FILE__))));
 define('__EXT', '/blacklist');
@@ -77,6 +77,7 @@ function pbl_checkforspam($text, $ipblock = false, $ipthreshold = 10, $logrule =
                                        if ($logrule) {
                                                pbl_logRule($expression);
                                        }
+                                       fclose($handle);
                                        return $expression;
                                }
                        }
@@ -365,8 +366,7 @@ function check_for_iprbl() {
 
 function check_for_domainrbl($comment_text) {
        $domainrbl = array ('rbl.bulkfeeds.jp', 'url.rbl.jp', 'bsb.spamlookup.net');
-       $regex_url = "{https?://(?:www\.)?([a-z0-9._-]{2,})(?::[0-9]+)?((?:/[_.!~*a-z0-9;@&=+$,%-]+){0,2})}m";
-       $comment_text = mb_strtolower($comment_text);
+       $regex_url = "{https?://(?:www\.)?([a-z0-9._-]{2,})(?::[0-9]+)?((?:/[_.!~*a-z0-9;@&=+$,%-]+){0,2})}mi";
 
        $mk_regex_array = array ();
        preg_match_all($regex_url, $comment_text, $mk_regex_array);