Changeset 6417
- Timestamp:
- 12/19/07 20:33:27 (9 months ago)
- Files:
-
- trunk/xmlrpc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/xmlrpc.php
r6416 r6417 85 85 'wp.getCategories' => 'this:mw_getCategories', // Alias 86 86 'wp.newCategory' => 'this:wp_newCategory', 87 'wp.deleteCategory' => 'this:wp_deleteCategory', 87 88 'wp.suggestCategories' => 'this:wp_suggestCategories', 88 89 'wp.uploadFile' => 'this:mw_newMediaObject', // Alias … … 493 494 // allowed to add a category. 494 495 set_current_user(0, $username); 495 if(!current_user_can("manage_categories" , $page_id)) {496 if(!current_user_can("manage_categories")) { 496 497 return(new IXR_Error(401, __("Sorry, you do not have the right to add a category."))); 497 498 } … … 527 528 return($cat_id); 528 529 } 530 531 /** 532 * WordPress XML-RPC API 533 * wp_deleteCategory 534 */ 535 function wp_deleteCategory($args) { 536 $this->escape($args); 537 538 $blog_id = (int) $args[0]; 539 $username = $args[1]; 540 $password = $args[2]; 541 $category_id = (int) $args[3]; 542 543 if( !$this->login_pass_ok( $username, $password ) ) { 544 return $this->error; 545 } 546 547 set_current_user(0, $username); 548 if( !current_user_can("manage_categories") ) { 549 return new IXR_Error( 401, __( "Sorry, you do not the right to delete a category." ) ); 550 } 551 552 return wp_delete_category( $category_id ); 553 } 554 529 555 530 556 /**
