diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-02-28 12:13:39 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-02-28 12:13:39 +0000 |
commit | c897a0ba270f217512e37f8bd520dd24b35b058d (patch) | |
tree | ab5683db986751fe3d79c9aeddcbbafa708870c7 /wp-includes/general-template.php | |
parent | 8399b696d7660728535b85dbd90466f0e82e6fc8 (diff) | |
download | wordpress-mu-c897a0ba270f217512e37f8bd520dd24b35b058d.tar.gz wordpress-mu-c897a0ba270f217512e37f8bd520dd24b35b058d.tar.xz wordpress-mu-c897a0ba270f217512e37f8bd520dd24b35b058d.zip |
WP Merge to rev 4956
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@904 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/general-template.php')
-rw-r--r-- | wp-includes/general-template.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 113c173..b0fd238 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -355,15 +355,15 @@ function wp_get_archives($args = '') { } elseif ('yearly' == $type) { $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts WHERE post_type ='post' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY post_date DESC" . $limit); if ($arcresults) { - $afterafter = $after; - foreach ($arcresults as $arcresult) { - $url = get_year_link($arcresult->year); - $text = sprintf('%d', $arcresult->year); + $afterafter = $after; + foreach ($arcresults as $arcresult) { + $url = get_year_link($arcresult->year); + $text = sprintf('%d', $arcresult->year); if ($show_post_count) - $after = ' ('.$arcresult->posts.')' . $afterafter; - echo get_archives_link($url, $text, $format, $before, $after); - } - } + $after = ' ('.$arcresult->posts.')' . $afterafter; + echo get_archives_link($url, $text, $format, $before, $after); + } + } } elseif ( 'daily' == $type ) { $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date DESC" . $limit); if ( $arcresults ) { |