Bug fixes

git-svn-id: http://svn.automattic.com/wordpress/trunk@1980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-12-19 07:26:43 +00:00
parent 90c90b336f
commit 1bd4057b23
3 changed files with 10 additions and 9 deletions

View File

@ -4,7 +4,7 @@ $title = __('Dashboard');
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 @@ foreach ($recentposts as $post) {
<?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 @@ if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date FROM $wpd
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 File

@ -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 File

@ -58,6 +58,12 @@ $tableoptions = $wpdb->options;
$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 @@ require (ABSPATH . WPINC . '/kses.php');
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 = '=';