@@ -19,6 +19,6 @@ |
||
19 | 19 | * @version $Id$ |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
22 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
23 | 23 | |
24 | 24 | $xoops = Xoops::getInstance(); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | $modversion['name'] = _MI_PROTECTOR_NAME; |
27 | 27 | $modversion['description'] = constant('_MI_PROTECTOR_DESC'); |
28 | -$modversion['version'] = file_get_contents(__DIR__ . '/include/version.txt'); |
|
28 | +$modversion['version'] = file_get_contents(__DIR__.'/include/version.txt'); |
|
29 | 29 | $modversion['credits'] = "PEAK Corp."; |
30 | 30 | $modversion['author'] = "GIJ=CHECKMATE PEAK Corp.(http://www.peak.ne.jp/)"; |
31 | 31 | $modversion['help'] = 'page=help'; |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | |
78 | 78 | // Admin Templates |
79 | 79 | $modversion['templates'] = array( |
80 | - array( 'file' => 'protector_advisory.tpl', 'description' => '', 'type' => 'admin' ), |
|
81 | - array( 'file' => 'protector_prefix.tpl', 'description' => '', 'type' => 'admin' ), |
|
82 | - array( 'file' => 'protector_center.tpl', 'description' => '', 'type' => 'admin' ), |
|
80 | + array('file' => 'protector_advisory.tpl', 'description' => '', 'type' => 'admin'), |
|
81 | + array('file' => 'protector_prefix.tpl', 'description' => '', 'type' => 'admin'), |
|
82 | + array('file' => 'protector_center.tpl', 'description' => '', 'type' => 'admin'), |
|
83 | 83 | ); |
84 | 84 | |
85 | 85 | /* |
@@ -28,7 +28,7 @@ |
||
28 | 28 | if ($protector->ip_matched_info) { |
29 | 29 | printf(_MD_PROTECTOR_FMT_JAILINFO, date(_MD_PROTECTOR_FMT_JAILTIME, $protector->ip_matched_info)); |
30 | 30 | } |
31 | - error_log('Protector: badip ' . @$_SERVER['REMOTE_ADDR'], 0); |
|
31 | + error_log('Protector: badip '.@$_SERVER['REMOTE_ADDR'], 0); |
|
32 | 32 | exit; |
33 | 33 | } |
34 | 34 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | function execute() |
29 | 29 | { |
30 | - header('Location: ' . PROTECTOR_BADIP_REDIRECTION_URI); |
|
30 | + header('Location: '.PROTECTOR_BADIP_REDIRECTION_URI); |
|
31 | 31 | exit; |
32 | 32 | } |
33 | 33 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | header('Retry-After: 600'); |
28 | 28 | |
29 | 29 | echo _MD_PROTECTOR_BANDWIDTHLIMITED; |
30 | - error_log('Protector: bwlimit ' . @$_SERVER['REMOTE_ADDR'], 0); |
|
30 | + error_log('Protector: bwlimit '.@$_SERVER['REMOTE_ADDR'], 0); |
|
31 | 31 | exit; |
32 | 32 | } |
33 | 33 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $rev_ip = implode('.', array_reverse(explode('.', @$_SERVER['REMOTE_ADDR']))); |
40 | 40 | |
41 | 41 | foreach ($rbls as $rbl) { |
42 | - $host = $rev_ip . '.' . $rbl; |
|
42 | + $host = $rev_ip.'.'.$rbl; |
|
43 | 43 | if (gethostbyname($host) != $host) { |
44 | 44 | $this->protector->message .= "DENY by $rbl\n"; |
45 | 45 | $uid = $xoops->isUser() ? $xoops->user->getVar('uid') : 0; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | // http:bl servers (don't enable too many servers) |
32 | 32 | $rbls = array( |
33 | - 'http:BL' => PROTECTOR_HTTPBL_KEY . '.%s.dnsbl.httpbl.org', |
|
33 | + 'http:BL' => PROTECTOR_HTTPBL_KEY.'.%s.dnsbl.httpbl.org', |
|
34 | 34 | ); |
35 | 35 | |
36 | 36 | $rev_ip = implode('.', array_reverse(explode('.', @$_SERVER['REMOTE_ADDR']))); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $antispam_htmls = $this->getHtml4Assign(); |
41 | 41 | |
42 | - return preg_replace('/<form[^>]*action=["\'](|#|register.php)["\'][^>]+>/i', '$0' . "\n" . $antispam_htmls['html_in_form'] . "\n" . $antispam_htmls['js_global'], $s, 1); |
|
42 | + return preg_replace('/<form[^>]*action=["\'](|#|register.php)["\'][^>]+>/i', '$0'."\n".$antispam_htmls['html_in_form']."\n".$antispam_htmls['js_global'], $s, 1); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | // import from D3forumAntispamDefault.clas.php |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | if (empty($time)) { |
53 | 53 | $time = time(); |
54 | 54 | } |
55 | - return md5(gmdate('YmdH', $time) . \XoopsBaseConfig::get('db-prefix') . \XoopsBaseConfig::get('db-name')); |
|
55 | + return md5(gmdate('YmdH', $time).\XoopsBaseConfig::get('db-prefix').\XoopsBaseConfig::get('db-name')); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | function getHtml4Assign() |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | return array( |
85 | 85 | 'html_in_form' => '<input type="hidden" name="antispam_md5" id="antispam_md5" value="" />', |
86 | - 'js_global' => '<script type="text/javascript"><!--//' . "\n" . $js_in_validate_function . "\n" . '//--></script><noscript><div class="errorMsg">' . _MD_PROTECTOR_TURNJAVASCRIPTON . '</div></noscript>', |
|
86 | + 'js_global' => '<script type="text/javascript"><!--//'."\n".$js_in_validate_function."\n".'//--></script><noscript><div class="errorMsg">'._MD_PROTECTOR_TURNJAVASCRIPTON.'</div></noscript>', |
|
87 | 87 | ); |
88 | 88 | } |
89 | 89 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | static function eventCoreClassDatabaseDatabasefactoryConnection($args) |
62 | 62 | { |
63 | 63 | // Protector class |
64 | - require_once dirname(__DIR__) . '/class/protector.php'; |
|
64 | + require_once dirname(__DIR__).'/class/protector.php'; |
|
65 | 65 | |
66 | 66 | // Protector object |
67 | 67 | $protector = Protector::getInstance(); |