diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-02-07 09:39:24 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-02-07 09:39:24 +0000 |
| commit | 5cd626aede5b92cd056bc0e205ac9dedfd96ae05 (patch) | |
| tree | bc740f4527031ec146d20750cdc29219dcedf648 | |
| parent | b8572cf16ebc2e5e9afbcaef709326dca2823ebd (diff) | |
| download | wordpress-mu-5cd626aede5b92cd056bc0e205ac9dedfd96ae05.tar.gz wordpress-mu-5cd626aede5b92cd056bc0e205ac9dedfd96ae05.tar.xz wordpress-mu-5cd626aede5b92cd056bc0e205ac9dedfd96ae05.zip | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@523 7be80a69-a1ef-0310-a953-fb0f7c49ff36
| -rw-r--r-- | wp-inst/wp-includes/cache.php | 3 | ||||
| -rw-r--r-- | wp-inst/wp-includes/template-functions-links.php | 13 |
2 files changed, 7 insertions, 9 deletions
diff --git a/wp-inst/wp-includes/cache.php b/wp-inst/wp-includes/cache.php index 4b9bde2..cb20209 100644 --- a/wp-inst/wp-includes/cache.php +++ b/wp-inst/wp-includes/cache.php @@ -400,6 +400,9 @@ class WP_Object_Cache { if (defined('DISABLE_CACHE')) return; + if ( ! defined('ENABLE_CACHE') ) + return; + // Disable the persistent cache if safe_mode is on. if ( ini_get('safe_mode') && ! defined('ENABLE_CACHE') ) return; diff --git a/wp-inst/wp-includes/template-functions-links.php b/wp-inst/wp-includes/template-functions-links.php index 037ade0..d949ea4 100644 --- a/wp-inst/wp-includes/template-functions-links.php +++ b/wp-inst/wp-includes/template-functions-links.php @@ -205,13 +205,10 @@ function get_feed_link($feed='rss2') { } function edit_post_link($link = 'Edit This', $before = '', $after = '') { - global $user_ID, $post; - - get_currentuserinfo(); + global $post; - if ( !user_can_edit_post($user_ID, $post->ID) ) { + if ( ! current_user_can('edit_post', $post->ID) ) return; - } if ( is_attachment() ) return; @@ -223,11 +220,9 @@ function edit_post_link($link = 'Edit This', $before = '', $after = '') { } function edit_comment_link($link = 'Edit This', $before = '', $after = '') { - global $user_ID, $post, $comment; - - get_currentuserinfo(); + global $post, $comment; - if ( !user_can_edit_post_comments($user_ID, $post->ID) ) + if ( ! current_user_can('edit_post', $post->ID) ) return; $location = get_settings('siteurl') . "/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID"; |
