Re: Marketing-trac: #154: I'm told to slow down when I wasn't moving too fast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#154: I'm told to slow down when I wasn't moving too fast
------------------------------+-----------------------------
  Reporter:  mattdm           |      Owner:  chrisroberts
      Type:  task             |     Status:  closed
  Priority:  blocker          |  Milestone:  Future releases
 Component:  Fedora Magazine  |   Severity:  urgent
Resolution:  fixed            |   Keywords:
Blocked By:                   |   Blocking:
------------------------------+-----------------------------
Changes (by chrisroberts):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Fixed the following in the comments.php removing the $ip from the db_flood
 control

 function check_comment_flood_db( $email, $date ) {
         global $wpdb;
         if ( current_user_can( 'manage_options' ) )
                 return; // don't throttle admins
         $hour_ago = gmdate( 'Y-m-d H:i:s', time() - 3600 );
         if ( $lasttime = $wpdb->get_var( $wpdb->prepare( "SELECT
 <code>comment_date_gmt</code> FROM <code>$wpdb->comments</code> WHERE
 <code>comment_date_gmt</code> >= %s AND ( <code>comment_author_IP</code> =
 %s OR <code>comment_author_email</code> = %s ) ORDER BY
 <code>comment_date_gmt</code> DESC LIMIT 1", $hour_ago, $ip, $email ) ) )
 {
                 $time_lastcomment = mysql2date('U', $lasttime, false);
                 $time_newcomment  = mysql2date('U', $date, false);
                 $flood_die = apply_filters('comment_flood_filter', false,
 $time_lastcomment, $time_newcomment);
                 if ( $flood_die ) {
                         do_action('comment_flood_trigger',
 $time_lastcomment, $time_newcomment);

                         if ( defined('DOING_AJAX') )
                                 die( __('You are posting comments too
 quickly.  Slow down.') );

-- 
Ticket URL: <https://fedorahosted.org/marketing-team/ticket/154#comment:13>
marketing-team <https://fedoraproject.org/wiki/Marketing>
Marketing team for the Fedora project.
-- 
marketing mailing list
marketing@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/marketing





[Index of Archives]     [Fedora Mentors]     [Kernel Developers]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Users]     [Yosemite Camping]

  Powered by Linux