Index: general-template.php
===================================================================
--- general-template.php	(revision 11234)
+++ general-template.php	(working copy)
@@ -119,7 +119,7 @@
 		return;
 
 	$form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" >
-	<div><label class="invisible" for="s">' . __('Search for:') . '</label>
+	<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
 	<input type="text" value="' . esc_attr(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />
 	<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
 	</div>
@@ -187,7 +187,7 @@
 	$login_url = site_url('wp-login.php', 'login');
 
 	if ( !empty($redirect) ) {
-		$login_url = add_query_arg('redirect_to', $redirect, $login_url);
+		$login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);
 	}
 
 	return apply_filters('login_url', $login_url, $redirect);
@@ -873,7 +873,12 @@
 		}
 	} elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) {
 		$orderby = ('alpha' == $type) ? "post_title ASC " : "post_date DESC ";
-		$query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit";
+
+		$distinct = apply_filters('getarchives_distinct', "", $r); 
+		$fields = apply_filters('getarchives_fields', "*", $r); 
+
+		$query = "SELECT $distinct $fields FROM $wpdb->posts $join $where ORDER BY $orderby $limit"; 
+		
 		$key = md5($query);
 		$cache = wp_cache_get( 'wp_get_archives' , 'general');
 		if ( !isset( $cache[ $key ] ) ) {
@@ -1177,7 +1182,7 @@
  */
 function the_date_xml() {
 	global $post;
-	echo mysql2date('Y-m-d', $post->post_date);
+	echo mysql2date('Y-m-d', $post->post_date, false);
 }
 
 /**
@@ -1236,9 +1241,9 @@
  */
 function get_the_modified_date($d = '') {
 	if ( '' == $d )
-		$the_time = get_post_modified_time(get_option('date_format'));
+		$the_time = get_post_modified_time(get_option('date_format'), null, null, true);
 	else
-		$the_time = get_post_modified_time($d);
+		$the_time = get_post_modified_time($d, null, null, true);
 	return apply_filters('get_the_modified_date', $the_time, $d);
 }
 
@@ -1266,9 +1271,9 @@
 	$post = get_post($post);
 
 	if ( '' == $d )
-		$the_time = get_post_time(get_option('time_format'), false, $post);
+		$the_time = get_post_time(get_option('time_format'), false, $post, true);
 	else
-		$the_time = get_post_time($d, false, $post);
+		$the_time = get_post_time($d, false, $post, true);
 	return apply_filters('get_the_time', $the_time, $d, $post);
 }
 
@@ -1280,9 +1285,10 @@
  * @param string $d Either 'G', 'U', or php date format.
  * @param bool $gmt Whether of not to return the gmt time.
  * @param int|object $post Optional post ID or object. Default is global $post object.
+ * @param bool $translate Whether to translate the time string or not
  * @return string
  */
-function get_post_time( $d = 'U', $gmt = false, $post = null ) { // returns timestamp
+function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { // returns timestamp
 	$post = get_post($post);
 
 	if ( $gmt )
@@ -1290,7 +1296,7 @@
 	else
 		$time = $post->post_date;
 
-	$time = mysql2date($d, $time);
+	$time = mysql2date($d, $time, $translate);
 	return apply_filters('get_post_time', $time, $d, $gmt);
 }
 
@@ -1315,9 +1321,9 @@
  */
 function get_the_modified_time($d = '') {
 	if ( '' == $d )
-		$the_time = get_post_modified_time(get_option('time_format'));
+		$the_time = get_post_modified_time(get_option('time_format'), null, null, true);
 	else
-		$the_time = get_post_modified_time($d);
+		$the_time = get_post_modified_time($d, null, null, true);
 	return apply_filters('get_the_modified_time', $the_time, $d);
 }
 
@@ -1328,18 +1334,20 @@
  *
  * @param string $d Either 'G', 'U', or php date format.
  * @param bool $gmt Whether of not to return the gmt time.
+ * @param int|object $post A post_id or post object
+ * @param bool translate Whether to translate the result or not
  * @return string Returns timestamp
  */
-function get_post_modified_time( $d = 'U', $gmt = false ) {
-	global $post;
+function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
+	$post = get_post($post);
 
 	if ( $gmt )
 		$time = $post->post_modified_gmt;
 	else
 		$time = $post->post_modified;
-	$time = mysql2date($d, $time);
+	$time = mysql2date($d, $time, $translate);
 
-	return apply_filters('get_the_modified_time', $time, $d, $gmt);
+	return apply_filters('get_post_modified_time', $time, $d, $gmt);
 }
 
 /**
@@ -1351,7 +1359,7 @@
  */
 function the_weekday() {
 	global $wp_locale, $post;
-	$the_weekday = $wp_locale->get_weekday(mysql2date('w', $post->post_date));
+	$the_weekday = $wp_locale->get_weekday(mysql2date('w', $post->post_date, false));
 	$the_weekday = apply_filters('the_weekday', $the_weekday);
 	echo $the_weekday;
 }
@@ -1372,7 +1380,7 @@
 	$the_weekday_date = '';
 	if ( $day != $previousweekday ) {
 		$the_weekday_date .= $before;
-		$the_weekday_date .= $wp_locale->get_weekday(mysql2date('w', $post->post_date));
+		$the_weekday_date .= $wp_locale->get_weekday(mysql2date('w', $post->post_date, false));
 		$the_weekday_date .= $after;
 		$previousweekday = $day;
 	}
