<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,8 +1,7 @@
-
-#posting {
- 	position: static !important;
-}
- .ui-tabs-nav {
- 	margin-left: 0;
- 	border: 0 !important;
-}
+#posting {
+ 	position: static !important;
+}
+ .ui-tabs-nav {
+ 	margin-left: 0;
+ 	border: 0 !important;
+}</diff>
      <filename>wp-admin/css/press-this-ie.css</filename>
    </modified>
    <modified>
      <diff>@@ -333,7 +333,7 @@ class Textpattern_Import {
 				$category1 = get_category_by_slug($Category1);
 				$category1 = $category1-&gt;term_id;
 				$category2 = get_category_by_slug($Category2);
-				$category2 = $category1-&gt;term_id;
+				$category2 = $category2-&gt;term_id;
 				if($cat1 = $category1) { $cats[1] = $cat1; }
 				if($cat2 = $category2) { $cats[2] = $cat2; }
 </diff>
      <filename>wp-admin/import/textpattern.php</filename>
    </modified>
    <modified>
      <diff>@@ -219,17 +219,17 @@ function wp_read_image_metadata( $file ) {
 		if ( !empty($info['APP13']) ) {
 			$iptc = iptcparse($info['APP13']);
 			if ( !empty($iptc['2#110'][0]) ) // credit
-				$meta['credit'] = trim( $iptc['2#110'][0] );
+				$meta['credit'] = utf8_encode(trim($iptc['2#110'][0]));
 			elseif ( !empty($iptc['2#080'][0]) ) // byline
-				$meta['credit'] = trim( $iptc['2#080'][0] );
+				$meta['credit'] = utf8_encode(trim($iptc['2#080'][0]));
 			if ( !empty($iptc['2#055'][0]) and !empty($iptc['2#060'][0]) ) // created datee and time
 				$meta['created_timestamp'] = strtotime($iptc['2#055'][0] . ' ' . $iptc['2#060'][0]);
 			if ( !empty($iptc['2#120'][0]) ) // caption
-				$meta['caption'] = trim( $iptc['2#120'][0] );
+				$meta['caption'] = utf8_encode(trim($iptc['2#120'][0]));
 			if ( !empty($iptc['2#116'][0]) ) // copyright
-				$meta['copyright'] = trim( $iptc['2#116'][0] );
+				$meta['copyright'] = utf8_encode(trim($iptc['2#116'][0]));
 			if ( !empty($iptc['2#005'][0]) ) // title
-				$meta['title'] = trim( $iptc['2#005'][0] );
+				$meta['title'] = utf8_encode(trim($iptc['2#005'][0]));
 		 }
 	}
 </diff>
      <filename>wp-admin/includes/image.php</filename>
    </modified>
    <modified>
      <diff>@@ -715,7 +715,7 @@ function _wp_get_comment_list( $status = '', $s = false, $start, $num ) {
 			$approved
 			ORDER BY comment_date_gmt DESC LIMIT $start, $num&quot;);
 	} else {
-		$comments = $wpdb-&gt;get_results( &quot;SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb-&gt;comments USE INDEX (comment_date_gmt) WHERE $approved ORDER BY comment_date_gmt DESC LIMIT $start, $num&quot; );
+		$comments = $wpdb-&gt;get_results( &quot;SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb-&gt;comments WHERE $approved ORDER BY comment_date_gmt DESC LIMIT $start, $num&quot; );
 	}
 
 	update_comment_cache($comments);</diff>
      <filename>wp-admin/includes/template.php</filename>
    </modified>
    <modified>
      <diff>@@ -3,9 +3,9 @@
 Plugin Name: Akismet
 Plugin URI: http://akismet.com/
 Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a &lt;a href=&quot;http://wordpress.com/api-keys/&quot;&gt;WordPress.com API key&lt;/a&gt; to use it. You can review the spam it catches under &quot;Comments.&quot; To show off your Akismet stats just put &lt;code&gt;&amp;lt;?php akismet_counter(); ?&gt;&lt;/code&gt; in your template. See also: &lt;a href=&quot;http://wordpress.org/extend/plugins/stats/&quot;&gt;WP Stats plugin&lt;/a&gt;.
-Version: 2.1.6
+Version: 2.1.8
 Author: Matt Mullenweg
-Author URI: http://photomatt.net/
+Author URI: http://ma.tt/
 */
 
 // If you hardcode a WP.com API key here, all key config screens will be hidden
