- Timestamp:
- Oct 30, 2007, 12:39:41 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/config_default.inc.php
r2106 r2155 94 94 // maximum number of links in a comment before it is qualified spam 95 95 $conf['comment_spam_max_links'] = 3; 96 97 // if the ip address of a comenteer is in spamhaus.org block list, the98 // comment is qualified spam99 $conf['comment_spam_check_ip'] = false;100 96 101 97 // calendar_datefield : date field of table "images" used for calendar -
trunk/include/functions_comment.inc.php
r2029 r2155 31 31 { 32 32 global $conf; 33 33 34 34 $time = time(); 35 35 … … 69 69 $link_count++; 70 70 } 71 71 72 72 if ( $link_count>$conf['comment_spam_max_links'] ) 73 73 return $my_action; 74 75 if ( isset($comment['ip']) and $conf['comment_spam_check_ip']76 and $_SERVER["SERVER_ADDR"] != $comment['ip']77 )78 {79 $rev_ip = implode( '.', array_reverse( explode('.',$comment['ip']) ) );80 $lookup = $rev_ip . '.sbl-xbl.spamhaus.org.';81 $res = gethostbyname( $lookup );82 if ( $lookup != $res )83 return $my_action;84 }85 74 86 75 return $action; … … 101 90 { 102 91 global $conf, $user; 103 104 $comm = array_merge( $comm, 92 93 $comm = array_merge( $comm, 105 94 array( 106 95 'ip' => $_SERVER['REMOTE_ADDR'], … … 162 151 $comment_action='reject'; 163 152 } 164 153 165 154 if ($comment_action!='reject' and $conf['anti-flood_time']>0 ) 166 155 { // anti-flood system … … 193 182 "'.($comment_action=='validate' ? 'true':'false').'", 194 183 '.($comment_action=='validate' ? 'NOW()':'NULL').', 195 '.$comm['image_id'].' 184 '.$comm['image_id'].' 196 185 ) 197 186 '; -
trunk/include/functions_url.inc.php
r2083 r2155 253 253 if ( !isset($params['category'] ) ) 254 254 {// make urls shorter ... 255 unset( $params['flat'] ); 255 unset( $params['flat'] ); 256 256 } 257 257 $url .= make_section_in_url($params); … … 623 623 * parses start, flat and chronology from url tokens 624 624 */ 625 function parse_well_known_params_url($tokens, $i)625 function parse_well_known_params_url($tokens, &$i) 626 626 { 627 627 $page = array(); -
trunk/include/picture_comment.inc.php
r2101 r2155 88 88 ); 89 89 } 90 90 elseif ( isset($_POST['content']) ) 91 { 92 set_status_header(403); 93 die('ugly spammer'); 94 } 91 95 92 96 if ($page['show_comments']) -
trunk/picture.php
r2079 r2155 245 245 246 246 // incrementation of the number of hits, we do this only if no action 247 if (trigger_event('allow_increment_element_hit_count', true) )247 if (trigger_event('allow_increment_element_hit_count', !isset($_POST['content']) ) ) 248 248 { 249 249 $query = '
Note: See TracChangeset
for help on using the changeset viewer.