From 8a8560c1b75ce5cb9f3b86bf3cba19c6df5000ff Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 26 Jan 2007 12:57:25 +0000 Subject: WP Merge to rev 4813 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@868 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/admin-functions.php | 5 ++--- wp-admin/edit.php | 4 ++-- wp-admin/index.php | 19 +++++++------------ wp-admin/options-general.php | 2 +- wp-admin/plugins.php | 18 +++++++++--------- 5 files changed, 21 insertions(+), 27 deletions(-) (limited to 'wp-admin') diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index b274e67..83e0e74 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -840,7 +840,7 @@ function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) { - post_modified ) _e('Unpublished'); else echo mysql2date( 'Y-m-d g:i a', $post->post_modified ); ?> + post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post->post_modified ); ?> " . __( 'Edit' ) . ""; } ?> " . __( 'Delete' ) . ""; } ?> @@ -1615,7 +1615,7 @@ function get_file_description( $file ) { } elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) { $template_data = implode( '', file( ABSPATH . $file ) ); - if ( preg_match( "|Template Name:(.* )|i", $template_data, $name )) + if ( preg_match( "|Template Name:(.*)|i", $template_data, $name )) return $name[1]; } @@ -2232,7 +2232,6 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) { } } - function update_blog_public($old_value, $value) { global $wpdb; $value = (int) $value; diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 205f528..1f87056 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -177,7 +177,7 @@ foreach($posts_columns as $column_name=>$column_display_name) { case 'date': ?> - post_modified ) _e('Unpublished'); else the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?> + post_modified ) _e('Unpublished'); else the_time(_('Y-m-d \<\b\r \/\> g:i:s a')); ?> -

— [ +

— [ comment_post_ID) ) { echo " " . __('Edit') . ''; diff --git a/wp-admin/index.php b/wp-admin/index.php index 92702e3..53c4ddf 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -98,21 +98,16 @@ foreach ($scheduled as $post) {

get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); -if (0 < $numposts) $numposts = number_format($numposts); +$numposts = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); +$numcomms = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); +$numcats = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); -if (0 < $numcomms) $numcomms = number_format($numcomms); - -$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -if (0 < $numcats) $numcats = number_format($numcats); +$post_str = sprintf(__ngettext('%1$s post', '%1$s posts', $numposts), number_format($numposts), 'edit.php'); +$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), number_format($numcomms), 'edit-comments.php'); +$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), number_format($numcats), 'categories.php'); ?> -

post', '%1$s posts', $numposts), $numposts, 'edit.php'); -$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), $numcomms, 'edit-comments.php'); -$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), $numcats, 'categories.php'); -printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?>

+

diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index 5c4fa8f..d31ddf6 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -72,7 +72,7 @@ if( is_array( $lang_files ) && count($lang_files) > 1 ) { - + diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 2889b13..bd80c2e 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -18,13 +18,14 @@ if ( isset($_GET['action']) ) { if ( ! file_exists(ABSPATH . PLUGINDIR . '/' . $plugin) ) wp_die(__('Plugin file does not exist.')); if (!in_array($plugin, $current)) { + wp_redirect('plugins.php?error=true'); // we'll override this later if the plugin can be included without fatal error + @include(ABSPATH . PLUGINDIR . '/' . $plugin); $current[] = $plugin; sort($current); update_option('active_plugins', $current); - include(ABSPATH . PLUGINDIR . '/' . $plugin); do_action('activate_' . $plugin); } - wp_redirect('plugins.php?activate=true'); + wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above } else if ('deactivate' == $_GET['action']) { check_admin_referer('deactivate-plugin_' . $_GET['plugin']); $current = get_option('active_plugins'); @@ -65,13 +66,12 @@ foreach ($check_plugins as $check_plugin) { } ?> - -

activated.') ?>

-
- - -

deactivated.') ?>

-
+ +

fatal error.') ?>

+ +

activated.') ?>

+ +

deactivated.') ?>

-- cgit
UTC time is:') ?>