@@ -327,7 +327,12 @@ function akismet_spam_totals() {
 }
 
 function akismet_manage_page() {
-	global $wpdb, $submenu;
+	global $wpdb, $submenu, $wp_db_version;
+
+	// WP 2.7 has its own spam management page
+	if ( 8645 &lt;= $wp_db_version )
+		return;
+
 	$count = sprintf(__('Akismet Spam (%s)'), akismet_spam_count());
 	if ( isset( $submenu['edit-comments.php'] ) )
 		add_submenu_page('edit-comments.php', __('Akismet Spam'), $count, 'moderate_comments', 'akismet-admin', 'akismet_caught' );
@@ -337,6 +342,7 @@ function akismet_manage_page() {
 
 function akismet_caught() {
 	global $wpdb, $comment, $akismet_caught, $akismet_nonce;
+
 	akismet_recheck_queue();
 	if (isset($_POST['submit']) &amp;&amp; 'recover' == $_POST['action'] &amp;&amp; ! empty($_POST['not_spam'])) {
 		check_admin_referer( $akismet_nonce );
@@ -708,18 +714,22 @@ if ( 'moderation.php' == $pagenow ) {
 function akismet_check_for_spam_button($comment_status) {
 	if ( 'approved' == $comment_status )
 		return;
-	echo &quot;&lt;/div&gt;&lt;div class='alignleft'&gt;&lt;a class='button-secondary checkforspam' href='edit-comments.php?page=akismet-admin&amp;amp;recheckqueue=true&amp;amp;noheader=true'&gt;&quot; . __('Check for Spam') . &quot;&lt;/a&gt;&quot;;
+	if ( function_exists('plugins_url') )
+		$link = 'admin.php?action=akismet_recheck_queue';
+	else
+		$link = 'edit-comments.php?page=akismet-admin&amp;amp;recheckqueue=true&amp;amp;noheader=true';
+	echo &quot;&lt;/div&gt;&lt;div class='alignleft'&gt;&lt;a class='button-secondary checkforspam' href='$link'&gt;&quot; . __('Check for Spam') . &quot;&lt;/a&gt;&quot;;
 }
 add_action('manage_comments_nav', 'akismet_check_for_spam_button');
 
 function akismet_recheck_queue() {
 	global $wpdb, $akismet_api_host, $akismet_api_port;
 
-	if ( !isset( $_GET['recheckqueue'] ) )
+	if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) &amp;&amp; 'akismet_recheck_queue' == $_REQUEST['action'] ) ) )
 		return;
 
 	$moderation = $wpdb-&gt;get_results( &quot;SELECT * FROM $wpdb-&gt;comments WHERE comment_approved = '0'&quot;, ARRAY_A );
-	foreach ( $moderation as $c ) {
+	foreach ( (array) $moderation as $c ) {
 		$c['user_ip']    = $c['comment_author_IP'];
 		$c['user_agent'] = $c['comment_agent'];
 		$c['referrer']   = '';
@@ -739,6 +749,8 @@ function akismet_recheck_queue() {
 	exit;
 }
 
+add_action('admin_action_akismet_recheck_queue', 'akismet_recheck_queue');
+
 function akismet_check_db_comment( $id ) {
 	global $wpdb, $akismet_api_host, $akismet_api_port;
 </diff>
      <filename>wp-content/plugins/akismet/akismet.php</filename>
    </modified>
    <modified>
      <diff>@@ -332,6 +332,9 @@ function sanitize_user( $username, $strict = false ) {
 	if ( $strict )
 		$username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username);
 
+	// Consolidate contiguous whitespace
+	$username = preg_replace('|\s+|', ' ', $username);
+
 	return apply_filters('sanitize_user', $username, $raw_username, $strict);
 }
 </diff>
      <filename>wp-includes/formatting.php</filename>
    </modified>
    <modified>
      <diff>@@ -1289,11 +1289,53 @@ function wp_generate_password($length = 12, $special_chars = true) {
 
 	$password = '';
 	for ( $i = 0; $i &lt; $length; $i++ )
-		$password .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
+		$password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1);
 	return $password;
 }
 endif;
 
+if ( !function_exists('wp_rand') ) :
+ /**
+ * Generates a random number
+ *
+ * @since 2.6.2
+ *
+ * @param int $min Lower limit for the generated number (optional, default is 0)
+ * @param int $max Upper limit for the generated number (optional, default is 4294967295)
+ * @return int A random number between min and max
+ */
+function wp_rand( $min = 0, $max = 0 ) {
+	global $rnd_value;
+
+	$seed = get_option('random_seed');
+
+	// Reset $rnd_value after 14 uses
+	// 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value
+	if ( strlen($rnd_value) &lt; 8 ) {
+		$rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed );
+		$rnd_value .= sha1($rnd_value);
+		$rnd_value .= sha1($rnd_value . $seed);
+		$seed = md5($seed . $rnd_value);
+		update_option('random_seed', $seed);
+	}
+
+	// Take the first 8 digits for our value
+	$value = substr($rnd_value, 0, 8);
+
+	// Strip the first eight, leaving the remainder for the next call to wp_rand().
+	$rnd_value = substr($rnd_value, 8);
+
+	$value = abs(hexdec($value));
+
+	// Reduce the value to be within the min - max range
+	// 4294967295 = 0xffffffff = max random number
+	if ( $max != 0 )
+		$value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));
+
+	return abs(intval($value)); 
+}
+endif;
+
 if ( !function_exists('wp_set_password') ) :
 /**
  * Updates the user's password with a new encrypted one.</diff>
      <filename>wp-includes/pluggable.php</filename>
    </modified>
    <modified>
      <diff>@@ -465,7 +465,7 @@ function get_posts($args = null) {
 		'order' =&gt; 'DESC', 'include' =&gt; '',
 		'exclude' =&gt; '', 'meta_key' =&gt; '',
 		'meta_value' =&gt;'', 'post_type' =&gt; 'post',
-		'post_parent' =&gt; 0
+		'post_parent' =&gt; 0, 'suppress_filters' =&gt; true
 	);
 
 	$r = wp_parse_args( $args, $defaults );
@@ -594,27 +594,20 @@ function get_post_meta($post_id, $key, $single = false) {
 
 	$meta_cache = wp_cache_get($post_id, 'post_meta');
 
+	if ( !$meta_cache ) {
+		update_postmeta_cache($post_id);
+		$meta_cache = wp_cache_get($post_id, 'post_meta');
+	}
+
 	if ( isset($meta_cache[$key]) ) {
 		if ( $single ) {
 			return maybe_unserialize( $meta_cache[$key][0] );
 		} else {
-			return maybe_unserialize( $meta_cache[$key] );
+			return array_map('maybe_unserialize', $meta_cache[$key]);
 		}
 	}
 
-	if ( !$meta_cache ) {
-		update_postmeta_cache($post_id);
-		$meta_cache = wp_cache_get($post_id, 'post_meta');
-	}
-
-	if ( $single ) {
-		if ( isset($meta_cache[$key][0]) )
-			return maybe_unserialize($meta_cache[$key][0]);
-		else
-			return '';
-	} else {
-		return maybe_unserialize($meta_cache[$key]);
-	}
+	return '';
 }
 
 /**
@@ -3297,7 +3290,7 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
 	if ( !$post || empty($post['ID']) )
 		return;
 
-	if ( isset($post['post_type']) &amp;&amp; 'revision' == $post_post['type'] )
+	if ( isset($post['post_type']) &amp;&amp; 'revision' == $post['post_type'] )
 		return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );
 
 	$post = _wp_post_revision_fields( $post, $autosave );</diff>
      <filename>wp-includes/post.php</filename>
    </modified>
    <modified>
      <diff>@@ -775,7 +775,7 @@ class WP_Query {
 		if ( !empty($qv['post_status']) )
 			$qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']);
 
-		if ( $this-&gt;is_posts_page &amp;&amp; !$qv['withcomments'] )
+		if ( $this-&gt;is_posts_page &amp;&amp; ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) )
 			$this-&gt;is_comment_feed = false;
 
 		$this-&gt;is_singular = $this-&gt;is_single || $this-&gt;is_page || $this-&gt;is_attachment;
@@ -829,7 +829,12 @@ class WP_Query {
 		$join = '';
 		$search = '';
 		$groupby = '';
+		$fields = &quot;$wpdb-&gt;posts.*&quot;;
 		$post_status_join = false;
+		$page = 1;
+
+		if ( !isset($q['suppress_filters']) )
+			$q['suppress_filters'] = false;
 
 		if ( !isset($q['post_type']) ) {
 			if ( $this-&gt;is_search )
@@ -1361,8 +1366,10 @@ class WP_Query {
 
 		// Apply filters on where and join prior to paging so that any
 		// manipulations to them are reflected in the paging by day queries.
-		$where = apply_filters('posts_where', $where);
-		$join = apply_filters('posts_join', $join);
+		if ( !$q['suppress_filters'] ) {
+			$where = apply_filters('posts_where', $where);
+			$join = apply_filters('posts_join', $join);
+		}
 
 		// Paging
 		if ( empty($q['nopaging']) &amp;&amp; !$this-&gt;is_singular ) {
@@ -1394,9 +1401,11 @@ class WP_Query {
 				$cgroupby = '';
 			}
 
-			$cjoin = apply_filters('comment_feed_join', $cjoin);
-			$cwhere = apply_filters('comment_feed_where', $cwhere);
-			$cgroupby = apply_filters('comment_feed_groupby', $cgroupby);
+			if ( !$q['suppress_filters'] ) {
+				$cjoin = apply_filters('comment_feed_join', $cjoin);
+				$cwhere = apply_filters('comment_feed_where', $cwhere);
+				$cgroupby = apply_filters('comment_feed_groupby', $cgroupby);
+			}
 
 			$this-&gt;comments = (array) $wpdb-&gt;get_results(&quot;SELECT $distinct $wpdb-&gt;comments.* FROM $wpdb-&gt;comments $cjoin $cwhere $cgroupby ORDER BY comment_date_gmt DESC LIMIT &quot; . get_option('posts_per_rss'));
 			$this-&gt;comment_count = count($this-&gt;comments);
@@ -1414,28 +1423,33 @@ class WP_Query {
 				$where = &quot;AND 0&quot;;
 		}
 
+		$orderby = $q['orderby'];
+
 		// Apply post-paging filters on where and join.  Only plugins that
 		// manipulate paging queries should use these hooks.
-
-		$where = apply_filters('posts_where_paged', $where);
-		$groupby = apply_filters('posts_groupby', $groupby);
-		$join = apply_filters('posts_join_paged', $join);
-		$orderby = apply_filters('posts_orderby', $q['orderby']);
-		$distinct = apply_filters('posts_distinct', $distinct);
-		$fields = apply_filters('posts_fields', &quot;$wpdb-&gt;posts.*&quot;);
-		$limits = apply_filters( 'post_limits', $limits );
+		if ( !$q['suppress_filters'] ) {
+			$where = apply_filters('posts_where_paged', $where);
+			$groupby = apply_filters('posts_groupby', $groupby);
+			$join = apply_filters('posts_join_paged', $join);
+			$orderby = apply_filters('posts_orderby', $orderby);
+			$distinct = apply_filters('posts_distinct', $distinct);
+			$fields = apply_filters('posts_fields', $fields);
+			$limits = apply_filters( 'post_limits', $limits );
+		}
 
 		// Announce current selection parameters.  For use by caching plugins.
 		do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join );
 
 		// Filter again for the benefit of caching plugins.  Regular plugins should use the hooks above.
-		$where = apply_filters('posts_where_request', $where);
-		$groupby = apply_filters('posts_groupby_request', $groupby);
-		$join = apply_filters('posts_join_request', $join);
-		$orderby = apply_filters('posts_orderby_request', $orderby);
-		$distinct = apply_filters('posts_distinct_request', $distinct);
-		$fields = apply_filters('posts_fields_request', $fields);
-		$limits = apply_filters( 'post_limits_request', $limits );
+		if ( !$q['suppress_filters'] ) {
+			$where = apply_filters('posts_where_request', $where);
+			$groupby = apply_filters('posts_groupby_request', $groupby);
+			$join = apply_filters('posts_join_request', $join);
+			$orderby = apply_filters('posts_orderby_request', $orderby);
+			$distinct = apply_filters('posts_distinct_request', $distinct);
+			$fields = apply_filters('posts_fields_request', $fields);
+			$limits = apply_filters( 'post_limits_request', $limits );
+		}
 
 		if ( ! empty($groupby) )
 			$groupby = 'GROUP BY ' . $groupby;
@@ -1445,12 +1459,14 @@ class WP_Query {
 		if ( !empty($limits) )
 			$found_rows = 'SQL_CALC_FOUND_ROWS';
 
-		$request = &quot; SELECT $found_rows $distinct $fields FROM $wpdb-&gt;posts $join WHERE 1=1 $where $groupby $orderby $limits&quot;;
-		$this-&gt;request = apply_filters('posts_request', $request);
+		$this-&gt;request = &quot; SELECT $found_rows $distinct $fields FROM $wpdb-&gt;posts $join WHERE 1=1 $where $groupby $orderby $limits&quot;;
+		if ( !$q['suppress_filters'] )
+			$this-&gt;request = apply_filters('posts_request', $this-&gt;request);
 
 		$this-&gt;posts = $wpdb-&gt;get_results($this-&gt;request);
 		// Raw results filter.  Prior to status checks.
-		$this-&gt;posts = apply_filters('posts_results', $this-&gt;posts);
+		if ( !$q['suppress_filters'] )
+			$this-&gt;posts = apply_filters('posts_results', $this-&gt;posts);
 
 		if ( !empty($this-&gt;posts) &amp;&amp; $this-&gt;is_comment_feed &amp;&amp; $this-&gt;is_singular ) {
 			$cjoin = apply_filters('comment_feed_join', '');
@@ -1497,7 +1513,8 @@ class WP_Query {
 			}
 		}
 
-		$this-&gt;posts = apply_filters('the_posts', $this-&gt;posts);
+		if ( !$q['suppress_filters'] )
+			$this-&gt;posts = apply_filters('the_posts', $this-&gt;posts);
 
 		update_post_caches($this-&gt;posts);
 </diff>
      <filename>wp-includes/query.php</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '2.6.1';
+$wp_version = '2.6.2';
 
 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.</diff>
      <filename>wp-includes/version.php</filename>
    </modified>
    <modified>
      <diff>@@ -1162,8 +1162,12 @@ function wp_widget_rss_output( $rss, $args = array() ) {
 					$author = ' &lt;cite&gt;' . wp_specialchars( strip_tags( $item['author_name'] ) ) . '&lt;/cite&gt;';
 			}
 
-			echo &quot;&lt;li&gt;&lt;a class='rsswidget' href='$link' title='$desc'&gt;$title&lt;/a&gt;{$date}{$summary}{$author}&lt;/li&gt;&quot;;
-		}
+			if ( $link == '' ) {
+				echo &quot;&lt;li&gt;$title{$date}{$summary}{$author}&lt;/li&gt;&quot;; 
+			} else {
+				echo &quot;&lt;li&gt;&lt;a class='rsswidget' href='$link' title='$desc'&gt;$title&lt;/a&gt;{$date}{$summary}{$author}&lt;/li&gt;&quot;; 
+			}
+}
 		echo '&lt;/ul&gt;';
 	} else {
 		echo '&lt;ul&gt;&lt;li&gt;' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '&lt;/li&gt;&lt;/ul&gt;';</diff>
      <filename>wp-includes/widgets.php</filename>
    </modified>
    <modified>
      <diff>@@ -424,6 +424,8 @@ default:
 
 	$user = wp_signon('', $secure_cookie);
 
+	$redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
+
 	if ( !is_wp_error($user) ) {
 		// If the user can't edit posts, send them to their profile.
 		if ( !$user-&gt;has_cap('edit_posts') &amp;&amp; ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )</diff>
      <filename>wp-login.php</filename>
    </modified>
    <modified>
      <diff>@@ -101,7 +101,7 @@ if ( empty($PHP_SELF) )
 	$_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace(&quot;/(\?.*)?$/&quot;,'',$_SERVER[&quot;REQUEST_URI&quot;]);
 
 if ( version_compare( '4.3', phpversion(), '&gt;' ) ) {
-	die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, php_version() ) );
+	die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion() ) );
 }
 
 if ( !defined('WP_CONTENT_DIR') )</diff>
      <filename>wp-settings.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b1fb4c49704ed3fdc0d5f2264f546eb91b54fa18</id>
    </parent>
  </parents>
  <author>
    <name>Ian McKellar</name>
    <email>ian@mckellar.org</email>
  </author>
  <url>http://github.com/ianloic/wordpress/commit/3e13e2b0a61f03c5d7270f0045f1302d6b12ed2a</url>
  <id>3e13e2b0a61f03c5d7270f0045f1302d6b12ed2a</id>
  <committed-date>2008-09-08T15:45:54-07:00</committed-date>
  <authored-date>2008-09-08T15:45:54-07:00</authored-date>
  <message>upgrade to wordpress 2.6.2</message>
  <tree>bf786037aede00f4723f3728ce3e61789829ef7d</tree>
  <committer>
    <name>Ian McKellar</name>
    <email>ian@mckellar.org</email>
  </committer>
</commit>
