@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | </div> |
| 115 | 115 | </div> |
| 116 | 116 | <br /> |
| 117 | - <?php if ( empty($xss_protected_list)) : ?> |
|
| 117 | + <?php if (empty($xss_protected_list)) : ?> |
|
| 118 | 118 | <div id="so-table-container" class="so-datatables"> |
| 119 | 119 | <table id="so-datalog" class="cell-border compact stripe responsive" cellspacing="0" width="100%"> |
| 120 | 120 | <tbody> |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | </tr> |
| 147 | 147 | </thead> |
| 148 | 148 | <tbody> |
| 149 | - <?php if (! empty($xss_protected_list)) : ?> |
|
| 149 | + <?php if (!empty($xss_protected_list)) : ?> |
|
| 150 | 150 | <?php foreach ($xss_protected_list as $i => $info) : ?> |
| 151 | 151 | <tr> |
| 152 | 152 | <td><?php echo $info['type']; ?></td> |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | </tr> |
| 78 | 78 | </thead> |
| 79 | 79 | <tbody> |
| 80 | - <?php if (! empty($exclusion_list)) : ?> |
|
| 80 | + <?php if (!empty($exclusion_list)) : ?> |
|
| 81 | 81 | <?php foreach ($exclusion_list as $i => $urlInfo) : ?> |
| 82 | 82 | <tr> |
| 83 | 83 | <td><?php echo $urlInfo['url']; ?></td> |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | public static function get(array $setting): MessengerInterface |
| 31 | 31 | { |
| 32 | 32 | $botToken = $setting['config']['bot_token'] ?? ''; |
| 33 | - $channel = $setting['config']['channel'] ?? ''; |
|
| 33 | + $channel = $setting['config']['channel'] ?? ''; |
|
| 34 | 34 | |
| 35 | 35 | return new Slack($botToken, $channel); |
| 36 | 36 | } |
@@ -30,10 +30,10 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public static function get(array $setting): MessengerInterface |
| 32 | 32 | { |
| 33 | - $apiKey = $setting['config']['api_key'] ?? ''; |
|
| 33 | + $apiKey = $setting['config']['api_key'] ?? ''; |
|
| 34 | 34 | $domain = $setting['config']['domain_name'] ?? ''; |
| 35 | - $sender = $setting['config']['sender'] ?? ''; |
|
| 36 | - $recipients = $setting['config']['recipients'] ?? []; |
|
| 35 | + $sender = $setting['config']['sender'] ?? ''; |
|
| 36 | + $recipients = $setting['config']['recipients'] ?? []; |
|
| 37 | 37 | |
| 38 | 38 | $instance = new Mailgun($apiKey, $domain); |
| 39 | 39 | $instance->setSubject(__('core', 'messenger_text_mail_subject')); |
@@ -29,10 +29,10 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public static function get(array $setting): MessengerInterface |
| 31 | 31 | { |
| 32 | - $serverUrl = $setting['config']['server_url'] ?? ''; |
|
| 33 | - $userId = $setting['config']['user_id'] ?? ''; |
|
| 32 | + $serverUrl = $setting['config']['server_url'] ?? ''; |
|
| 33 | + $userId = $setting['config']['user_id'] ?? ''; |
|
| 34 | 34 | $accessToken = $setting['config']['access_token'] ?? ''; |
| 35 | - $channel = $setting['config']['channel'] ?? ''; |
|
| 35 | + $channel = $setting['config']['channel'] ?? ''; |
|
| 36 | 36 | |
| 37 | 37 | return new RocketChat($accessToken, $userId, $serverUrl, $channel); |
| 38 | 38 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | ]; |
| 198 | 198 | |
| 199 | 199 | if (empty($dataRange[$this->type])) { |
| 200 | - if (preg_match('/past_([0-9]+)_days/', $this->type, $matches) ) { |
|
| 200 | + if (preg_match('/past_([0-9]+)_days/', $this->type, $matches)) { |
|
| 201 | 201 | $dayCount = $matches[1]; |
| 202 | 202 | $startDate = date('Ymd', strtotime('-' . $dayCount . ' days')); |
| 203 | 203 | $endDate = date('Ymd'); |
@@ -336,21 +336,21 @@ discard block |
||
| 336 | 336 | return []; |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | - $results['captcha_chart_string'] = ''; // string |
|
| 340 | - $results['pageview_chart_string'] = ''; // string |
|
| 341 | - $results['captcha_success_count'] = 0; // integer |
|
| 342 | - $results['captcha_failure_count'] = 0; // integer |
|
| 343 | - $results['captcha_count'] = 0; // integer |
|
| 344 | - $results['pageview_count'] = 0; // integer |
|
| 345 | - $results['captcha_percentageage'] = 0; // integer |
|
| 339 | + $results['captcha_chart_string'] = ''; // string |
|
| 340 | + $results['pageview_chart_string'] = ''; // string |
|
| 341 | + $results['captcha_success_count'] = 0; // integer |
|
| 342 | + $results['captcha_failure_count'] = 0; // integer |
|
| 343 | + $results['captcha_count'] = 0; // integer |
|
| 344 | + $results['pageview_count'] = 0; // integer |
|
| 345 | + $results['captcha_percentageage'] = 0; // integer |
|
| 346 | 346 | $results['captcha_failure_percentage'] = 0; // integer |
| 347 | 347 | $results['captcha_success_percentage'] = 0; // integer |
| 348 | 348 | |
| 349 | - $results['action_ban_count'] = 0; // integer |
|
| 350 | - $results['action_temp_ban_count'] = 0; // integer |
|
| 351 | - $results['action_unban_count'] = 0; // integer |
|
| 352 | - $results['blacklist_count'] = 0; // integer |
|
| 353 | - $results['session_limit_count'] = 0; // integer |
|
| 349 | + $results['action_ban_count'] = 0; // integer |
|
| 350 | + $results['action_temp_ban_count'] = 0; // integer |
|
| 351 | + $results['action_unban_count'] = 0; // integer |
|
| 352 | + $results['blacklist_count'] = 0; // integer |
|
| 353 | + $results['session_limit_count'] = 0; // integer |
|
| 354 | 354 | |
| 355 | 355 | $ipdData = $this->getIpData(); |
| 356 | 356 | |
@@ -391,22 +391,22 @@ discard block |
||
| 391 | 391 | { |
| 392 | 392 | $periodData = $this->getPeriodData(); |
| 393 | 393 | |
| 394 | - $results['captcha_chart_string'] = ''; // string |
|
| 395 | - $results['pageview_chart_string'] = ''; // string |
|
| 396 | - $results['label_chart_string'] = ''; // string |
|
| 397 | - $results['captcha_success_count'] = 0; // integer |
|
| 398 | - $results['captcha_failure_count'] = 0; // integer |
|
| 399 | - $results['captcha_count'] = 0; // integer |
|
| 400 | - $results['pageview_count'] = 0; // integer |
|
| 401 | - $results['captcha_percentageage'] = 0; // integer |
|
| 394 | + $results['captcha_chart_string'] = ''; // string |
|
| 395 | + $results['pageview_chart_string'] = ''; // string |
|
| 396 | + $results['label_chart_string'] = ''; // string |
|
| 397 | + $results['captcha_success_count'] = 0; // integer |
|
| 398 | + $results['captcha_failure_count'] = 0; // integer |
|
| 399 | + $results['captcha_count'] = 0; // integer |
|
| 400 | + $results['pageview_count'] = 0; // integer |
|
| 401 | + $results['captcha_percentageage'] = 0; // integer |
|
| 402 | 402 | $results['captcha_failure_percentage'] = 0; // integer |
| 403 | 403 | $results['captcha_success_percentage'] = 0; // integer |
| 404 | 404 | |
| 405 | - $results['action_ban_count'] = 0; // integer |
|
| 406 | - $results['action_temp_ban_count'] = 0; // integer |
|
| 407 | - $results['action_unban_count'] = 0; // integer |
|
| 408 | - $results['blacklist_count'] = 0; // integer |
|
| 409 | - $results['session_limit_count'] = 0; // integer |
|
| 405 | + $results['action_ban_count'] = 0; // integer |
|
| 406 | + $results['action_temp_ban_count'] = 0; // integer |
|
| 407 | + $results['action_unban_count'] = 0; // integer |
|
| 408 | + $results['blacklist_count'] = 0; // integer |
|
| 409 | + $results['session_limit_count'] = 0; // integer |
|
| 410 | 410 | |
| 411 | 411 | if (!empty($periodData)) { |
| 412 | 412 | |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | $results['captcha_chart_string'] = implode(',', $chartCaptcha); |
| 439 | - $results['pageview_chart_string']= implode(',', $chartPageview); |
|
| 439 | + $results['pageview_chart_string'] = implode(',', $chartPageview); |
|
| 440 | 440 | $results['captcha_success_chart_string'] = implode(',', $chartCaptchaSuccess); |
| 441 | 441 | $results['captcha_failure_chart_string'] = implode(',', $chartCaptchaFailure); |
| 442 | 442 | $results['label_chart_string'] = "'" . implode("','", $labels) . "'"; |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | $ip = $log['ip']; |
| 467 | 467 | $sessionId = $log['session_id']; |
| 468 | 468 | |
| 469 | - $this->ipDetail[$t][$ip]['session_id'][$sessionId ] = 1; |
|
| 469 | + $this->ipDetail[$t][$ip]['session_id'][$sessionId] = 1; |
|
| 470 | 470 | |
| 471 | 471 | if ($logActionCode === self::LOG_TEMPORARILY_BAN) { |
| 472 | 472 | $this->periodDetail[$t][$k]['action_temp_ban_count']++; |
@@ -356,8 +356,8 @@ |
||
| 356 | 356 | $path = []; |
| 357 | 357 | |
| 358 | 358 | $path['filter'] = $this->directory . '/' . $this->tableFilterLogs . '/' . $ip . '.' . $this->extension; |
| 359 | - $path['session'] = $this->directory . '/' . $this->tableSessions . '/' . $ip . '.' . $this->extension; |
|
| 360 | - $path['rule'] = $this->directory . '/' . $this->tableRuleList . '/' . $ip . '.' . $this->extension; |
|
| 359 | + $path['session'] = $this->directory . '/' . $this->tableSessions . '/' . $ip . '.' . $this->extension; |
|
| 360 | + $path['rule'] = $this->directory . '/' . $this->tableRuleList . '/' . $ip . '.' . $this->extension; |
|
| 361 | 361 | |
| 362 | 362 | return $path[$type] ?? ''; |
| 363 | 363 | } |
@@ -614,9 +614,9 @@ |
||
| 614 | 614 | $this->initComponents(); |
| 615 | 615 | |
| 616 | 616 | $processMethods = [ |
| 617 | - 'isRuleExist', // Stage 1 - Looking for rule table. |
|
| 618 | - 'isTrustedBot', // Stage 2 - Detect popular search engine. |
|
| 619 | - 'isFakeRobot', // Stage 3 - Reject fake search engine crawlers. |
|
| 617 | + 'isRuleExist', // Stage 1 - Looking for rule table. |
|
| 618 | + 'isTrustedBot', // Stage 2 - Detect popular search engine. |
|
| 619 | + 'isFakeRobot', // Stage 3 - Reject fake search engine crawlers. |
|
| 620 | 620 | 'isIpComponent', // Stage 4 - IP manager. |
| 621 | 621 | 'isComponents' // Stage 5 - Check other components. |
| 622 | 622 | ]; |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | ?> |
| 19 | 19 | |
| 20 | 20 | <div class="so-dashboard"> |
| 21 | - <?php if (! empty($period_data)) : ?> |
|
| 21 | + <?php if (!empty($period_data)) : ?> |
|
| 22 | 22 | <div class="so-flex"> |
| 23 | 23 | <div class="so-board"> |
| 24 | 24 | <div class="board-field left"> |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | </tr> |
| 90 | 90 | </thead> |
| 91 | 91 | <tbody> |
| 92 | - <?php if (! empty($ip_details)) : ?> |
|
| 92 | + <?php if (!empty($ip_details)) : ?> |
|
| 93 | 93 | <?php foreach ($ip_details as $ip => $ipInfo) : ?> |
| 94 | 94 | <tr> |
| 95 | 95 | <td> |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | </table> |
| 113 | 113 | </div> |
| 114 | 114 | <div class="so-timezone"> |
| 115 | - <?php if (! empty($last_cached_time)) : ?> |
|
| 115 | + <?php if (!empty($last_cached_time)) : ?> |
|
| 116 | 116 | <?php _e('panel', 'log_label_cache_time', 'Report generated time'); ?>: <strong class="text-info"><?php echo $last_cached_time; ?></strong> |
| 117 | 117 | |
| 118 | 118 | <?php endif; ?> |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | <?php |
| 124 | 124 | |
| 125 | - if (! empty($period_data)) { |
|
| 125 | + if (!empty($period_data)) { |
|
| 126 | 126 | $data['period_data'] = $period_data; |
| 127 | 127 | $this->loadViewPart('panel/js/chart', $data); |
| 128 | 128 | } |