Index: index.php
===================================================================
--- index.php	(revision 3978)
+++ index.php	(working copy)
@@ -1,4 +1,4 @@
-<?php 
+<?php
 /* Short and sweet */
 define('WP_USE_THEMES', true);
 require('./wp-blog-header.php');
Index: wp-atom.php
===================================================================
--- wp-atom.php	(revision 3978)
+++ wp-atom.php	(working copy)
@@ -11,11 +11,11 @@
 ?>
 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
 <feed version="0.3"
-  xmlns="http://purl.org/atom/ns#"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
-  xml:lang="<?php echo get_option('rss_language'); ?>"
-  <?php do_action('atom_ns'); ?>
-  >
+	xmlns="http://purl.org/atom/ns#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xml:lang="<?php echo get_option('rss_language'); ?>"
+	<?php do_action('atom_ns'); ?>
+>
 	<title><?php bloginfo_rss('name') ?></title>
 	<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
 	<tagline><?php bloginfo_rss("description") ?></tagline>
@@ -25,7 +25,7 @@
 	<?php do_action('atom_head'); ?>
 	<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
 	<entry>
-	  	<author>
+		<author>
 			<name><?php the_author() ?></name>
 		</author>
 		<title type="text/html" mode="escaped"><![CDATA[<?php the_title_rss() ?>]]></title>
@@ -33,7 +33,7 @@
 		<id><?php the_guid(); ?></id>
 		<modified><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></modified>
 		<issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued>
-		<?php the_category_rss('rdf') ?> 
+		<?php the_category_rss('rdf') ?>
 		<summary type="text/plain" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
 <?php if ( !get_settings('rss_use_excerpt') ) : ?>
 		<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
Index: wp-blog-header.php
===================================================================
--- wp-blog-header.php	(revision 3978)
+++ wp-blog-header.php	(working copy)
@@ -4,7 +4,7 @@
 if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) {
 	if ( strstr( $_SERVER['PHP_SELF'], 'wp-admin') ) $path = '';
 	else $path = 'wp-admin/';
-    die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='{$path}setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.");
+	die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='{$path}setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.");
 }
 
 $wp_did_header = true;
Index: wp-comments-post.php
===================================================================
--- wp-comments-post.php	(revision 3978)
+++ wp-comments-post.php	(working copy)
@@ -57,7 +57,7 @@
 	setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
 endif;
 
-$location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to']; 
+$location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to'];
 
 wp_redirect( $location );
 
Index: wp-commentsrss2.php
===================================================================
--- wp-commentsrss2.php	(revision 3978)
+++ wp-commentsrss2.php	(working copy)
@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 if (empty($wp)) {
 	require_once('wp-config.php');
@@ -7,16 +7,16 @@
 
 header('Content-type: text/xml;charset=' . get_settings('blog_charset'), true);
 
-echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; 
+echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>';
 ?>
 <!-- generator="wordpress/<?php echo $wp_version ?>" -->
-<rss version="2.0" 
+<rss version="2.0"
 	xmlns:content="http://purl.org/rss/1.0/modules/content/">
 <channel>
 <?php
 $i = 0;
 if (have_posts()) :
-  while (have_posts()) : the_post();
+	while (have_posts()) : the_post();
 	if ($i < 1) {
 		$i++;
 ?>
@@ -26,21 +26,21 @@
 	<pubDate><?php echo gmdate('r'); ?></pubDate>
 	<generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator>
 
-<?php 
+<?php
 		if (is_single() || is_page()) {
-			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, 
-			comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID, 
-			$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments 
-			LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "' 
-			AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish' 
-			AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "' 
+			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
+			comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
+			$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
+			LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "'
+			AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
+			AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "'
 			ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss') );
 		} else { // if no post id passed in, we'll just ue the last 10 comments.
-			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, 
-			comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID, 
-			$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments 
-			LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish' 
-			AND $wpdb->comments.comment_approved = '1' AND post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'  
+			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
+			comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
+			$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
+			LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish'
+			AND $wpdb->comments.comment_approved = '1' AND post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'
 			ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss') );
 		}
 	// this line is WordPress' motor, do not delete it.
@@ -63,7 +63,7 @@
 		<link><?php comment_link() ?></link>
 		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
 		<guid><?php comment_link() ?></guid>
-			<?php 
+			<?php
 			if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
 			?>
 		<description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description>
@@ -73,12 +73,12 @@
 			?>
 		<description><?php comment_text_rss() ?></description>
 		<content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
-			<?php 
-			} // close check for password 
+			<?php
+			} // close check for password
 			?>
 	</item>
-<?php 
-			} 
+<?php
+			}
 		}
 	}
 endwhile; endif;
Index: wp-feed.php
===================================================================
--- wp-feed.php	(revision 3978)
+++ wp-feed.php	(working copy)
@@ -1,8 +1,8 @@
 <?php
 
 if (empty($doing_rss)) {
-    $doing_rss = 1;
-    require(dirname(__FILE__) . '/wp-blog-header.php');
+	$doing_rss = 1;
+	require(dirname(__FILE__) . '/wp-blog-header.php');
 }
 
 do_feed();
Index: wp-links-opml.php
===================================================================
--- wp-links-opml.php	(revision 3978)
+++ wp-links-opml.php	(working copy)
@@ -16,11 +16,11 @@
 ?><?php echo '<?xml version="1.0"?'.">\n"; ?>
 <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
 <opml version="1.0">
-    <head>
-        <title>Links for <?php echo get_bloginfo('name').$cat_name ?></title>
-        <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
-    </head>
-    <body>
+	<head>
+		<title>Links for <?php echo get_bloginfo('name').$cat_name ?></title>
+		<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
+	</head>
+	<body>
 <?php
 
 if (empty ($link_cat))
@@ -36,7 +36,7 @@
 	$bookmarks = get_bookmarks("category={$cat->cat_ID}");
 	foreach ((array) $bookmarks as $bookmark) {
 ?>
-            <outline text="<?php echo wp_specialchars($bookmark->link_name); ?>" type="link" xmlUrl="<?php echo wp_specialchars($bookmark->link_rss); ?>" htmlUrl="<?php echo wp_specialchars($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />
+	<outline text="<?php echo wp_specialchars($bookmark->link_name); ?>" type="link" xmlUrl="<?php echo wp_specialchars($bookmark->link_rss); ?>" htmlUrl="<?php echo wp_specialchars($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />
 <?php
 
 	}
Index: wp-login.php
===================================================================
--- wp-login.php	(revision 3978)
+++ wp-login.php	(working copy)
@@ -106,7 +106,7 @@
 	// Generate something random for a password... md5'ing current time with a rand salt
 	$key = substr( md5( uniqid( microtime() ) ), 0, 8);
 	// now insert the new pass md5'd into the db
- 	$wpdb->query("UPDATE $wpdb->users SET user_activation_key = '$key' WHERE user_login = '$user_login'");
+	$wpdb->query("UPDATE $wpdb->users SET user_activation_key = '$key' WHERE user_login = '$user_login'");
 	$message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n";
 	$message .= get_option('siteurl') . "\r\n\r\n";
 	$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
@@ -116,8 +116,8 @@
 	$m = wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_settings('blogname')), $message);
 
 	if ($m == false) {
-		 echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
-         echo  __('Possible reason: your host may have disabled the mail() function...') . "</p>";
+		echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
+		echo  __('Possible reason: your host may have disabled the mail() function...') . "</p>";
 		die();
 	} else {
 		echo '<p>' .  sprintf(__("The e-mail was sent successfully to %s's e-mail address."), $user_login) . '<br />';
@@ -140,7 +140,7 @@
 	do_action('password_reset');
 
 	$new_pass = substr( md5( uniqid( microtime() ) ), 0, 7);
- 	$wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$new_pass'), user_activation_key = '' WHERE user_login = '$user->user_login'");
+	$wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$new_pass'), user_activation_key = '' WHERE user_login = '$user->user_login'");
 	wp_cache_delete($user->ID, 'users');
 	wp_cache_delete($user->user_login, 'userlogins');
 	$message  = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
@@ -155,7 +155,7 @@
 		die();
 	} else {
 		echo '<p>' .  sprintf(__('Your new password is in the mail.'), $user_login) . '<br />';
-        echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
+		echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
 		// send a copy of password change notification to the admin
 		$message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
 		wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), $message);
