Changeset 3269
- Timestamp:
- 12/05/05 04:04:23 (3 years ago)
- Files:
-
- trunk/wp-admin/admin-functions.php (modified) (2 diffs)
- trunk/wp-includes/capabilities.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-functions.php
r3267 r3269 40 40 if ('publish' == $_POST['post_status'] && !current_user_can('publish_posts')) 41 41 $_POST['post_status'] = 'draft'; 42 43 if ('static' == $_POST['post_status'] && !current_user_can('edit_pages')) 44 die(__('This user cannot edit pages.')); 42 45 43 46 if (!empty ($_POST['edit_date'])) { … … 158 161 if ('publish' == $_POST['post_status'] && !current_user_can('publish_posts')) 159 162 $_POST['post_status'] = 'draft'; 163 164 if ('static' == $_POST['post_status'] && !current_user_can('edit_pages')) 165 die(__('This user cannot edit pages.')); 160 166 161 167 if (!isset ($_POST['comment_status'])) trunk/wp-includes/capabilities.php
r3250 r3269 250 250 if ($post->post_status == 'publish') 251 251 $caps[] = 'edit_published_posts'; 252 else if ($post->post_status == 'static') 253 $caps[] = 'edit_pages'; 252 254 else 253 255 // If the post is draft... 254 256 $caps[] = 'edit_posts'; 255 257 } else { 258 if ($post->post_status == 'static') { 259 $caps[] = 'edit_pages'; 260 break; 261 } 262 256 263 // The user is trying to edit someone else's post. 257 264 $caps[] = 'edit_others_posts';
