Changeset 225
- Timestamp:
- 08/14/2005 05:30:28 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/delete-post.php
r222 r225 13 13 die('There is a problem with that post, pardner.'); 14 14 15 if ( !current_user_can( 'edit_post', $post_id) ) {15 if ( !current_user_can('manage_posts') ) { 16 16 header('Location: ' . bb_get_option('uri') ); 17 17 exit(); -
trunk/bb-admin/delete-topic.php
r220 r225 13 13 die('There is a problem with that topic, pardner.'); 14 14 15 if ( !current_user_can( 'edit_topic', $topic_id) ) {15 if ( !current_user_can('manage_topics') ) { 16 16 header('Location: ' . bb_get_option('uri') ); 17 17 exit(); -
trunk/bb-admin/sticky.php
r220 r225 8 8 die('There is a problem with that topic, pardner.'); 9 9 10 if ( !current_user_can( 'edit_topic', $topic_id) ) {10 if ( !current_user_can('manage_topic') ) { 11 11 header('Location: ' . bb_get_option('uri') ); 12 12 exit(); -
trunk/bb-admin/topic-move.php
r220 r225 14 14 die('Your topic or forum caused all manner of confusion'); 15 15 16 if ( !current_user_can( 'edit_topic', $topic_id) ) {16 if ( !current_user_can('manage_topics') ) { 17 17 header('Location: ' . bb_get_option('uri') ); 18 18 exit(); -
trunk/bb-admin/topic-toggle.php
r220 r225 8 8 die('There is a problem with that topic, pardner.'); 9 9 10 if ( !current_user_can( 'edit_topic', $topic_id) ) {10 if ( !current_user_can('manage_topics') ) { 11 11 header('Location: ' . bb_get_option('uri') ); 12 12 exit(); -
trunk/bb-includes/capabilities.php
r222 r225 36 36 'browse_deleted' => true, // Use 'deleted' View 37 37 'view_by_ip' => true, // view-ip.php 38 'manage_topics' => true, // Delete/Close/Stick 38 39 'edit_others_tags' => true, 39 40 'edit_others_topics' => true, 41 'manage_posts' => true, 40 42 'ignore_edit_lock' => true, 41 43 'edit_others_posts' => true, … … 59 61 'browse_deleted' => true, 60 62 'view_by_ip' => true, 63 'manage_topics' => true, 61 64 'edit_others_tags' => true, 62 65 'edit_others_topics' => true, 66 'manage_posts' => true, 63 67 'ignore_edit_lock' => true, 64 68 'edit_others_posts' => true, … … 79 83 'browse_deleted' => true, //+ 80 84 'view_by_ip' => true, //+ 85 'manage_topics' => true, //+ 81 86 'edit_others_tags' => true, //+ 82 87 'edit_others_topics' => true, //+ 88 'manage_posts' => true, //+ 83 89 'ignore_edit_lock' => true, //+ 84 90 'edit_others_posts' => true, //+ … … 270 276 } 271 277 272 //has_cap(capability_or_role_name) or273 //has_cap('edit_post', post_id)274 278 function has_cap($cap) { 275 279 global $bb_roles; … … 308 312 if ( !topic_is_open( $post->topic_id ) ) 309 313 $caps = array_merge($caps, map_meta_cap( 'edit_topic', $user_id, $post->topic_id )); 310 $post_time = strtotime($post->post_time );314 $post_time = strtotime($post->post_time . '+0000'); 311 315 $curr_time = time(); 312 316 if ( $curr_time - $post_time > bb_get_option( 'edit_lock' ) * 60 ) -
trunk/bb-includes/template-functions.php
r222 r225 423 423 function topic_delete_link() { 424 424 global $current_user, $topic; 425 if ( !current_user_can( 'edit_topic', $topic->topic_id) )425 if ( !current_user_can('manage_topics') ) 426 426 return; 427 427 … … 434 434 function topic_close_link() { 435 435 global $current_user, $topic; 436 if ( !current_user_can( 'edit_topic', $topic->topic_id) )436 if ( !current_user_can('manage_topic') ) 437 437 return; 438 438 … … 446 446 function topic_sticky_link() { 447 447 global $current_user, $topic; 448 if ( !current_user_can( 'edit_topic', $topic->topic_id) )448 if ( !current_user_can('manage_topic') ) 449 449 return; 450 450 … … 468 468 function topic_move_dropdown() { 469 469 global $current_user, $forum_id, $topic; 470 if ( !current_user_can( 'edit_topic', $topic->topic_id) )470 if ( !current_user_can('manage_topic') ) 471 471 return; 472 472 $forum_id = $topic->forum_id; … … 567 567 function post_delete_link() { 568 568 global $current_user, $post; 569 if ( !current_user_can( 'edit_post', $post->post_id) )569 if ( !current_user_can('manage_posts') ) 570 570 return; 571 571
Note: See TracChangeset
for help on using the changeset viewer.