### Eclipse Workspace Patch 1.0
#P wordpress-trunk
Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 12527)
+++ wp-includes/general-template.php	(working copy)
@@ -869,7 +869,7 @@
 		}
 	} elseif ( 'weekly' == $type ) {
 		$start_of_week = get_option('start_of_week');
-		$query = "SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY WEEK(post_date, $start_of_week), YEAR(post_date) ORDER BY post_date DESC $limit";
+		$query = $wpdb->prepare("SELECT DISTINCT WEEK(post_date, %d) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%%Y-%%m-%%d') AS yyyymmdd, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY WEEK(post_date, $start_of_week), YEAR(post_date) ORDER BY post_date DESC %d", $start_of_week, $limit);
 		$key = md5($query);
 		$cache = wp_cache_get( 'wp_get_archives' , 'general');
 		if ( !isset( $cache[ $key ] ) ) {
