Changeset 931
- Timestamp:
- 03/22/07 13:20:00 (2 years ago)
- Files:
-
- trunk/wp-includes/l10n.php (modified) (1 diff)
- trunk/wp-includes/link-template.php (modified) (1 diff)
- trunk/xmlrpc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/l10n.php
r852 r931 36 36 else 37 37 echo $text; 38 } 39 40 function _c($text, $domain = 'default') { 41 global $l10n; 42 43 if ( isset($l10n[$domain]) ) 44 $whole = apply_filters('gettext', $l10n[$domain]->translate($text), $text); 45 else 46 $whole = $text; 47 48 $trans = explode('|', $whole, 2); 49 if ( isset( $trans[1] ) ) 50 return $trans[1]; 51 else 52 return $trans[0]; 38 53 } 39 54 trunk/wp-includes/link-template.php
r920 r931 118 118 global $post; 119 119 120 $id = (int) $id; 120 121 if ( !$id ) 121 122 $id = $post->ID; trunk/xmlrpc.php
r920 r931 857 857 extract($actual_post); 858 858 859 if ( ('publish' == $post_status) && !current_user_can('publish_posts') ) 860 return new IXR_Error(401, 'Sorry, you do not have the right to publish this post.'); 861 859 862 $post_title = xmlrpc_getposttitle($content); 860 863 $post_category = xmlrpc_getpostcategory($content); … … 1083 1086 1084 1087 set_current_user(0, $user_login); 1085 if ( !current_user_can('edit_post', $post_ID) )1086 return new IXR_Error(401, 'Sorry, you can not edit this post.');1087 1088 $postdata = wp_get_single_post($post_ID, ARRAY_A);1089 extract($postdata);1090 $this->escape($postdata);1091 1088 1092 1089 // The post_type defaults to post, but could also be page. … … 1098 1095 $post_type = "page"; 1099 1096 } 1097 1098 // Edit page caps are checked in editPage. Just check post here. 1099 if ( ( 'post' == $post_type ) && !current_user_can('edit_post', $post_ID) ) 1100 return new IXR_Error(401, 'Sorry, you can not edit this post.'); 1101 1102 $postdata = wp_get_single_post($post_ID, ARRAY_A); 1103 extract($postdata); 1104 $this->escape($postdata); 1100 1105 1101 1106 // Let WordPress manage slug if none was provided. … … 1169 1174 $post_more = $content_struct['mt_text_more']; 1170 1175 $post_status = $publish ? 'publish' : 'draft'; 1176 1177 if ( ('publish' == $post_status) ) { 1178 if ( ( 'page' == $post_type ) && !current_user_can('publish_pages') ) 1179 return new IXR_Error(401, 'Sorry, you do not have the right to publish this page.'); 1180 else if ( !current_user_can('publish_posts') ) 1181 return new IXR_Error(401, 'Sorry, you do not have the right to publish this post.'); 1182 } 1171 1183 1172 1184 if ($post_more) {
