OSDN Git Service
(root)
/
pukiwiki
/
pukiwiki_sandbox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A little cleanup
[pukiwiki/pukiwiki_sandbox.git]
/
spam
/
spam.php
diff --git
a/spam/spam.php
b/spam/spam.php
index
b4908a3
..
3cc34ff
100644
(file)
--- a/
spam/spam.php
+++ b/
spam/spam.php
@@
-1,5
+1,5
@@
<?php
<?php
-// $Id: spam.php,v 1.20
0 2007/07/29 12:59:24
henoheno Exp $
+// $Id: spam.php,v 1.20
1 2007/08/17 14:33:32
henoheno Exp $
// Copyright (C) 2006-2007 PukiWiki Developers Team
// License: GPL v2 or (at your option) any later version
//
// Copyright (C) 2006-2007 PukiWiki Developers Team
// License: GPL v2 or (at your option) any later version
//
@@
-225,10
+225,13
@@
function array_rename_keys(& $array, $keys = array('from' => 'to'), $force = FAL
if (! is_array($array) || ! is_array($keys)) return FALSE;
// Nondestructive test
if (! is_array($array) || ! is_array($keys)) return FALSE;
// Nondestructive test
- if (! $force)
- foreach(array_keys($keys) as $from)
- if (! isset($array[$from]))
+ if (! $force)
{
+ foreach(array_keys($keys) as $from)
{
+ if (! isset($array[$from]))
{
return FALSE;
return FALSE;
+ }
+ }
+ }
foreach($keys as $from => $to) {
if ($from === $to) continue;
foreach($keys as $from => $to) {
if ($from === $to) continue;
@@
-317,7
+320,6
@@
function generate_host_regex($string = '', $divider = '/')
if (mb_strpos($string, '.') === FALSE)
return generate_glob_regex($string, $divider);
if (mb_strpos($string, '.') === FALSE)
return generate_glob_regex($string, $divider);
- $result = '';
if (is_ip($string)) {
// IPv4
return generate_glob_regex($string, $divider);
if (is_ip($string)) {
// IPv4
return generate_glob_regex($string, $divider);