From fd1685fbc29cf422e0d23f1bf1815bc023be805d Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Fri, 20 Nov 2009 20:58:26 -0500 Subject: [PATCH] Wordpress 2.8.3 Signed-off-by: Edward Z. Yang --- readme.html | 4 ++-- wp-admin/admin-footer.php | 4 ++++ wp-admin/css/plugin-install.css | 4 ++-- wp-admin/edit-attachment-rows.php | 4 +++- wp-admin/edit-category-form.php | 7 +++++++ wp-admin/edit-comments.php | 3 +++ wp-admin/edit-form-advanced.php | 4 ++++ wp-admin/edit-form-comment.php | 6 +++++- wp-admin/edit-link-category-form.php | 7 +++++++ wp-admin/edit-link-form.php | 4 ++++ wp-admin/edit-page-form.php | 4 ++++ wp-admin/edit-pages.php | 3 +++ wp-admin/edit-post-rows.php | 4 +++- wp-admin/edit-tag-form.php | 7 +++++++ wp-admin/edit.php | 3 +++ wp-admin/export.php | 3 +++ wp-admin/import.php | 4 ++++ wp-admin/link-add.php | 3 +++ wp-admin/options-discussion.php | 3 +++ wp-admin/options-general.php | 3 +++ wp-admin/options-media.php | 3 +++ wp-admin/options-misc.php | 3 +++ wp-admin/options-permalink.php | 3 +++ wp-admin/options-privacy.php | 3 +++ wp-admin/options-reading.php | 3 +++ wp-admin/options-writing.php | 3 +++ wp-admin/plugins.php | 18 ++++++++++++++++++ wp-admin/themes.php | 3 +++ wp-content/plugins/akismet/akismet.php | 6 +++++- wp-content/plugins/akismet/readme.txt | 4 ++++ wp-includes/comment.php | 3 +++ wp-includes/default-filters.php | 1 - wp-includes/link-template.php | 3 +-- wp-includes/post.php | 3 --- wp-includes/vars.php | 1 + wp-includes/version.php | 2 +- 36 files changed, 131 insertions(+), 15 deletions(-) diff --git a/readme.html b/readme.html index 06a9fa53..329e330c 100644 --- a/readme.html +++ b/readme.html @@ -8,7 +8,7 @@

WordPress -
Version 2.8.2 +
Version 2.8.3

Semantic Personal Publishing Platform

@@ -29,7 +29,7 @@

Upgrading

Before you upgrade anything, make sure you have backup copies of any files you may have modified such as index.php.

-

Upgrading from any previous WordPress to 2.8.2:

+

