From 310940b824eff4a116dcd72ccd339bb602021981 Mon Sep 17 00:00:00 2001
From: donncha
Date: Tue, 10 Jun 2008 14:08:54 +0000
Subject: Merge with branches/2.5 in WordPress, revision 8066
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1324 7be80a69-a1ef-0310-a953-fb0f7c49ff36
---
wp-admin/includes/dashboard.php | 4 +++-
wp-admin/includes/media.php | 13 +++++++++----
wp-admin/includes/upgrade.php | 9 +++++++++
wp-admin/includes/widgets.php | 3 ++-
4 files changed, 23 insertions(+), 6 deletions(-)
(limited to 'wp-admin/includes')
diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
index ea88ee4..97fd26a 100644
--- a/wp-admin/includes/dashboard.php
+++ b/wp-admin/includes/dashboard.php
@@ -23,7 +23,9 @@ function wp_dashboard_setup() {
/* Register Widgets and Controls */
// Recent Comments Widget
- if ( current_user_can( 'moderate_comments' ) && $mod_comments = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'") ) {
+ $mod_comments = wp_count_comments();
+ $mod_comments = $mod_comments->moderated;
+ if ( current_user_can( 'moderate_comments' ) && $mod_comments ) {
$notice = sprintf( __ngettext( '%d comment awaiting moderation', '%d comments awaiting moderation', $mod_comments ), $mod_comments );
$notice = "$notice";
} else {
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index be70d92..0fb84bb 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -55,7 +55,7 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal
$rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';
if ( $url )
- $html = "$html";
+ $html = '$html";
$html = apply_filters( 'image_send_to_editor', $html, $id, $alt, $title, $align, $url, $size );
@@ -180,7 +180,7 @@ add_action( 'media_buttons', 'media_buttons' );
function media_buttons_head() {
$siteurl = get_option('siteurl');
echo "\n";
}
@@ -791,6 +794,7 @@ jQuery(function($){
post_params : {
"post_id" : "",
"auth_cookie" : "",
+ "_wpnonce" : "",
"type" : "",
"tab" : "",
"short" : "1"
@@ -815,6 +819,7 @@ jQuery(function($){
//-->
+
-
', $type_links) . '';
unset($type_links);
?>
-
@@ -1066,8 +1069,10 @@ jQuery(function($){
+
+
flush_rules();
@@ -747,6 +750,12 @@ function upgrade_251() {
update_option('secret', wp_generate_password(64));
}
+function upgrade_252() {
+ global $wpdb;
+
+ $wpdb->query("UPDATE $wpdb->users SET user_activation_key = ''");
+}
+
// The functions we use to actually do stuff
// General
diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php
index 641f80f..09936b7 100644
--- a/wp-admin/includes/widgets.php
+++ b/wp-admin/includes/widgets.php
@@ -227,6 +227,7 @@ function wp_widget_control( $sidebar_args ) {
if ( empty($sidebar_args['_display']) || 'template' != $sidebar_args['_display'] )
echo $sidebar_args['before_widget'];
?>
+
+
>
--
cgit