Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to use new API

git-svn-id: http://svn.php.net/repository/pear/pearweb/trunk@308830 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit 86bababae8dadb5b0a916db6ae375124b3b73213 1 parent f6e16cb
@CloCkWeRX CloCkWeRX authored
Showing with 20 additions and 10 deletions.
  1. +20 −10 public_html/bugs/report.php
View
30 public_html/bugs/report.php
@@ -462,7 +462,7 @@
$ip = $_SERVER['REMOTE_ADDR'];
// Uncomment for testing or get one from http://www.projecthoneypot.org/top_harvesters.php
// $ip = '209.85.138.136';
- $status = $sphp->query($ip);
+ $results = $sphp->query($ip);
} catch (Services_ProjectHoneyPot_Exception $e) {
report_error($e);
response_footer();
@@ -470,15 +470,25 @@
}
// Check about the last 30 days
- if (!isset($auth_user) && $status && $status->getLastActivity() < 30
- && ($status->isCommentSpammer() || $status->isHarvester() || $status->isSearchEngine())
- ) {
- $errors = 'We can not allow you to continue since your IP has been marked suspicious within the past 30 days
- by the http://projecthoneypot.org/, if that was done in error then please contact ' .
- PEAR_DEV_EMAIL . ' as well as the projecthoneypot people to resolve the issue.';
- report_error($errors);
- response_footer();
- exit;
+ if (!isset($auth_user) && $results) {
+ foreach ($results as $status) {
+ foreach ($status as $ip => $item) {
+ if (empty($item)) {
+ continue;
+ }
+
+ if ($status->getLastActivity() < 30 && ($status->isCommentSpammer()
+ || $status->isHarvester()
+ || $status->isSearchEngine())) {
+ $errors = 'We can not allow you to continue since your IP has been marked suspicious within the past 30 days
+ by the http://projecthoneypot.org/, if that was done in error then please contact ' .
+ PEAR_DEV_EMAIL . ' as well as the projecthoneypot people to resolve the issue.';
+ report_error($errors);
+ response_footer();
+ exit;
+ }
+ }
+ }
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.