Skip to content
Browse files

Bug fixes

git-svn-id: http://svn.automattic.com/wordpress/trunk@1980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 90c90b3 commit 1bd4057b23d1f75ba7c57595f3d361f92442579e saxmatt committed
Showing with 10 additions and 9 deletions.
  1. +3 −3 wp-admin/index.php
  2. +1 −1 wp-includes/functions-formatting.php
  3. +6 −5 wp-settings.php
View
6 wp-admin/index.php
@@ -4,7 +4,7 @@
require_once('admin-header.php');
require_once (ABSPATH . WPINC . '/rss-functions.php');
-$today = current_time('mysql');
+$today = current_time('mysql', 1);
?>
<div class="wrap">
@@ -30,7 +30,7 @@
<?php endif; ?>
<?php
-if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt > '$today'") ) :
+if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt > '$today'") ) :
?>
<div>
<h3><?php _e('Scheduled Entries:') ?></h3>
@@ -39,7 +39,7 @@
foreach ($scheduled as $post) {
if ($post->post_title == '')
$post->post_title = sprintf(__('Post #%s'), $post->ID);
- echo "<li><a href='post.php?action=edit&amp;post=$post->ID' title='" . __('Edit this post') . "'>$post->post_title</a> in " . human_time_diff( time(), strtotime($post->post_date) ) . "</li>";
+ echo "<li><a href='post.php?action=edit&amp;post=$post->ID' title='" . __('Edit this post') . "'>$post->post_title</a> in " . human_time_diff( time(), strtotime($post->post_date_gmt) ) . "</li>";
}
?>
</ul>
View
2 wp-includes/functions-formatting.php
@@ -556,7 +556,7 @@ function human_time_diff( $from, $to = '' ) {
$diff = (int) ($to - $from);
if ($diff <= 3600) {
$mins = round($diff / 60);
- $since = sprintf( __('%s mins', $mins) );
+ $since = sprintf( __('%s mins'), $mins);
} else if (($diff <= 86400) && ($diff > 3600)) {
$hours = round($diff / 3600);
if ($hours <= 1)
View
11 wp-settings.php
@@ -58,6 +58,12 @@ function timer_start() {
$tablepostmeta = $wpdb->postmeta;
require (ABSPATH . WPINC . '/functions.php');
+
+$wpdb->hide_errors();
+if ( !update_user_cache() && !strstr($_SERVER['PHP_SELF'], 'install.php') )
+ die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
+$wpdb->show_errors();
+
require (ABSPATH . WPINC . '/functions-formatting.php');
require (ABSPATH . WPINC . '/functions-post.php');
require (ABSPATH . WPINC . '/classes.php');
@@ -67,11 +73,6 @@ function timer_start() {
require_once (ABSPATH . WPINC . '/wp-l10n.php');
-$wpdb->hide_errors();
-if ( !update_user_cache() && !strstr($_SERVER['PHP_SELF'], 'install.php') )
- die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
-$wpdb->show_errors();
-
if (!strstr($_SERVER['PHP_SELF'], 'install.php') && !strstr($_SERVER['PHP_SELF'], 'wp-admin/import')) :
$querystring_start = '?';
$querystring_equal = '=';

0 comments on commit 1bd4057

Please sign in to comment.
Something went wrong with that request. Please try again.