@@ -163,7 +163,7 @@
 	}
 break;
 
-case 'login' : 
+case 'login' :
 default:
 
 	$user_login = '';
@@ -237,8 +237,8 @@
 <p><label><?php _e('Username:') ?><br /><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="20" tabindex="1" /></label></p>
 <p><label><?php _e('Password:') ?><br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label></p>
 <p>
-  <label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" /> 
-  <?php _e('Remember me'); ?></label></p>
+	<label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
+	<?php _e('Remember me'); ?></label></p>
 <p class="submit">
 	<input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> &raquo;" tabindex="4" />
 	<input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($redirect_to); ?>" />
Index: wp-register.php
===================================================================
--- wp-register.php	(revision 3978)
+++ wp-register.php	(working copy)
@@ -66,7 +66,7 @@
 </head>
 <body>
 
-<div id="login"> 
+<div id="login">
 	<h2><?php _e('Registration Complete') ?></h2>
 	<p><?php printf(__('Username: %s'), "<strong>" . wp_specialchars($user_login) . "</strong>") ?><br />
 	<?php printf(__('Password: %s'), '<strong>' . __('emailed to you') . '</strong>') ?> <br />
Index: wp-rss2.php
===================================================================
--- wp-rss2.php	(revision 3978)
+++ wp-rss2.php	(working copy)
@@ -12,7 +12,7 @@
 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
 
 <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
-<rss version="2.0" 
+<rss version="2.0"
 	xmlns:content="http://purl.org/rss/1.0/modules/content/"
 	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
 	xmlns:dc="http://purl.org/dc/elements/1.1/"
Index: wp-settings.php
===================================================================
--- wp-settings.php	(revision 3978)
+++ wp-settings.php	(working copy)
@@ -11,12 +11,12 @@
 	$noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
 
 	$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
-	foreach ( $input as $k => $v ) 
+	foreach ( $input as $k => $v )
 		if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) )
 			unset($GLOBALS[$k]);
 }
 
-unregister_GLOBALS(); 
+unregister_GLOBALS();
 
 unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );
 
@@ -140,9 +140,9 @@
 require (ABSPATH . WPINC . '/script-loader.php');
 
 if (!strstr($_SERVER['PHP_SELF'], 'install.php')) :
-    // Used to guarantee unique hash cookies
-    $cookiehash = md5(get_settings('siteurl')); // Remove in 1.4
-	define('COOKIEHASH', $cookiehash); 
+	// Used to guarantee unique hash cookies
+	$cookiehash = md5(get_settings('siteurl')); // Remove in 1.4
+	define('COOKIEHASH', $cookiehash);
 endif;
 
 if ( !defined('USER_COOKIE') )
Index: wp-trackback.php
===================================================================
--- wp-trackback.php	(revision 3978)
+++ wp-trackback.php	(working copy)
@@ -47,8 +47,8 @@
 	$blog_name = mb_convert_encoding($blog_name, get_settings('blog_charset'), $charset);
 }
 
-if ( is_single() || is_page() ) 
-    $tb_id = $posts[0]->ID;
+if ( is_single() || is_page() )
+	$tb_id = $posts[0]->ID;
 
 if ( !intval( $tb_id ) )
 	trackback_response(1, 'I really need an ID for this to work.');
Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(revision 3978)
+++ xmlrpc.php	(working copy)
@@ -11,22 +11,22 @@
 
 include('./wp-config.php');
 
-if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd 
+if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
 header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
 
 ?>
 <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
 <rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
-  <service>
-    <engineName>WordPress</engineName>
-    <engineLink>http://wordpress.org/</engineLink>
-    <homePageLink><?php bloginfo_rss('url') ?></homePageLink>
-    <apis>
-      <api name="Movable Type" blogID="1" preferred="true" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
-      <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
-      <api name="Blogger" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
-    </apis>
-  </service>
+	<service>
+		<engineName>WordPress</engineName>
+		<engineLink>http://wordpress.org/</engineLink>
+		<homePageLink><?php bloginfo_rss('url') ?></homePageLink>
+		<apis>
+			<api name="Movable Type" blogID="1" preferred="true" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
+			<api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
+			<api name="Blogger" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
+		</apis>
+	</service>
 </rsd>
 <?php
 exit;
