Changeset 10708
- Timestamp:
- 03/04/2009 10:28:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r10660 r10708 931 931 $cache = array(); 932 932 933 ob_start();934 933 // Quick check. If we have no posts at all, abort! 935 934 if ( !$posts ) { 936 $gotsome = $wpdb->get_var("SELECT ID from $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 1"); 937 if ( !$gotsome ) 935 $gotsome = $wpdb->get_var("SELECT 1 FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1"); 936 if ( !$gotsome ) { 937 $cache[ $key ] = ''; 938 wp_cache_set( 'get_calendar', $cache, 'calendar' ); 938 939 return; 939 } 940 940 } 941 } 942 943 ob_start(); 941 944 if ( isset($_GET['w']) ) 942 945 $w = ''.intval($_GET['w']);
Note: See TracChangeset
for help on using the changeset viewer.