OSDN Git Service

Added, simplify
[pukiwiki/pukiwiki_sandbox.git] / spam / spam.php
index b100f1f..b4908a3 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: spam.php,v 1.198 2007/07/28 12:47:28 henoheno Exp $
+// $Id: spam.php,v 1.200 2007/07/29 12:59:24 henoheno Exp $
 // Copyright (C) 2006-2007 PukiWiki Developers Team
 // License: GPL v2 or (at your option) any later version
 //
@@ -568,7 +568,7 @@ function check_uri_spam($target = '', $method = array())
 
                        // Merge only
                        $blocked = array_merge_leaves($blocked, $_progress['blocked'], FALSE);
-                       $hosts   = array_merge_leaves($hosts,   $_progress['hosts']),  FALSE;
+                       $hosts   = array_merge_leaves($hosts,   $_progress['hosts'],   FALSE);
                }
 
                // Unique values
@@ -684,7 +684,7 @@ function check_uri_spam($target = '', $method = array())
        // Host: Uniqueness (uniq / non-uniq)
        foreach ($pickups as $pickup) $hosts[] = & $pickup['host'];
        $hosts = array_unique($hosts);
-       $sum['uniqhost'] += count($hosts);
+       if (isset($sum['uniqhost'])) $sum['uniqhost'] += count($hosts);
        if ((! $asap || ! $is_spam) && isset($method['non_uniqhost'])) {
                $sum['non_uniqhost'] = $sum['quantity'] - $sum['uniqhost'];
                if ($sum['non_uniqhost'] > $method['non_uniqhost']) {