@@ -62,23 +62,23 @@
 
 
 function mkdir_p($target) {
-	// from php.net/mkdir user contributed notes 
+	// from php.net/mkdir user contributed notes
 	if (file_exists($target)) {
-	  if (!is_dir($target)) {
-	    return false;
-	  } else {
-	    return true;
-	  }
+		if (!is_dir($target)) {
+			return false;
+		} else {
+			return true;
+		}
 	}
 
 	// Attempting to create the directory may clutter up our display.
 	if (@mkdir($target)) {
-	  return true;
+		return true;
 	}
 
 	// If the above failed, attempt to create the parent node, then try again.
 	if (mkdir_p(dirname($target))) {
-	  return mkdir_p($target);
+		return mkdir_p($target);
 	}
 
 	return false;
@@ -89,48 +89,48 @@
 
 	function wp_xmlrpc_server() {
 		$this->methods = array(
-		  // Blogger API
-		  'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs',
-		  'blogger.getUserInfo' => 'this:blogger_getUserInfo',
-		  'blogger.getPost' => 'this:blogger_getPost',
-		  'blogger.getRecentPosts' => 'this:blogger_getRecentPosts',
-		  'blogger.getTemplate' => 'this:blogger_getTemplate',
-		  'blogger.setTemplate' => 'this:blogger_setTemplate',
-		  'blogger.newPost' => 'this:blogger_newPost',
-		  'blogger.editPost' => 'this:blogger_editPost',
-		  'blogger.deletePost' => 'this:blogger_deletePost',
+			// Blogger API
+			'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs',
+			'blogger.getUserInfo' => 'this:blogger_getUserInfo',
+			'blogger.getPost' => 'this:blogger_getPost',
+			'blogger.getRecentPosts' => 'this:blogger_getRecentPosts',
+			'blogger.getTemplate' => 'this:blogger_getTemplate',
+			'blogger.setTemplate' => 'this:blogger_setTemplate',
+			'blogger.newPost' => 'this:blogger_newPost',
+			'blogger.editPost' => 'this:blogger_editPost',
+			'blogger.deletePost' => 'this:blogger_deletePost',
 
-		  // MetaWeblog API (with MT extensions to structs)
-		  'metaWeblog.newPost' => 'this:mw_newPost',
-		  'metaWeblog.editPost' => 'this:mw_editPost',
-		  'metaWeblog.getPost' => 'this:mw_getPost',
-		  'metaWeblog.getRecentPosts' => 'this:mw_getRecentPosts',
-		  'metaWeblog.getCategories' => 'this:mw_getCategories',
-		  'metaWeblog.newMediaObject' => 'this:mw_newMediaObject',
+			// MetaWeblog API (with MT extensions to structs)
+			'metaWeblog.newPost' => 'this:mw_newPost',
+			'metaWeblog.editPost' => 'this:mw_editPost',
+			'metaWeblog.getPost' => 'this:mw_getPost',
+			'metaWeblog.getRecentPosts' => 'this:mw_getRecentPosts',
+			'metaWeblog.getCategories' => 'this:mw_getCategories',
+			'metaWeblog.newMediaObject' => 'this:mw_newMediaObject',
 
-		  // MetaWeblog API aliases for Blogger API
-		  // see http://www.xmlrpc.com/stories/storyReader$2460
-		  'metaWeblog.deletePost' => 'this:blogger_deletePost',
-		  'metaWeblog.getTemplate' => 'this:blogger_getTemplate',
-		  'metaWeblog.setTemplate' => 'this:blogger_setTemplate',
-		  'metaWeblog.getUsersBlogs' => 'this:blogger_getUsersBlogs',
+			// MetaWeblog API aliases for Blogger API
+			// see http://www.xmlrpc.com/stories/storyReader$2460
+			'metaWeblog.deletePost' => 'this:blogger_deletePost',
+			'metaWeblog.getTemplate' => 'this:blogger_getTemplate',
+			'metaWeblog.setTemplate' => 'this:blogger_setTemplate',
+			'metaWeblog.getUsersBlogs' => 'this:blogger_getUsersBlogs',
 
-		  // MovableType API
-		  'mt.getCategoryList' => 'this:mt_getCategoryList',
-		  'mt.getRecentPostTitles' => 'this:mt_getRecentPostTitles',
-		  'mt.getPostCategories' => 'this:mt_getPostCategories',
-		  'mt.setPostCategories' => 'this:mt_setPostCategories',
-		  'mt.supportedMethods' => 'this:mt_supportedMethods',
-		  'mt.supportedTextFilters' => 'this:mt_supportedTextFilters',
-		  'mt.getTrackbackPings' => 'this:mt_getTrackbackPings',
-		  'mt.publishPost' => 'this:mt_publishPost',
+			// MovableType API
+			'mt.getCategoryList' => 'this:mt_getCategoryList',
+			'mt.getRecentPostTitles' => 'this:mt_getRecentPostTitles',
+			'mt.getPostCategories' => 'this:mt_getPostCategories',
+			'mt.setPostCategories' => 'this:mt_setPostCategories',
+			'mt.supportedMethods' => 'this:mt_supportedMethods',
+			'mt.supportedTextFilters' => 'this:mt_supportedTextFilters',
+			'mt.getTrackbackPings' => 'this:mt_getTrackbackPings',
+			'mt.publishPost' => 'this:mt_publishPost',
 
-		  // PingBack
-		  'pingback.ping' => 'this:pingback_ping',
-		  'pingback.extensions.getPingbacks' => 'this:pingback_extensions_getPingbacks',
+			// PingBack
+			'pingback.ping' => 'this:pingback_ping',
+			'pingback.extensions.getPingbacks' => 'this:pingback_extensions_getPingbacks',
 
-		  'demo.sayHello' => 'this:sayHello',
-		  'demo.addTwoNumbers' => 'this:addTwoNumbers'
+			'demo.sayHello' => 'this:sayHello',
+			'demo.addTwoNumbers' => 'this:addTwoNumbers'
 		);
 		$this->methods = apply_filters('xmlrpc_methods', $this->methods);
 		$this->IXR_Server($this->methods);
@@ -147,11 +147,11 @@
 	}
 
 	function login_pass_ok($user_login, $user_pass) {
-	  if (!user_pass_ok($user_login, $user_pass)) {
-	    $this->error = new IXR_Error(403, 'Bad login/pass combination.');
-	    return false;
-	  }
-	  return true;
+		if (!user_pass_ok($user_login, $user_pass)) {
+			$this->error = new IXR_Error(403, 'Bad login/pass combination.');
+			return false;
+		}
+		return true;
 	}
 
 	function escape(&$array) {
@@ -178,24 +178,24 @@
 
 		$this->escape($args);
 
-	  $user_login = $args[1];
-	  $user_pass  = $args[2];
+		$user_login = $args[1];
+		$user_pass  = $args[2];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  set_current_user(0, $user_login);
-	  $is_admin = current_user_can('level_8');
+		set_current_user(0, $user_login);
+		$is_admin = current_user_can('level_8');
 
-	  $struct = array(
-	    'isAdmin'  => $is_admin,
-	    'url'      => get_settings('home') . '/',
-	    'blogid'   => '1',
-	    'blogName' => get_settings('blogname')
-	  );
+		$struct = array(
+			'isAdmin'  => $is_admin,
+			'url'      => get_settings('home') . '/',
+			'blogid'   => '1',
+			'blogName' => get_settings('blogname')
+		);
 
-	  return array($struct);
+		return array($struct);
 	}
 
 
@@ -204,25 +204,25 @@
 
 		$this->escape($args);
 
-	  $user_login = $args[1];
-	  $user_pass  = $args[2];
+		$user_login = $args[1];
+		$user_pass  = $args[2];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $user_data = get_userdatabylogin($user_login);
+		$user_data = get_userdatabylogin($user_login);
 
-	  $struct = array(
-	    'nickname'  => $user_data->nickname,
-	    'userid'    => $user_data->ID,
-	    'url'       => $user_data->user_url,
-	    'email'     => $user_data->user_email,
-	    'lastname'  => $user_data->last_name,
-	    'firstname' => $user_data->first_name
-	  );
+		$struct = array(
+			'nickname'  => $user_data->nickname,
+			'userid'    => $user_data->ID,
+			'url'       => $user_data->user_url,
+			'email'     => $user_data->user_email,
+			'lastname'  => $user_data->last_name,
+			'firstname' => $user_data->first_name
+		);
 
-	  return $struct;
+		return $struct;
 	}
 
 
@@ -231,81 +231,81 @@
 
 		$this->escape($args);
 
-	  $post_ID    = $args[1];
-	  $user_login = $args[2];
-	  $user_pass  = $args[3];
+		$post_ID    = $args[1];
+		$user_login = $args[2];
+		$user_pass  = $args[3];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $user_data = get_userdatabylogin($user_login);
-	  $post_data = wp_get_single_post($post_ID, ARRAY_A);
+		$user_data = get_userdatabylogin($user_login);
+		$post_data = wp_get_single_post($post_ID, ARRAY_A);
 
-	  $categories = implode(',', wp_get_post_categories($post_ID));
+		$categories = implode(',', wp_get_post_categories($post_ID));
 
-	  $content  = '<title>'.stripslashes($post_data['post_title']).'</title>';
-	  $content .= '<category>'.$categories.'</category>';
-	  $content .= stripslashes($post_data['post_content']);
+		$content  = '<title>'.stripslashes($post_data['post_title']).'</title>';
+		$content .= '<category>'.$categories.'</category>';
+		$content .= stripslashes($post_data['post_content']);
 
-	  $struct = array(
-	    'userid'    => $post_data['post_author'],
-	    'dateCreated' => new IXR_Date(mysql2date('Ymd\TH:i:s', $post_data['post_date'])),
-	    'content'     => $content,
-	    'postid'  => $post_data['ID']
-	  );
+		$struct = array(
+			'userid'    => $post_data['post_author'],
+			'dateCreated' => new IXR_Date(mysql2date('Ymd\TH:i:s', $post_data['post_date'])),
+			'content'     => $content,
+			'postid'  => $post_data['ID']
+		);
 
-	  return $struct;
+		return $struct;
 	}
 
 
 	/* blogger.getRecentPosts ...gets recent posts */
 	function blogger_getRecentPosts($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
 		$this->escape($args);
 
-	  $blog_ID    = $args[1]; /* though we don't use it yet */
-	  $user_login = $args[2];
-	  $user_pass  = $args[3];
-	  $num_posts  = $args[4];
+		$blog_ID    = $args[1]; /* though we don't use it yet */
+		$user_login = $args[2];
+		$user_pass  = $args[3];
+		$num_posts  = $args[4];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $posts_list = wp_get_recent_posts($num_posts);
+		$posts_list = wp_get_recent_posts($num_posts);
 
-	  if (!$posts_list) {
-	    $this->error = new IXR_Error(500, 'Either there are no posts, or something went wrong.');
-	    return $this->error;
-	  }
+		if (!$posts_list) {
+			$this->error = new IXR_Error(500, 'Either there are no posts, or something went wrong.');
+			return $this->error;
+		}
 
-	  foreach ($posts_list as $entry) {
-	  
-	    $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
-	    $categories = implode(',', wp_get_post_categories($entry['ID']));
+		foreach ($posts_list as $entry) {
 
-	    $content  = '<title>'.stripslashes($entry['post_title']).'</title>';
-	    $content .= '<category>'.$categories.'</category>';
-	    $content .= stripslashes($entry['post_content']);
+			$post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
+			$categories = implode(',', wp_get_post_categories($entry['ID']));
 
-	    $struct[] = array(
-	      'userid' => $entry['post_author'],
-	      'dateCreated' => new IXR_Date($post_date),
-	      'content' => $content,
-	      'postid' => $entry['ID'],
-	    );
+			$content  = '<title>'.stripslashes($entry['post_title']).'</title>';
+			$content .= '<category>'.$categories.'</category>';
+			$content .= stripslashes($entry['post_content']);
 
-	  }
+			$struct[] = array(
+				'userid' => $entry['post_author'],
+				'dateCreated' => new IXR_Date($post_date),
+				'content' => $content,
+				'postid' => $entry['ID'],
+			);
 
-	  $recent_posts = array();
-	  for ($j=0; $j<count($struct); $j++) {
-	    array_push($recent_posts, $struct[$j]);
-	  }
+		}
 
-	  return $recent_posts;
+		$recent_posts = array();
+		for ($j=0; $j<count($struct); $j++) {
+			array_push($recent_posts, $struct[$j]);
+		}
+
+		return $recent_posts;
 	}
 
 
