Changeset 3772
- Timestamp:
- 05/11/2006 11:13:35 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade-functions.php
r3734 r3772 174 174 upgrade_160(); 175 175 176 if ( $wp_current_db_version < 3 672)176 if ( $wp_current_db_version < 3767 ) 177 177 upgrade_210(); 178 178 … … 493 493 } 494 494 495 if ( $wp_current_db_version < 3 513) {495 if ( $wp_current_db_version < 3767 ) { 496 496 populate_roles_210(); 497 497 } -
trunk/wp-admin/upgrade-schema.php
r3690 r3772 353 353 $role->add_cap('delete_others_posts'); 354 354 $role->add_cap('delete_published_posts'); 355 $role->add_cap('delete_private_posts'); 356 $role->add_cap('edit_private_posts'); 357 $role->add_cap('read_private_posts'); 358 $role->add_cap('delete_private_pages'); 359 $role->add_cap('edit_private_pages'); 360 $role->add_cap('read_private_pages'); 355 361 } 356 362 -
trunk/wp-includes/capabilities.php
r3705 r3772 297 297 if ($post->post_status == 'publish') 298 298 $caps[] = 'delete_published_posts'; 299 else if ($post->post_status == 'private') 300 $caps[] = 'delete_private_posts'; 299 301 } 300 302 break; … … 319 321 if ($page->post_status == 'publish') 320 322 $caps[] = 'delete_published_pages'; 323 else if ($page->post_status == 'private') 324 $caps[] = 'delete_private_pages'; 321 325 } 322 326 break; … … 347 351 if ($post->post_status == 'publish') 348 352 $caps[] = 'edit_published_posts'; 353 else if ($post->post_status == 'private') 354 $caps[] = 'edit_private_posts'; 349 355 } 350 356 break; … … 369 375 if ($page->post_status == 'publish') 370 376 $caps[] = 'edit_published_pages'; 377 else if ($page->post_status == 'private') 378 $caps[] = 'edit_private_pages'; 371 379 } 372 380 break; -
trunk/wp-includes/query.php
r3767 r3772 829 829 $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'"; 830 830 831 if ( is_admin() ) 831 if ( is_admin() ) { 832 832 $where .= " OR post_status = 'future' OR post_status = 'draft'"; 833 833 834 if ( is_user_logged_in() ) 835 $where .= " OR post_author = $user_ID AND post_status = 'private'))"; 836 else 837 $where .= '))'; 834 if ( is_user_logged_in() ) { 835 if ( 'post' == $post_type ) 836 $cap = 'edit_private_posts'; 837 else 838 $cap = 'edit_private_pages'; 839 840 if ( current_user_can($cap) ) 841 $where .= "OR post_status = 'private'"; 842 else 843 $where .= " OR post_author = $user_ID AND post_status = 'private'"; 844 } 845 } 846 847 $where .= '))'; 838 848 } 839 849 -
trunk/wp-includes/version.php
r3678 r3772 4 4 5 5 $wp_version = '2.1-alpha1'; 6 $wp_db_version = 3 672;6 $wp_db_version = 3767; 7 7 8 8 ?>
Note: See TracChangeset
for help on using the changeset viewer.