mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-24 18:18:01 +01:00
More calendar error-proofing.
git-svn-id: http://svn.automattic.com/wordpress/trunk@431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d5038dbf0c
commit
4574bd5dcb
@ -57,9 +57,12 @@ require_once($abspath.$b2inc.'/b2functions.php');
|
||||
require_once($abspath.$b2inc.'/b2vars.php');
|
||||
|
||||
// Quick check. If we have no posts at all, abort!
|
||||
$gotsome = $wpdb->get_var("SELECT ID from $tableposts WHERE post_status = 'publish' AND post_category > 0 ORDER BY post_date DESC LIMIT 1");
|
||||
if (!$gotsome)
|
||||
return;
|
||||
if (!$posts) {
|
||||
$gotsome = $wpdb->get_var("SELECT ID from $tableposts WHERE post_status = 'publish' AND post_category > 0 ORDER BY post_date DESC LIMIT 1");
|
||||
if (!$gotsome)
|
||||
// if all else fails, just show this month's calendar
|
||||
$calendar = date('Ym');
|
||||
}
|
||||
|
||||
$w = $HTTP_GET_VARS['w'];
|
||||
if (isset($HTTP_GET_VARS['w'])) {
|
||||
|
Loading…
Reference in New Issue
Block a user