# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\xampp\htdocs\wordtrunk\wp-includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
|
| 998 | 998 | if ( !$user = $this->login($username, $password) ) |
| 999 | 999 | return $this->error; |
| 1000 | 1000 | |
| 1001 | | if ( !current_user_can( 'moderate_comments' ) ) |
| 1002 | | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| 1003 | | |
| 1004 | 1001 | do_action('xmlrpc_call', 'wp.getComment'); |
| 1005 | 1002 | |
| 1006 | 1003 | if ( ! $comment = get_comment($comment_id) ) |
| 1007 | 1004 | return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); |
| 1008 | 1005 | |
| | 1006 | if ( !current_user_can( 'edit_comment', $comment_id ) ) |
| | 1007 | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| | 1008 | |
| 1009 | 1009 | // Format page date. |
| 1010 | 1010 | $comment_date = mysql2date('Ymd\TH:i:s', $comment->comment_date, false); |
| 1011 | 1011 | $comment_date_gmt = mysql2date('Ymd\TH:i:s', $comment->comment_date_gmt, false); |
| … |
… |
|
| 1072 | 1072 | if ( !$user = $this->login($username, $password) ) |
| 1073 | 1073 | return $this->error; |
| 1074 | 1074 | |
| 1075 | | if ( !current_user_can( 'moderate_comments' ) ) |
| 1076 | | return new IXR_Error( 401, __( 'Sorry, you cannot edit comments.' ) ); |
| 1077 | | |
| 1078 | 1075 | do_action('xmlrpc_call', 'wp.getComments'); |
| 1079 | 1076 | |
| 1080 | 1077 | if ( isset($struct['status']) ) |
| … |
… |
|
| 1140 | 1137 | if ( !$user = $this->login($username, $password) ) |
| 1141 | 1138 | return $this->error; |
| 1142 | 1139 | |
| 1143 | | if ( !current_user_can( 'moderate_comments' ) ) |
| 1144 | | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| 1145 | | |
| 1146 | 1140 | if ( ! get_comment($comment_ID) ) |
| 1147 | 1141 | return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); |
| 1148 | 1142 | |
| 1149 | 1143 | if ( !current_user_can( 'edit_comment', $comment_ID ) ) |
| 1150 | | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| | 1144 | return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) ); |
| 1151 | 1145 | |
| 1152 | 1146 | do_action('xmlrpc_call', 'wp.deleteComment'); |
| 1153 | 1147 | |
| … |
… |
|
| 1190 | 1184 | if ( !$user = $this->login($username, $password) ) |
| 1191 | 1185 | return $this->error; |
| 1192 | 1186 | |
| 1193 | | if ( !current_user_can( 'moderate_comments' ) ) |
| 1194 | | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| 1195 | | |
| 1196 | 1187 | if ( ! get_comment($comment_ID) ) |
| 1197 | 1188 | return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); |
| 1198 | 1189 | |
| 1199 | 1190 | if ( !current_user_can( 'edit_comment', $comment_ID ) ) |
| 1200 | | return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); |
| | 1191 | return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) ); |
| 1201 | 1192 | |
| 1202 | 1193 | do_action('xmlrpc_call', 'wp.editComment'); |
| 1203 | 1194 | |
| … |
… |
|
| 1343 | 1334 | if ( !$user = $this->login($username, $password) ) |
| 1344 | 1335 | return $this->error; |
| 1345 | 1336 | |
| 1346 | | if ( !current_user_can( 'moderate_comments' ) ) |
| | 1337 | if ( !current_user_can( 'publish_posts' ) ) |
| 1347 | 1338 | return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) ); |
| 1348 | 1339 | |
| 1349 | 1340 | do_action('xmlrpc_call', 'wp.getCommentStatusList'); |
| … |
… |
|
| 1370 | 1361 | if ( !$user = $this->login($username, $password) ) |
| 1371 | 1362 | return $this->error; |
| 1372 | 1363 | |
| 1373 | | if ( !current_user_can( 'edit_posts' ) ) |
| 1374 | | return new IXR_Error( 403, __( 'You are not allowed access to details about comments.' ) ); |
| | 1364 | $post = wp_get_single_post( $post_id, ARRAY_A ); |
| | 1365 | if ( empty( $post['ID'] ) ) |
| | 1366 | return new IXR_Error( 404, __( 'Invalid post ID.' ) ); |
| 1375 | 1367 | |
| | 1368 | if ( !current_user_can( 'edit_posts', $post_id ) ) |
| | 1369 | return new IXR_Error( 403, __( 'You are not allowed access to details of this post.' ) ); |
| | 1370 | |
| 1376 | 1371 | do_action('xmlrpc_call', 'wp.getCommentCount'); |
| 1377 | 1372 | |
| 1378 | 1373 | $count = wp_count_comments( $post_id ); |