Changeset 1575 for trunk/bb-plugins/akismet.php
- Timestamp:
- 07/02/2008 02:53:07 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bb-plugins/akismet.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-plugins/akismet.php
r1385 r1575 81 81 function bb_akismet_verify_key( $key ) { 82 82 global $bb_ksd_api_port; 83 $blog = urlencode( bb_get_ option('uri') );83 $blog = urlencode( bb_get_uri(null, null, BB_URI_CONTEXT_TEXT + BB_URI_CONTEXT_AKISMET) ); 84 84 $response = bb_ksd_http_post("key=$key&blog=$blog", 'rest.akismet.com', '/1.1/verify-key', $bb_ksd_api_port); 85 85 if ( 'valid' == $response[1] ) … … 128 128 129 129 $_submit = array( 130 'blog' => bb_get_ option('uri'),130 'blog' => bb_get_uri(null, null, BB_URI_CONTEXT_TEXT + BB_URI_CONTEXT_AKISMET), 131 131 'user_ip' => $bb_post->poster_ip, 132 132 'permalink' => get_topic_link( $bb_post->topic_id ), // First page … … 150 150 151 151 $_submit = array( 152 'blog' => bb_get_ option('uri'),152 'blog' => bb_get_uri(null, null, BB_URI_CONTEXT_TEXT + BB_URI_CONTEXT_AKISMET), 153 153 'permalink' => get_user_profile_link( $user->ID ), 154 154 'comment_type' => 'profile', … … 167 167 168 168 $_submit = array( 169 'blog' => bb_get_ option('uri'),169 'blog' => bb_get_uri(null, null, BB_URI_CONTEXT_TEXT + BB_URI_CONTEXT_AKISMET), 170 170 'user_ip' => preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] ), 171 171 'user_agent' => $_SERVER['HTTP_USER_AGENT'], … … 292 292 if ( !bb_current_user_can('moderate') ) 293 293 return $link; 294 if ( 2 == $post_status ) 295 $link .= " <a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-post.php?id=' . get_post_id() . '&status=0&view=all', 'delete-post_' . get_post_id() ) ) . "' >" . __('Not Spam') ."</a>"; 296 else 297 $link .= " <a href='" . attribute_escape( bb_nonce_url( bb_get_option('uri') . 'bb-admin/delete-post.php?id=' . get_post_id() . '&status=2', 'delete-post_' . get_post_id() ) ) . "' >" . __('Spam') ."</a>"; 294 if ( 2 == $post_status ) { 295 $query = array( 296 'id' => get_post_id(), 297 'status' => 0, 298 'view' => 'all' 299 ); 300 $display = __('Not Spam'); 301 } else { 302 $query = array( 303 'id' => get_post_id(), 304 'status' => 2 305 ); 306 $display = __('Spam'); 307 } 308 $uri = bb_get_uri('bb-admin/delete-post.php', $query, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN); 309 $uri = attribute_escape( bb_nonce_url( $uri, 'delete-post_' . get_post_id() ) ); 310 $link .= " <a href='" . $uri . "' >" . $display ."</a>"; 298 311 return $link; 299 312 }
Note: See TracChangeset
for help on using the changeset viewer.