@@ -314,32 +314,32 @@
 
 		$this->escape($args);
 
-	  $blog_ID    = $args[1];
-	  $user_login = $args[2];
-	  $user_pass  = $args[3];
-	  $template   = $args[4]; /* could be 'main' or 'archiveIndex', but we don't use it */
+		$blog_ID    = $args[1];
+		$user_login = $args[2];
+		$user_pass  = $args[3];
+		$template   = $args[4]; /* could be 'main' or 'archiveIndex', but we don't use it */
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  set_current_user(0, $user_login);
-	  if ( !current_user_can('edit_themes') ) {
-	    return new IXR_Error(401, 'Sorry, this user can not edit the template.');
-	  }
+		set_current_user(0, $user_login);
+		if ( !current_user_can('edit_themes') ) {
+			return new IXR_Error(401, 'Sorry, this user can not edit the template.');
+		}
 
-	  /* warning: here we make the assumption that the weblog's URI is on the same server */
-	  $filename = get_settings('home') . '/';
-	  $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
+		/* warning: here we make the assumption that the weblog's URI is on the same server */
+		$filename = get_settings('home') . '/';
+		$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
 
-	  $f = fopen($filename, 'r');
-	  $content = fread($f, filesize($filename));
-	  fclose($f);
+		$f = fopen($filename, 'r');
+		$content = fread($f, filesize($filename));
+		fclose($f);
 
-	  /* so it is actually editable with a windows/mac client */
-	  // FIXME: (or delete me) do we really want to cater to bad clients at the expense of good ones by BEEPing up their line breaks? commented.     $content = str_replace("\n", "\r\n", $content); 
+		/* so it is actually editable with a windows/mac client */
+		// FIXME: (or delete me) do we really want to cater to bad clients at the expense of good ones by BEEPing up their line breaks? commented.     $content = str_replace("\n", "\r\n", $content);
 
-	  return $content;
+		return $content;
 	}
 
 
@@ -348,163 +348,163 @@
 
 		$this->escape($args);
 
-	  $blog_ID    = $args[1];
-	  $user_login = $args[2];
-	  $user_pass  = $args[3];
-	  $content    = $args[4];
-	  $template   = $args[5]; /* could be 'main' or 'archiveIndex', but we don't use it */
+		$blog_ID    = $args[1];
+		$user_login = $args[2];
+		$user_pass  = $args[3];
+		$content    = $args[4];
+		$template   = $args[5]; /* could be 'main' or 'archiveIndex', but we don't use it */
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  set_current_user(0, $user_login);
-	  if ( !current_user_can('edit_themes') ) {
-	    return new IXR_Error(401, 'Sorry, this user can not edit the template.');
-	  }
+		set_current_user(0, $user_login);
+		if ( !current_user_can('edit_themes') ) {
+			return new IXR_Error(401, 'Sorry, this user can not edit the template.');
+		}
 
-	  /* warning: here we make the assumption that the weblog's URI is on the same server */
-	  $filename = get_settings('home') . '/';
-	  $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
+		/* warning: here we make the assumption that the weblog's URI is on the same server */
+		$filename = get_settings('home') . '/';
+		$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
 
-	  if ($f = fopen($filename, 'w+')) {
-	    fwrite($f, $content);
-	    fclose($f);
-	  } else {
-	    return new IXR_Error(500, 'Either the file is not writable, or something wrong happened. The file has not been updated.');
-	  }
+		if ($f = fopen($filename, 'w+')) {
+			fwrite($f, $content);
+			fclose($f);
+		} else {
+			return new IXR_Error(500, 'Either the file is not writable, or something wrong happened. The file has not been updated.');
+		}
 
