Skip to content

Commit

Permalink
port from 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
garvinhicking committed Apr 29, 2013
1 parent 1e540cb commit e5905d5
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -448,7 +448,8 @@ function htaccess_update($new_ip) {

serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}spamblock_htaccess (ip, timestamp) VALUES ('" . serendipity_db_escape_string($new_ip) . "', '" . time() . "')");

$q = "SELECT ip FROM {$serendipity['dbPrefix']}spamblock_htaccess WHERE timestamp > " . (time() - 86400*2) . " GROUP BY ip";
// Temporarily hardcoded fix by DLang to prevent .htaccess growing too large.
$q = "SELECT ip FROM {$serendipity['dbPrefix']}spamblock_htaccess WHERE timestamp > " . (time() - 86400*2) . " GROUP BY ip ORDER BY timestamp DESC LIMIT 177";
$rows = serendipity_db_query($q, false, 'assoc');

$deny = array();
Expand Down

0 comments on commit e5905d5

Please sign in to comment.