Index: wp-rss.php
===================================================================
--- wp-rss.php (.../2.1.3) (revision 5482)
+++ wp-rss.php (.../2.2) (revision 5482)
@@ -5,33 +5,6 @@
wp('feed=rss');
}
-header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
-$more = 1;
+require (ABSPATH . WPINC . '/feed-rss.php');
-?>
-'; ?>
-
-
' . __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function...') . '
- +
@@ -363,9 +366,9 @@wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress › Error");
+ require_once( dirname(__FILE__) . '/wp-includes/classes.php');
+ require_once( dirname(__FILE__) . '/wp-includes/functions.php');
+ require_once( dirname(__FILE__) . '/wp-includes/plugin.php');
+ wp_die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress › Error");
}
$wp_did_header = true;
Index: wp-rdf.php
===================================================================
--- wp-rdf.php (.../2.1.3) (revision 5482)
+++ wp-rdf.php (.../2.2) (revision 5482)
@@ -5,53 +5,6 @@
wp('feed=rdf');
}
-header('Content-type: application/rdf+xml; charset=' . get_option('blog_charset'), true);
-$more = 1;
+require (ABSPATH . WPINC . '/feed-rdf.php');
-?>
-'; ?>
-
-\s*)(.*?)!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '' ", $pee); $pee = preg_replace( "|\n$|", '', $pee ); @@ -564,12 +563,13 @@ } function trailingslashit($string) { - if ( '/' != substr($string, -1)) { - $string .= '/'; - } - return $string; + return untrailingslashit($string) . '/'; } +function untrailingslashit($string) { + return rtrim($string, '/'); +} + function addslashes_gpc($gpc) { global $wpdb; @@ -581,15 +581,22 @@ } -function stripslashes_deep($value) -{ +function stripslashes_deep($value) { $value = is_array($value) ? - array_map('stripslashes_deep', $value) : - stripslashes($value); + array_map('stripslashes_deep', $value) : + stripslashes($value); return $value; } +function urlencode_deep($value) { + $value = is_array($value) ? + array_map('urlencode_deep', $value) : + urlencode($value); + + return $value; +} + function antispambot($emailaddy, $mailto=0) { $emailNOSPAMaddy = ''; srand ((float) microtime() * 1000000); @@ -658,7 +665,7 @@ function is_email($user_email) { $chars = "/^([a-z0-9+_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,6}\$/i"; - if(strstr($user_email, '@') && strstr($user_email, '.')) { + if (strpos($user_email, '@') !== false && strpos($user_email, '.') !== false) { if (preg_match($chars, $user_email)) { return true; } else { @@ -1074,7 +1081,7 @@ $url = str_replace(';//', '://', $url); // Append http unless a relative link starting with / or a php file. if ( strpos($url, '://') === false && - substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9]+?\.php/i', $url) ) + substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) ) $url = 'http://' . $url; $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); Index: wp-includes/author-template.php =================================================================== --- wp-includes/author-template.php (.../2.1.3) (revision 5482) +++ wp-includes/author-template.php (.../2.2) (revision 5482) @@ -173,6 +173,8 @@ } function wp_list_authors($args = '') { + global $wpdb; + if ( is_array($args) ) $r = &$args; else @@ -182,15 +184,18 @@ 'feed' => '', 'feed_image' => ''); $r = array_merge($defaults, $r); extract($r); - - global $wpdb; + // TODO: Move select to get_authors(). - $query = "SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"; - $authors = $wpdb->get_results($query); + $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"); + + $author_count = array(); + foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_status = 'publish' GROUP BY post_author") as $row) { + $author_count[$row->post_author] = $row->count; + } foreach ( (array) $authors as $author ) { $author = get_userdata( $author->ID ); - $posts = get_usernumposts($author->ID); + $posts = (isset($author_count[$author->ID])) ? $author_count[$author->ID] : 0; $name = $author->nickname; if ( $show_fullname && ($author->first_name != '' && $author->last_name != '') ) Index: wp-includes/feed-rss2-comments.php =================================================================== --- wp-includes/feed-rss2-comments.php (.../2.1.3) (revision 0) +++ wp-includes/feed-rss2-comments.php (.../2.2) (revision 5482) @@ -0,0 +1,55 @@ +'; +?> + +