-	  return true;
+		return true;
 	}
 
 
 	/* blogger.newPost ...creates a new post */
 	function blogger_newPost($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
 		$this->escape($args);
 
-	  $blog_ID    = $args[1]; /* though we don't use it yet */
-	  $user_login = $args[2];
-	  $user_pass  = $args[3];
-	  $content    = $args[4];
-	  $publish    = $args[5];
+		$blog_ID    = $args[1]; /* though we don't use it yet */
+		$user_login = $args[2];
+		$user_pass  = $args[3];
+		$content    = $args[4];
+		$publish    = $args[5];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
-	  
-	  $cap = ($publish) ? 'publish_posts' : 'edit_posts';
-	  $user = set_current_user(0, $user_login);
-	  if ( !current_user_can($cap) )
-	    return new IXR_Error(401, 'Sorry, you can not post on this weblog or category.');
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $post_status = ($publish) ? 'publish' : 'draft';
+		$cap = ($publish) ? 'publish_posts' : 'edit_posts';
+		$user = set_current_user(0, $user_login);
+		if ( !current_user_can($cap) )
+			return new IXR_Error(401, 'Sorry, you can not post on this weblog or category.');
 
-	  $post_author = $user->ID;
+		$post_status = ($publish) ? 'publish' : 'draft';
 
-	  $post_title = xmlrpc_getposttitle($content);
-	  $post_category = xmlrpc_getpostcategory($content);
-	  $post_content = xmlrpc_removepostdata($content);
+		$post_author = $user->ID;
 
-	  $post_date = current_time('mysql');
-	  $post_date_gmt = current_time('mysql', 1);
+		$post_title = xmlrpc_getposttitle($content);
+		$post_category = xmlrpc_getpostcategory($content);
+		$post_content = xmlrpc_removepostdata($content);
 
-	  $post_data = compact('blog_ID', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status');
+		$post_date = current_time('mysql');
+		$post_date_gmt = current_time('mysql', 1);
 
-	  $post_ID = wp_insert_post($post_data);
+		$post_data = compact('blog_ID', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status');
 
-	  if (!$post_ID) {
-	    return new IXR_Error(500, 'Sorry, your entry could not be posted. Something wrong happened.');
-	  }
+		$post_ID = wp_insert_post($post_data);
 
-	  logIO('O', "Posted ! ID: $post_ID");
+		if (!$post_ID) {
+			return new IXR_Error(500, 'Sorry, your entry could not be posted. Something wrong happened.');
+		}
 
-	  return $post_ID;
+		logIO('O', "Posted ! ID: $post_ID");
+
+		return $post_ID;
 	}
 
 
 	/* blogger.editPost ...edits a post */
 	function blogger_editPost($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
 		$this->escape($args);
 
-	  $post_ID     = $args[1];
-	  $user_login  = $args[2];
-	  $user_pass   = $args[3];
-	  $content     = $args[4];
-	  $publish     = $args[5];
+		$post_ID     = $args[1];
+		$user_login  = $args[2];
+		$user_pass   = $args[3];
+		$content     = $args[4];
+		$publish     = $args[5];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $actual_post = wp_get_single_post($post_ID,ARRAY_A);
+		$actual_post = wp_get_single_post($post_ID,ARRAY_A);
 
-	  if (!$actual_post) {
-	  	return new IXR_Error(404, 'Sorry, no such post.');
-	  }
+		if (!$actual_post) {
+			return new IXR_Error(404, 'Sorry, no such post.');
+		}
 
 		$this->escape($actual_post);
 
-	  set_current_user(0, $user_login);
-	  if ( !current_user_can('edit_post', $post_ID) )
-	    return new IXR_Error(401, 'Sorry, you do not have the right to edit this post.');
+		set_current_user(0, $user_login);
+		if ( !current_user_can('edit_post', $post_ID) )
+			return new IXR_Error(401, 'Sorry, you do not have the right to edit this post.');
 
-	  extract($actual_post);
+		extract($actual_post);
 
-	  $post_title = xmlrpc_getposttitle($content);
-	  $post_category = xmlrpc_getpostcategory($content);
-	  $post_content = xmlrpc_removepostdata($content);
+		$post_title = xmlrpc_getposttitle($content);
+		$post_category = xmlrpc_getpostcategory($content);
+		$post_content = xmlrpc_removepostdata($content);
 
-	  $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt');
+		$postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt');
 
-	  $result = wp_update_post($postdata);
+		$result = wp_update_post($postdata);
 
-	  if (!$result) {
-	  	return new IXR_Error(500, 'For some strange yet very annoying reason, this post could not be edited.');
-	  }
+		if (!$result) {
+			return new IXR_Error(500, 'For some strange yet very annoying reason, this post could not be edited.');
+		}
 
-	  return true;
+		return true;
 	}
 
 
 	/* blogger.deletePost ...deletes a post */
 	function blogger_deletePost($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
 		$this->escape($args);
 
-	  $post_ID     = $args[1];
-	  $user_login  = $args[2];
-	  $user_pass   = $args[3];
-	  $publish     = $args[4];
+		$post_ID     = $args[1];
+		$user_login  = $args[2];
+		$user_pass   = $args[3];
+		$publish     = $args[4];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $actual_post = wp_get_single_post($post_ID,ARRAY_A);
+		$actual_post = wp_get_single_post($post_ID,ARRAY_A);
 
-	  if (!$actual_post) {
-	  	return new IXR_Error(404, 'Sorry, no such post.');
-	  }
+		if (!$actual_post) {
+			return new IXR_Error(404, 'Sorry, no such post.');
+		}
 
-	  set_current_user(0, $user_login);
-	  if ( !current_user_can('edit_post', $post_ID) )
-	    return new IXR_Error(401, 'Sorry, you do not have the right to delete this post.');
+		set_current_user(0, $user_login);
+		if ( !current_user_can('edit_post', $post_ID) )
+			return new IXR_Error(401, 'Sorry, you do not have the right to delete this post.');
 
-	  $result = wp_delete_post($post_ID);
+		$result = wp_delete_post($post_ID);
 
-	  if (!$result) {
-	  	return new IXR_Error(500, 'For some strange yet very annoying reason, this post could not be deleted.');
-	  }
+		if (!$result) {
+			return new IXR_Error(500, 'For some strange yet very annoying reason, this post could not be deleted.');
+		}
 
-	  return true;
+		return true;
 	}
 
 
@@ -516,217 +516,217 @@
 	/* metaweblog.newPost creates a post */
 	function mw_newPost($args) {
 
-	  global $wpdb, $post_default_category;
+		global $wpdb, $post_default_category;
 
 		$this->escape($args);
 
-	  $blog_ID     = $args[0]; // we will support this in the near future
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
-	  $content_struct = $args[3];
-	  $publish     = $args[4];
+		$blog_ID     = $args[0]; // we will support this in the near future
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
+		$content_struct = $args[3];
+		$publish     = $args[4];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $user = set_current_user(0, $user_login);
-	  if ( !current_user_can('publish_posts') )
-	    return new IXR_Error(401, 'Sorry, you can not post on this weblog or category.');
+		$user = set_current_user(0, $user_login);
+		if ( !current_user_can('publish_posts') )
+			return new IXR_Error(401, 'Sorry, you can not post on this weblog or category.');
 
-	  $post_author = $user->ID;
+		$post_author = $user->ID;
 
-	  $post_title = $content_struct['title'];
-	  $post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
-	  $post_status = $publish ? 'publish' : 'draft';
+		$post_title = $content_struct['title'];
+		$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
+		$post_status = $publish ? 'publish' : 'draft';
 
-	  $post_excerpt = $content_struct['mt_excerpt'];
-	  $post_more = $content_struct['mt_text_more'];
+		$post_excerpt = $content_struct['mt_excerpt'];
+		$post_more = $content_struct['mt_text_more'];
 
-	  $comment_status = (empty($content_struct['mt_allow_comments'])) ?
-	    get_settings('default_comment_status')
-	    : $content_struct['mt_allow_comments'];
+		$comment_status = (empty($content_struct['mt_allow_comments'])) ?
+			get_settings('default_comment_status')
+			: $content_struct['mt_allow_comments'];
 
-	  $ping_status = (empty($content_struct['mt_allow_pings'])) ?
-	    get_settings('default_ping_status')
-	    : $content_struct['mt_allow_pings'];
+		$ping_status = (empty($content_struct['mt_allow_pings'])) ?
+			get_settings('default_ping_status')
+			: $content_struct['mt_allow_pings'];
 
-	  if ($post_more) {
-	    $post_content = $post_content . "\n<!--more-->\n" . $post_more;
-	  }
+		if ($post_more) {
+			$post_content = $post_content . "\n<!--more-->\n" . $post_more;
+		}
 
 		$to_ping = $content_struct['mt_tb_ping_urls'];
 
-	  // Do some timestamp voodoo
-	  $dateCreatedd = $content_struct['dateCreated'];
-	  if (!empty($dateCreatedd)) {
-	    $dateCreated = $dateCreatedd->getIso();
-	    $post_date     = get_date_from_gmt(iso8601_to_datetime($dateCreated));
-	    $post_date_gmt = iso8601_to_datetime($dateCreated, GMT);
-	  } else {
-	    $post_date     = current_time('mysql');
-	    $post_date_gmt = current_time('mysql', 1);
-	  }
+		// Do some timestamp voodoo
+		$dateCreatedd = $content_struct['dateCreated'];
+		if (!empty($dateCreatedd)) {
+			$dateCreated = $dateCreatedd->getIso();
+			$post_date     = get_date_from_gmt(iso8601_to_datetime($dateCreated));
+			$post_date_gmt = iso8601_to_datetime($dateCreated, GMT);
+		} else {
+			$post_date     = current_time('mysql');
+			$post_date_gmt = current_time('mysql', 1);
+		}
 
-	  $catnames = $content_struct['categories'];
-	  logIO('O', 'Post cats: ' . printr($catnames,true));
-	  $post_category = array();
+		$catnames = $content_struct['categories'];
+		logIO('O', 'Post cats: ' . printr($catnames,true));
+		$post_category = array();
 
-	  if (is_array($catnames)) {
-	    foreach ($catnames as $cat) {
-	      $post_category[] = get_cat_ID($cat);
-	    }
-	  }
+		if (is_array($catnames)) {
+			foreach ($catnames as $cat) {
+				$post_category[] = get_cat_ID($cat);
+			}
+		}
 
-	  // We've got all the data -- post it:
-	  $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping');
+		// We've got all the data -- post it:
+		$postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping');
 
-	  $post_ID = wp_insert_post($postdata);
+		$post_ID = wp_insert_post($postdata);
 
-	  if (!$post_ID) {
-	    return new IXR_Error(500, 'Sorry, your entry could not be posted. Something wrong happened.');
-	  }
+		if (!$post_ID) {
+			return new IXR_Error(500, 'Sorry, your entry could not be posted. Something wrong happened.');
+		}
 
-	  logIO('O', "Posted ! ID: $post_ID");
+		logIO('O', "Posted ! ID: $post_ID");
 
-	  return strval($post_ID);
+		return strval($post_ID);
 	}
 
 
 	/* metaweblog.editPost ...edits a post */
 	function mw_editPost($args) {
 
-	  global $wpdb, $post_default_category;
+		global $wpdb, $post_default_category;
 
 		$this->escape($args);
 
-	  $post_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
-	  $content_struct = $args[3];
-	  $publish     = $args[4];
+		$post_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
+		$content_struct = $args[3];
+		$publish     = $args[4];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  set_current_user(0, $user_login);
-	  if ( !current_user_can('edit_post', $post_ID) )
-	    return new IXR_Error(401, 'Sorry, you can not edit this post.');
+		set_current_user(0, $user_login);
+		if ( !current_user_can('edit_post', $post_ID) )
+			return new IXR_Error(401, 'Sorry, you can not edit this post.');
 
-	  $postdata = wp_get_single_post($post_ID, ARRAY_A);
-	  extract($postdata);
+		$postdata = wp_get_single_post($post_ID, ARRAY_A);
+		extract($postdata);
 		$this->escape($postdata);
 
-	  $post_title = $content_struct['title'];
-	  $post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
-	  $catnames = $content_struct['categories'];
+		$post_title = $content_struct['title'];
+		$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
+		$catnames = $content_struct['categories'];
 
-	  $post_category = array();
+		$post_category = array();
 
-	  if (is_array($catnames)) {
-	    foreach ($catnames as $cat) {
-	      $post_category[] = get_cat_ID($cat);
-	    }
-	  }
+		if (is_array($catnames)) {
+			foreach ($catnames as $cat) {
+				$post_category[] = get_cat_ID($cat);
+			}
+		}
 
-	  $post_excerpt = $content_struct['mt_excerpt'];
-	  $post_more = $content_struct['mt_text_more'];
-	  $post_status = $publish ? 'publish' : 'draft';
+		$post_excerpt = $content_struct['mt_excerpt'];
+		$post_more = $content_struct['mt_text_more'];
+		$post_status = $publish ? 'publish' : 'draft';
 
-	  if ($post_more) {
-	    $post_content = $post_content . "\n<!--more-->\n" . $post_more;
-	  }
+		if ($post_more) {
+			$post_content = $post_content . "\n<!--more-->\n" . $post_more;
+		}
 
 		$to_ping = $content_struct['mt_tb_ping_urls'];
 
-	  $comment_status = (empty($content_struct['mt_allow_comments'])) ?
-	    get_settings('default_comment_status')
-	    : $content_struct['mt_allow_comments'];
+		$comment_status = (empty($content_struct['mt_allow_comments'])) ?
+			get_settings('default_comment_status')
+			: $content_struct['mt_allow_comments'];
 
-	  $ping_status = (empty($content_struct['mt_allow_pings'])) ?
-	    get_settings('default_ping_status')
-	    : $content_struct['mt_allow_pings'];
+		$ping_status = (empty($content_struct['mt_allow_pings'])) ?
+			get_settings('default_ping_status')
+			: $content_struct['mt_allow_pings'];
 
-	  // Do some timestamp voodoo
-	  $dateCreatedd = $content_struct['dateCreated'];
-	  if (!empty($dateCreatedd)) {
-	    $dateCreated = $dateCreatedd->getIso();
-	    $post_date     = get_date_from_gmt(iso8601_to_datetime($dateCreated));
-	    $post_date_gmt = iso8601_to_datetime($dateCreated, GMT);
-	  } else {
-	    $post_date     = $postdata['post_date'];
-	    $post_date_gmt = $postdata['post_date_gmt'];
-	  }
+		// Do some timestamp voodoo
+		$dateCreatedd = $content_struct['dateCreated'];
+		if (!empty($dateCreatedd)) {
+			$dateCreated = $dateCreatedd->getIso();
+			$post_date     = get_date_from_gmt(iso8601_to_datetime($dateCreated));
+			$post_date_gmt = iso8601_to_datetime($dateCreated, GMT);
+		} else {
+			$post_date     = $postdata['post_date'];
+			$post_date_gmt = $postdata['post_date_gmt'];
+		}
 
-	  // We've got all the data -- post it:
-	  $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping');
+		// We've got all the data -- post it:
+		$newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping');
 
-	  $result = wp_update_post($newpost);
-	  if (!$result) {
-	    return new IXR_Error(500, 'Sorry, your entry could not be edited. Something wrong happened.');
-	  }
+		$result = wp_update_post($newpost);
+		if (!$result) {
+			return new IXR_Error(500, 'Sorry, your entry could not be edited. Something wrong happened.');
+		}
 
-	  logIO('O',"(MW) Edited ! ID: $post_ID");
+		logIO('O',"(MW) Edited ! ID: $post_ID");
 
-	  return true;
+		return true;
 	}
 
 
 	/* metaweblog.getPost ...returns a post */
 	function mw_getPost($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
 		$this->escape($args);
 
-	  $post_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
+		$post_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $postdata = wp_get_single_post($post_ID, ARRAY_A);
+		$postdata = wp_get_single_post($post_ID, ARRAY_A);
 
-	  if ($postdata['post_date'] != '') {
+		if ($postdata['post_date'] != '') {
 
-	    $post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date']);
+			$post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date']);
 
-	    $categories = array();
-	    $catids = wp_get_post_categories($post_ID);
-	    foreach($catids as $catid) {
-	      $categories[] = get_cat_name($catid);
-	    }
+			$categories = array();
+			$catids = wp_get_post_categories($post_ID);
+			foreach($catids as $catid) {
+				$categories[] = get_cat_name($catid);
+			}
 
-	    $post = get_extended($postdata['post_content']);
-	    $link = post_permalink($postdata['ID']);
+			$post = get_extended($postdata['post_content']);
+			$link = post_permalink($postdata['ID']);
 
-	    $allow_comments = ('open' == $postdata['comment_status']) ? 1 : 0;
-	    $allow_pings = ('open' == $postdata['ping_status']) ? 1 : 0;
+			$allow_comments = ('open' == $postdata['comment_status']) ? 1 : 0;
+			$allow_pings = ('open' == $postdata['ping_status']) ? 1 : 0;
 
-	    $resp = array(
-	      'dateCreated' => new IXR_Date($post_date),
-	      'userid' => $postdata['post_author'],
-	      'postid' => $postdata['ID'],
-	      'description' => $post['main'],
-	      'title' => $postdata['post_title'],
-	      'link' => $link,
-	      'permaLink' => $link,
+			$resp = array(
+				'dateCreated' => new IXR_Date($post_date),
+				'userid' => $postdata['post_author'],
+				'postid' => $postdata['ID'],
+				'description' => $post['main'],
+				'title' => $postdata['post_title'],
+				'link' => $link,
+				'permaLink' => $link,
 // commented out because no other tool seems to use this
 //	      'content' => $entry['post_content'],
-	      'categories' => $categories,
-	      'mt_excerpt' => $postdata['post_excerpt'],
-	      'mt_text_more' => $post['extended'],
-	      'mt_allow_comments' => $allow_comments,
-	      'mt_allow_pings' => $allow_pings
-	    );
+				'categories' => $categories,
+				'mt_excerpt' => $postdata['post_excerpt'],
+				'mt_text_more' => $post['extended'],
+				'mt_allow_comments' => $allow_comments,
+				'mt_allow_pings' => $allow_pings
+			);
 
-	    return $resp;
-	  } else {
-	  	return new IXR_Error(404, 'Sorry, no such post.');
-	  }
+			return $resp;
+		} else {
+			return new IXR_Error(404, 'Sorry, no such post.');
+		}
 	}
 
 
@@ -735,96 +735,96 @@
 
 		$this->escape($args);
 
-	  $blog_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
-	  $num_posts   = $args[3];
+		$blog_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
+		$num_posts   = $args[3];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $posts_list = wp_get_recent_posts($num_posts);
+		$posts_list = wp_get_recent_posts($num_posts);
 
-	  if (!$posts_list) {
-	    $this->error = new IXR_Error(500, 'Either there are no posts, or something went wrong.');
-	    return $this->error;
-	  }
+		if (!$posts_list) {
+			$this->error = new IXR_Error(500, 'Either there are no posts, or something went wrong.');
+			return $this->error;
+		}
 
-	  foreach ($posts_list as $entry) {
-	  
-	    $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
-	    $categories = array();
-	    $catids = wp_get_post_categories($entry['ID']);
-	    foreach($catids as $catid) {
-	      $categories[] = get_cat_name($catid);
-	    }
+		foreach ($posts_list as $entry) {
 
-	    $post = get_extended($entry['post_content']);
-	    $link = post_permalink($entry['ID']);
+			$post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
+			$categories = array();
+			$catids = wp_get_post_categories($entry['ID']);
+			foreach($catids as $catid) {
+				$categories[] = get_cat_name($catid);
+			}
 
-	    $allow_comments = ('open' == $entry['comment_status']) ? 1 : 0;
-	    $allow_pings = ('open' == $entry['ping_status']) ? 1 : 0;
+			$post = get_extended($entry['post_content']);
+			$link = post_permalink($entry['ID']);
 
-	    $struct[] = array(
-	      'dateCreated' => new IXR_Date($post_date),
-	      'userid' => $entry['post_author'],
-	      'postid' => $entry['ID'],
-	      'description' => $post['main'],
-	      'title' => $entry['post_title'],
-	      'link' => $link,
-	      'permaLink' => $link,
+			$allow_comments = ('open' == $entry['comment_status']) ? 1 : 0;
+			$allow_pings = ('open' == $entry['ping_status']) ? 1 : 0;
+
+			$struct[] = array(
+				'dateCreated' => new IXR_Date($post_date),
+				'userid' => $entry['post_author'],
+				'postid' => $entry['ID'],
+				'description' => $post['main'],
+				'title' => $entry['post_title'],
+				'link' => $link,
+				'permaLink' => $link,
 // commented out because no other tool seems to use this
 //	      'content' => $entry['post_content'],
-	      'categories' => $categories,
-	      'mt_excerpt' => $entry['post_excerpt'],
-	      'mt_text_more' => $post['extended'],
-	      'mt_allow_comments' => $allow_comments,
-	      'mt_allow_pings' => $allow_pings
-	    );
+				'categories' => $categories,
+				'mt_excerpt' => $entry['post_excerpt'],
+				'mt_text_more' => $post['extended'],
+				'mt_allow_comments' => $allow_comments,
+				'mt_allow_pings' => $allow_pings
+			);
 
-	  }
+		}
 
-	  $recent_posts = array();
-	  for ($j=0; $j<count($struct); $j++) {
-	    array_push($recent_posts, $struct[$j]);
-	  }
-	  
-	  return $recent_posts;
+		$recent_posts = array();
+		for ($j=0; $j<count($struct); $j++) {
+			array_push($recent_posts, $struct[$j]);
+		}
+
+		return $recent_posts;
 	}
 
 
 	/* metaweblog.getCategories ...returns the list of categories on a given weblog */
 	function mw_getCategories($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
 		$this->escape($args);
 
-	  $blog_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
+		$blog_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $categories_struct = array();
+		$categories_struct = array();
 
-	  // FIXME: can we avoid using direct SQL there?
-	  if ($cats = $wpdb->get_results("SELECT cat_ID,cat_name FROM $wpdb->categories", ARRAY_A)) {
-	    foreach ($cats as $cat) {
-	      $struct['categoryId'] = $cat['cat_ID'];
-	      $struct['description'] = $cat['cat_name'];
-	      $struct['categoryName'] = $cat['cat_name'];
-	      $struct['htmlUrl'] = wp_specialchars(get_category_link($cat['cat_ID']));
-	      $struct['rssUrl'] = wp_specialchars(get_category_rss_link(false, $cat['cat_ID'], $cat['cat_name']));
+		// FIXME: can we avoid using direct SQL there?
+		if ($cats = $wpdb->get_results("SELECT cat_ID,cat_name FROM $wpdb->categories", ARRAY_A)) {
+			foreach ($cats as $cat) {
+				$struct['categoryId'] = $cat['cat_ID'];
+				$struct['description'] = $cat['cat_name'];
+				$struct['categoryName'] = $cat['cat_name'];
+				$struct['htmlUrl'] = wp_specialchars(get_category_link($cat['cat_ID']));
+				$struct['rssUrl'] = wp_specialchars(get_category_rss_link(false, $cat['cat_ID'], $cat['cat_name']));
 
-	      $categories_struct[] = $struct;
-	    }
-	  }
+				$categories_struct[] = $struct;
+			}
+		}
 
-	  return $categories_struct;
+		return $categories_struct;
 	}
 
 
@@ -875,72 +875,72 @@
 
 		$this->escape($args);
 
-	  $blog_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
-	  $num_posts   = $args[3];
+		$blog_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
+		$num_posts   = $args[3];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $posts_list = wp_get_recent_posts($num_posts);
+		$posts_list = wp_get_recent_posts($num_posts);
 
-	  if (!$posts_list) {
-	    $this->error = new IXR_Error(500, 'Either there are no posts, or something went wrong.');
-	    return $this->error;
-	  }
+		if (!$posts_list) {
+			$this->error = new IXR_Error(500, 'Either there are no posts, or something went wrong.');
+			return $this->error;
+		}
 
-	  foreach ($posts_list as $entry) {
-	  
-	    $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
+		foreach ($posts_list as $entry) {
 
-	    $struct[] = array(
-	      'dateCreated' => new IXR_Date($post_date),
-	      'userid' => $entry['post_author'],
-	      'postid' => $entry['ID'],
-	      'title' => $entry['post_title'],
-	    );
+			$post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
 
-	  }
+			$struct[] = array(
+				'dateCreated' => new IXR_Date($post_date),
+				'userid' => $entry['post_author'],
+				'postid' => $entry['ID'],
+				'title' => $entry['post_title'],
+			);
 
-	  $recent_posts = array();
-	  for ($j=0; $j<count($struct); $j++) {
-	    array_push($recent_posts, $struct[$j]);
-	  }
-	  
-	  return $recent_posts;
+		}
+
+		$recent_posts = array();
+		for ($j=0; $j<count($struct); $j++) {
+			array_push($recent_posts, $struct[$j]);
+		}
+
+		return $recent_posts;
 	}
 
 
 	/* mt.getCategoryList ...returns the list of categories on a given weblog */
 	function mt_getCategoryList($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
 		$this->escape($args);
 
-	  $blog_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
+		$blog_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $categories_struct = array();
+		$categories_struct = array();
 
-	  // FIXME: can we avoid using direct SQL there?
-	  if ($cats = $wpdb->get_results("SELECT cat_ID, cat_name FROM $wpdb->categories", ARRAY_A)) {
-	    foreach ($cats as $cat) {
-	      $struct['categoryId'] = $cat['cat_ID'];
-	      $struct['categoryName'] = $cat['cat_name'];
+		// FIXME: can we avoid using direct SQL there?
+		if ($cats = $wpdb->get_results("SELECT cat_ID, cat_name FROM $wpdb->categories", ARRAY_A)) {
+			foreach ($cats as $cat) {
+				$struct['categoryId'] = $cat['cat_ID'];
+				$struct['categoryName'] = $cat['cat_name'];
 
-	      $categories_struct[] = $struct;
-	    }
-	  }
+				$categories_struct[] = $struct;
+			}
+		}
 
-	  return $categories_struct;
+		return $categories_struct;
 	}
 
 
