summaryrefslogtreecommitdiffstats
path: root/wp-admin
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-26 12:57:25 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-26 12:57:25 +0000
commit8a8560c1b75ce5cb9f3b86bf3cba19c6df5000ff (patch)
tree9a697c0c3029c2b7a5223d818398c562346921e3 /wp-admin
parentc794c54fc14d1a4af6101ace58f8e60da2dc7d98 (diff)
downloadwordpress-mu-8a8560c1b75ce5cb9f3b86bf3cba19c6df5000ff.tar.gz
wordpress-mu-8a8560c1b75ce5cb9f3b86bf3cba19c6df5000ff.tar.xz
wordpress-mu-8a8560c1b75ce5cb9f3b86bf3cba19c6df5000ff.zip
WP Merge to rev 4813
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@868 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin')
-rw-r--r--wp-admin/admin-functions.php5
-rw-r--r--wp-admin/edit.php4
-rw-r--r--wp-admin/index.php19
-rw-r--r--wp-admin/options-general.php2
-rw-r--r--wp-admin/plugins.php18
5 files changed, 21 insertions, 27 deletions
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 ) {
<?php echo $pad; ?><?php the_title() ?>
</td>
<td><?php the_author() ?></td>
- <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( 'Y-m-d g:i a', $post->post_modified ); ?></td>
+ <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post->post_modified ); ?></td>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td>
<td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td>
<td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&amp;post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td>
@@ -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':
?>
- <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
+ <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time(_('Y-m-d \<\b\r \/\> g:i:s a')); ?></td>
<?php
break;
case 'title':
@@ -279,7 +279,7 @@ foreach ($comments as $comment) {
<?php comment_text() ?>
-<p><?php comment_date('M j, g:i A'); ?> &#8212; [
+<p><?php comment_date(__('M j, g:i A')); ?> &#8212; [
<?php
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" . __('Edit') . '</a>';
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) {
<div>
<h3><?php _e('Blog Stats'); ?></h3>
<?php
-$numposts = $wpdb->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 <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), number_format($numposts), 'edit.php');
+$comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), number_format($numcomms), 'edit-comments.php');
+$cat_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), number_format($numcats), 'categories.php');
?>
-<p><?php
-$post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), $numposts, 'edit.php');
-$comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), $numcomms, 'edit-comments.php');
-$cat_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), $numcats, 'categories.php');
-printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p>
+<p><?php printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p>
</div>
<?php do_action('activity_box_end'); ?>
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 ) {
<table class="optiontable">
<tr>
<th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th>
-<td><code><?php echo gmdate('Y-m-d g:i:s a'); ?></code></td>
+<td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td>
</tr>
<tr>
<th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th>
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) {
}
?>
-<?php if (isset($_GET['activate'])) : ?>
-<div id="message" class="updated fade"><p><?php _e('Plugin <strong>activated</strong>.') ?></p>
-</div>
-<?php endif; ?>
-<?php if (isset($_GET['deactivate'])) : ?>
-<div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p>
-</div>
+<?php if ( isset($_GET['error']) ) : ?>
+ <div id="message" class="updated fade"><p><?php _e('Plugin could not be activated because it triggered a <strong>fatal error</strong>.') ?></p></div>
+<?php elseif ( isset($_GET['activate']) ) : ?>
+ <div id="message" class="updated fade"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div>
+<?php elseif ( isset($_GET['deactivate']) ) : ?>
+ <div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div>
<?php endif; ?>
<div class="wrap">