Upgrading from any previous WordPress to 2.8.3:

  1. Delete your old WP files, saving ones you've modified.
  2. Upload the new files.
  3. diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php index 7c2bcd29..a43a4e45 100644 --- a/wp-admin/admin-footer.php +++ b/wp-admin/admin-footer.php @@ -5,6 +5,10 @@ * @package WordPress * @subpackage Administration */ + +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); ?>
    diff --git a/wp-admin/css/plugin-install.css b/wp-admin/css/plugin-install.css index 645972bf..87fc417c 100644 --- a/wp-admin/css/plugin-install.css +++ b/wp-admin/css/plugin-install.css @@ -68,7 +68,7 @@ div.star img { border-top-left-radius: 3px; -webkit-border-bottom-left-radius: 3px; -khtml-border-bottom-left-radius: 3px; - border-top-bottom-radius: 3px; + border-bottom-left-radius: 3px; } #plugin-information .action-button a { @@ -110,7 +110,7 @@ div.star img { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -khtml-border-bottom-left-radius: 3px; - border-top-bottom-radius: 3px; + border-bottom-left-radius: 3px; } #plugin-information .fyi li { diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index af62b1cb..3842a6cc 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -6,7 +6,9 @@ * @subpackage Administration */ -if ( ! defined('ABSPATH') ) die(); +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); if ( have_posts() ) { ?> diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index 2e37f796..27417f6b 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -6,6 +6,13 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + +if ( !current_user_can('manage_categories') ) + wp_die(__('You do not have sufficient permissions to edit categories for this blog.')); + /** * @var object */ diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 7df02103..dd5f867a 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('admin.php'); +if ( !current_user_can('edit_posts') ) + wp_die(__('Cheatin’ uh?')); + wp_enqueue_script('admin-comments'); enqueue_comment_hotkeys_js(); diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index a246ea54..dadf6c07 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -6,6 +6,10 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + /** * Post ID global * @name $post_ID diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index f5865783..f361ad7a 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -6,6 +6,10 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + /** * @var string */ @@ -107,7 +111,7 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) ); } else { _e( 'URL:' ); } ?> - +
    diff --git a/wp-admin/edit-link-category-form.php b/wp-admin/edit-link-category-form.php index bb721110..df1727d6 100644 --- a/wp-admin/edit-link-category-form.php +++ b/wp-admin/edit-link-category-form.php @@ -6,6 +6,13 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + +if ( !current_user_can('manage_categories') ) + wp_die(__('You do not have sufficient permissions to edit link categories for this blog.')); + /** * @var object */ diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 32b06a87..11ec684b 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -6,6 +6,10 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + if ( ! empty($link_id) ) { $heading = sprintf( __( 'Links / Edit Link' ), 'link-manager.php' ); $submit_text = __('Update Link'); diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 2d436be7..516b8eb8 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -6,6 +6,10 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + /** * Post ID global. * @name $post_ID diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 0cf1680e..b2fa38b8 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('admin.php'); +if ( !current_user_can('edit_pages') ) + wp_die(__('Cheatin’ uh?')); + // Handle bulk actions if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php index 37e58f0a..8db9e89d 100644 --- a/wp-admin/edit-post-rows.php +++ b/wp-admin/edit-post-rows.php @@ -6,7 +6,9 @@ * @subpackage Administration */ -if ( ! defined('ABSPATH') ) die(); +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); ?> diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index efef02bc..250ba7a3 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -6,6 +6,13 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + +if ( !current_user_can('manage_categories') ) + wp_die(__('You do not have sufficient permissions to edit tags for this blog.')); + if ( empty($tag_ID) ) { ?>

    time()) + (array)get_option('recently_activated')); @@ -95,6 +110,9 @@ if ( !empty($action) ) { exit; break; case 'deactivate-selected': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to deactivate plugins for this blog.')); + check_admin_referer('bulk-manage-plugins'); $plugins = (array) $_POST['checked']; diff --git a/wp-admin/themes.php b/wp-admin/themes.php index f008307e..7ff6cb4a 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('admin.php'); +if ( !current_user_can('switch_themes') ) + wp_die( __( 'Cheatin’ uh?' ) ); + if ( isset($_GET['action']) ) { if ( 'activate' == $_GET['action'] ) { check_admin_referer('switch-theme_' . $_GET['template']); diff --git a/wp-content/plugins/akismet/akismet.php b/wp-content/plugins/akismet/akismet.php index 423be941..92bbae2d 100644 --- a/wp-content/plugins/akismet/akismet.php +++ b/wp-content/plugins/akismet/akismet.php @@ -8,6 +8,8 @@ Author: Matt Mullenweg Author URI: http://ma.tt/ */ +define('AKISMET_VERSION', '2.2.6'); + // If you hardcode a WP.com API key here, all key config screens will be hidden if ( defined('WPCOM_API_KEY') ) $wpcom_api_key = constant('WPCOM_API_KEY'); @@ -367,12 +369,14 @@ function akismet_get_host($host) { // Returns array with headers in $response[0] and body in $response[1] function akismet_http_post($request, $host, $path, $port = 80, $ip=null) { global $wp_version; + + $akismet_version = constant('AKISMET_VERSION'); $http_request = "POST $path HTTP/1.0\r\n"; $http_request .= "Host: $host\r\n"; $http_request .= "Content-Type: application/x-www-form-urlencoded; charset=" . get_option('blog_charset') . "\r\n"; $http_request .= "Content-Length: " . strlen($request) . "\r\n"; - $http_request .= "User-Agent: WordPress/$wp_version | Akismet/2.0\r\n"; + $http_request .= "User-Agent: WordPress/$wp_version | Akismet/$akismet_version\r\n"; $http_request .= "\r\n"; $http_request .= $request; diff --git a/wp-content/plugins/akismet/readme.txt b/wp-content/plugins/akismet/readme.txt index f34baf53..af87370f 100644 --- a/wp-content/plugins/akismet/readme.txt +++ b/wp-content/plugins/akismet/readme.txt @@ -25,6 +25,10 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [WordPress. == Changelog == += 2.2.7 = + +* Add a new AKISMET_VERSION constant + = 2.2.6 = * Fix a global warning introduced in 2.2.5 diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 53e2233d..77b59d74 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1324,6 +1324,9 @@ function do_all_pings() { if ( is_array($trackbacks) ) foreach ( $trackbacks as $trackback ) do_trackbacks($trackback); + + //Do Update Services/Generic Pings + generic_ping(); } /** diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index b5f7be23..2519d7aa 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -186,7 +186,6 @@ add_action('do_feed_rss', 'do_feed_rss', 10, 1); add_action('do_feed_rss2', 'do_feed_rss2', 10, 1); add_action('do_feed_atom', 'do_feed_atom', 10, 1); add_action('do_pings', 'do_all_pings', 10, 1); -add_action('do_generic_ping', 'generic_ping', 10, 1); add_action('do_robots', 'do_robots'); add_action('sanitize_comment_cookies', 'sanitize_comment_cookies'); add_action('admin_print_scripts', 'print_head_scripts', 20); diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 471a6468..96453aab 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -768,8 +768,7 @@ function get_edit_comment_link( $comment_id = 0 ) { function edit_comment_link( $link = 'Edit This', $before = '', $after = '' ) { global $comment, $post; - if ( $post->post_type == 'attachment' ) { - } elseif ( $post->post_type == 'page' ) { + if ( $post->post_type == 'page' ) { if ( !current_user_can( 'edit_page', $post->ID ) ) return; } else { diff --git a/wp-includes/post.php b/wp-includes/post.php index 0c0ba46d..7ae5431b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3274,9 +3274,6 @@ function _transition_post_status($new_status, $old_status, $post) { if ( '' == get_the_guid($post->ID) ) $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) ); do_action('private_to_published', $post->ID); // Deprecated, use private_to_publish - // do generic pings once per hour at most - if ( !wp_next_scheduled('do_generic_ping') ) - wp_schedule_single_event(time() + 3600, 'do_generic_ping'); } // Always clears the hook in case the post status bounced from future to draft. diff --git a/wp-includes/vars.php b/wp-includes/vars.php index 232385da..b66b3131 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -17,6 +17,7 @@ if ( is_admin() ) { // wp-admin pages are checked more carefully preg_match('#/wp-admin/?(.*?)$#i', $PHP_SELF, $self_matches); $pagenow = $self_matches[1]; + $pagenow = trim($pagenow, '/'); $pagenow = preg_replace('#\?.*?$#', '', $pagenow); if ( '' === $pagenow || 'index' === $pagenow || 'index.php' === $pagenow ) { $pagenow = 'index.php'; diff --git a/wp-includes/version.php b/wp-includes/version.php index bef1aba5..05e585cb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -8,7 +8,7 @@ * * @global string $wp_version */ -$wp_version = '2.8.2'; +$wp_version = '2.8.3'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. -- 2.44.0