@@ -949,28 +949,28 @@
 
 		$this->escape($args);
 
-	  $post_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
+		$post_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  $categories = array();
-	  $catids = wp_get_post_categories(intval($post_ID));
-	  // first listed category will be the primary category
-	  $isPrimary = true;
-	  foreach($catids as $catid) {
-	    $categories[] = array(
-	      'categoryName' => get_cat_name($catid),
-	      'categoryId' => $catid,
-	      'isPrimary' => $isPrimary
-	    );
-	    $isPrimary = false;
-	  }
- 
-	  return $categories;
+		$categories = array();
+		$catids = wp_get_post_categories(intval($post_ID));
+		// first listed category will be the primary category
+		$isPrimary = true;
+		foreach($catids as $catid) {
+			$categories[] = array(
+				'categoryName' => get_cat_name($catid),
+				'categoryId' => $catid,
+				'isPrimary' => $isPrimary
+			);
+			$isPrimary = false;
+		}
+
+		return $categories;
 	}
 
 
@@ -979,81 +979,81 @@
 
 		$this->escape($args);
 
-	  $post_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
-	  $categories  = $args[3];
+		$post_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
+		$categories  = $args[3];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  set_current_user(0, $user_login);
-	  if ( !current_user_can('edit_post', $post_ID) )
-	    return new IXR_Error(401, 'Sorry, you can not edit this post.');
+		set_current_user(0, $user_login);
+		if ( !current_user_can('edit_post', $post_ID) )
+			return new IXR_Error(401, 'Sorry, you can not edit this post.');
 
