X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-content/plugins/akismet/class.akismet-admin.php?ds=sidebyside diff --git a/wp-content/plugins/akismet/class.akismet-admin.php b/wp-content/plugins/akismet/class.akismet-admin.php index 7a62ccbd..a1c712e0 100644 --- a/wp-content/plugins/akismet/class.akismet-admin.php +++ b/wp-content/plugins/akismet/class.akismet-admin.php @@ -367,7 +367,8 @@ class Akismet_Admin { add_comment_meta( $c['comment_ID'], 'akismet_rechecking', true ); - $response = Akismet::http_post( build_query( $c ), 'comment-check' ); + $response = Akismet::http_post( Akismet::build_query( $c ), 'comment-check' ); + if ( 'true' == $response[1] ) { wp_set_comment_status( $c['comment_ID'], 'spam' ); update_comment_meta( $c['comment_ID'], 'akismet_result', 'true' ); @@ -625,7 +626,7 @@ class Akismet_Admin { } public static function get_akismet_user( $api_key ) { - $akismet_user = Akismet::http_post( build_query( array( 'key' => $api_key ) ), 'get-subscription' ); + $akismet_user = Akismet::http_post( Akismet::build_query( array( 'key' => $api_key ) ), 'get-subscription' ); if ( ! empty( $akismet_user[1] ) ) $akismet_user = json_decode( $akismet_user[1] ); @@ -639,7 +640,7 @@ class Akismet_Admin { $stat_totals = array(); foreach( array( '6-months', 'all' ) as $interval ) { - $response = Akismet::http_post( build_query( array( 'blog' => urlencode( get_bloginfo('url') ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' ); + $response = Akismet::http_post( Akismet::build_query( array( 'blog' => urlencode( get_bloginfo('url') ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' ); if ( ! empty( $response[1] ) ) { $stat_totals[$interval] = json_decode( $response[1] ); @@ -649,7 +650,7 @@ class Akismet_Admin { } public static function verify_wpcom_key( $api_key, $user_id, $token = '' ) { - $akismet_account = Akismet::http_post( build_query( array( + $akismet_account = Akismet::http_post( Akismet::build_query( array( 'user_id' => $user_id, 'api_key' => $api_key, 'token' => $token, @@ -674,11 +675,11 @@ class Akismet_Admin { public static function display_spam_check_warning() { Akismet::fix_scheduled_recheck(); - - $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your Akismet configuration and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) ); - if ( self::get_number_spam_waiting() > 0 && wp_next_scheduled('akismet_schedule_cron_recheck') > time() ) + if ( wp_next_scheduled('akismet_schedule_cron_recheck') > time() && self::get_number_spam_waiting() > 0 ) { + $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your Akismet configuration and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) ); Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) ); + } } public static function display_invalid_version() {