-	  foreach($categories as $cat) {
-	    $catids[] = $cat['categoryId'];
-	  }
+		foreach($categories as $cat) {
+			$catids[] = $cat['categoryId'];
+		}
 
-	  wp_set_post_categories($post_ID, $catids);
+		wp_set_post_categories($post_ID, $catids);
 
-	  return true;
+		return true;
 	}
 
 
 	/* mt.supportedMethods ...returns an array of methods supported by this server */
 	function mt_supportedMethods($args) {
 
-	  $supported_methods = array();
-	  foreach($this->methods as $key=>$value) {
-	    $supported_methods[] = $key;
-	  }
+		$supported_methods = array();
+		foreach($this->methods as $key=>$value) {
+			$supported_methods[] = $key;
+		}
 
-	  return $supported_methods;
+		return $supported_methods;
 	}
 
 
 	/* mt.supportedTextFilters ...returns an empty array because we don't
-	   support per-post text filters yet */
+		 support per-post text filters yet */
 	function mt_supportedTextFilters($args) {
-	  return array();
+		return array();
 	}
 
 
 	/* mt.getTrackbackPings ...returns trackbacks sent to a given post */
 	function mt_getTrackbackPings($args) {
 
-	  global $wpdb;
+		global $wpdb;
 
-	  $post_ID = intval($args);
+		$post_ID = intval($args);
 
-	  $actual_post = wp_get_single_post($post_ID, ARRAY_A);
+		$actual_post = wp_get_single_post($post_ID, ARRAY_A);
 
-	  if (!$actual_post) {
-	  	return new IXR_Error(404, 'Sorry, no such post.');
-	  }
+		if (!$actual_post) {
+			return new IXR_Error(404, 'Sorry, no such post.');
+		}
 
-	  $comments = $wpdb->get_results("SELECT comment_author_url, comment_content, comment_author_IP, comment_type FROM $wpdb->comments WHERE comment_post_ID = $post_ID");
+		$comments = $wpdb->get_results("SELECT comment_author_url, comment_content, comment_author_IP, comment_type FROM $wpdb->comments WHERE comment_post_ID = $post_ID");
 
-	  if (!$comments) {
-	  	return array();
-	  }
+		if (!$comments) {
+			return array();
+		}
 
-	  $trackback_pings = array();
-	  foreach($comments as $comment) {
-	    if ( 'trackback' == $comment->comment_type ) {
-	      $content = $comment->comment_content;
-	      $title = substr($content, 8, (strpos($content, '</strong>') - 8));
-	      $trackback_pings[] = array(
-	        'pingTitle' => $title,
-	        'pingURL'   => $comment->comment_author_url,
-	        'pingIP'    => $comment->comment_author_IP
-	      );
+		$trackback_pings = array();
+		foreach($comments as $comment) {
+			if ( 'trackback' == $comment->comment_type ) {
+				$content = $comment->comment_content;
+				$title = substr($content, 8, (strpos($content, '</strong>') - 8));
+				$trackback_pings[] = array(
+					'pingTitle' => $title,
+					'pingURL'   => $comment->comment_author_url,
+					'pingIP'    => $comment->comment_author_IP
+				);
 		}
-	  }
+		}
 
-	  return $trackback_pings;
+		return $trackback_pings;
 	}
 
 
@@ -1062,30 +1062,30 @@
 
 		$this->escape($args);
 
-	  $post_ID     = $args[0];
-	  $user_login  = $args[1];
-	  $user_pass   = $args[2];
+		$post_ID     = $args[0];
+		$user_login  = $args[1];
+		$user_pass   = $args[2];
 
-	  if (!$this->login_pass_ok($user_login, $user_pass)) {
-	    return $this->error;
-	  }
+		if (!$this->login_pass_ok($user_login, $user_pass)) {
+			return $this->error;
+		}
 
-	  set_current_user(0, $user_login);
-	  if ( !current_user_can('edit_post', $post_ID) )
-	    return new IXR_Error(401, 'Sorry, you can not edit this post.');
+		set_current_user(0, $user_login);
+		if ( !current_user_can('edit_post', $post_ID) )
+			return new IXR_Error(401, 'Sorry, you can not edit this post.');
 
-	  $postdata = wp_get_single_post($post_ID,ARRAY_A);
+		$postdata = wp_get_single_post($post_ID,ARRAY_A);
 
-	  $postdata['post_status'] = 'publish';
+		$postdata['post_status'] = 'publish';
 
-	  // retain old cats
-	  $cats = wp_get_post_categories($post_ID);
-	  $postdata['post_category'] = $cats;
+		// retain old cats
+		$cats = wp_get_post_categories($post_ID);
+		$postdata['post_category'] = $cats;
 		$this->escape($postdata);
 
-	  $result = wp_update_post($postdata);
+		$result = wp_update_post($postdata);
 
-	  return $result;
+		return $result;
 	}
 
 
@@ -1096,7 +1096,7 @@
 
 	/* pingback.ping gets a pingback and registers it */
 	function pingback_ping($args) {
-		global $wpdb, $wp_version; 
+		global $wpdb, $wp_version;
 
 		$this->escape($args);
 
@@ -1113,7 +1113,7 @@
 		// Check if the page linked to is in our site
 		$pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_settings('home')));
 		if( !$pos1 )
-	  		return new IXR_Error(0, 'Is there no link to us?');
+				return new IXR_Error(0, 'Is there no link to us?');
 
 		// let's find which post is linked to
 		// FIXME: does url_to_postid() cover all these cases already?
@@ -1147,13 +1147,13 @@
 				$sql = "SELECT ID FROM $wpdb->posts WHERE post_title RLIKE '$title'";
 				if (! ($post_ID = $wpdb->get_var($sql)) ) {
 					// returning unknown error '0' is better than die()ing
-			  		return new IXR_Error(0, '');
+					return new IXR_Error(0, '');
 				}
 				$way = 'from the fragment (title)';
 			}
 		} else {
 			// TODO: Attempt to extract a post ID from the given URL
-	  		return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+			return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
 		}
 		$post_ID = (int) $post_ID;
 
@@ -1163,20 +1163,20 @@
 		$post = get_post($post_ID);
 
 		if ( !$post ) // Post_ID not found
-	  		return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+			return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
 
 		if ( $post_ID == url_to_postid($pagelinkedfrom) )
 			return new IXR_Error(0, 'The source URI and the target URI cannot both point to the same resource.');
 
 		// Check if pings are on
 		if ( 'closed' == $post->ping_status )
-	  		return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+			return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
 
 		// Let's check that the remote site didn't already pingback this entry
 		$result = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post_ID' AND comment_author_url = '$pagelinkedfrom'");
 
 		if ( $wpdb->num_rows ) // We already have a Pingback from this URL
-	  		return new IXR_Error(48, 'The pingback has already been registered.');
+			return new IXR_Error(48, 'The pingback has already been registered.');
 
 		// very stupid, but gives time to the 'from' server to publish !
 		sleep(1);
@@ -1184,7 +1184,7 @@
 		// Let's check the remote site
 		$linea = wp_remote_fopen( $pagelinkedfrom );
 		if ( !$linea )
-	  		return new IXR_Error(16, 'The source URI does not exist.');
+			return new IXR_Error(16, 'The source URI does not exist.');
 
 		// Work around bug in strip_tags():
 		$linea = str_replace('<!DOC', '<DOC', $linea);
@@ -1244,8 +1244,8 @@
 
 
 	/* pingback.extensions.getPingbacks returns an array of URLs
-	   that pingbacked the given URL
-	   specs on http://www.aquarionics.com/misc/archives/blogite/0198.html */
+	that pingbacked the given URL
+	specs on http://www.aquarionics.com/misc/archives/blogite/0198.html */
 	function pingback_extensions_getPingbacks($args) {
 
 		global $wpdb;
@@ -1257,14 +1257,14 @@
 		$post_ID = url_to_postid($url);
 		if (!$post_ID) {
 			// We aren't sure that the resource is available and/or pingback enabled
-	  		return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+			return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
 		}
 
 		$actual_post = wp_get_single_post($post_ID, ARRAY_A);
 
 		if (!$actual_post) {
 			// No such post = resource not found
-	  		return new IXR_Error(32, 'The specified target URI does not exist.');
+			return new IXR_Error(32, 'The specified target URI does not exist.');
 		}
 
 		$comments = $wpdb->get_results("SELECT comment_author_url, comment_content, comment_author_IP, comment_type FROM $wpdb->comments WHERE comment_post_ID = $post_ID");

