--- z:\www\wpnight\wp-admin\includes\misc.php 
+++ D:\diff\misc.php 
@@ -14,8 +14,8 @@
  * @return unknown
  */
 function got_mod_rewrite() {
-	$got_rewrite = apache_mod_loaded('mod_rewrite', true);
-	return apply_filters('got_rewrite', $got_rewrite);
+	$got_rewrite = apache_mod_loaded( 'mod_rewrite', true );
+	return apply_filters( 'got_rewrite', $got_rewrite );
 }
 
 /**
@@ -34,15 +34,15 @@
 		return $result;
 	}
 
-	if ( $markerdata = explode( "\n", implode( '', file( $filename ) ) ));
+	if ( $markerdata = explode( "\n", implode( '', file( $filename ) ) ) );
 	{
 		$state = false;
 		foreach ( $markerdata as $markerline ) {
-			if (strpos($markerline, '# END ' . $marker) !== false)
+			if ( strpos( $markerline, '# END ' . $marker ) !== false )
 				$state = false;
 			if ( $state )
 				$result[] = $markerline;
-			if (strpos($markerline, '# BEGIN ' . $marker) !== false)
+			if ( strpos( $markerline, '# BEGIN ' . $marker ) !== false )
 				$state = true;
 		}
 	}
@@ -79,7 +79,7 @@
 		if ( $markerdata ) {
 			$state = true;
 			foreach ( $markerdata as $n => $markerline ) {
-				if (strpos($markerline, '# BEGIN ' . $marker) !== false)
+				if ( strpos( $markerline, '# BEGIN ' . $marker ) !== false )
 					$state = false;
 				if ( $state ) {
 					if ( $n + 1 < count( $markerdata ) )
@@ -87,9 +87,9 @@
 					else
 						fwrite( $f, "{$markerline}" );
 				}
-				if (strpos($markerline, '# END ' . $marker) !== false) {
+				if ( strpos( $markerline, '# END ' . $marker ) !== false ) {
 					fwrite( $f, "# BEGIN {$marker}\n" );
-					if ( is_array( $insertion ))
+					if ( is_array( $insertion ) )
 						foreach ( $insertion as $insertline )
 							fwrite( $f, "{$insertline}\n" );
 					fwrite( $f, "# END {$marker}\n" );
@@ -98,7 +98,7 @@
 				}
 			}
 		}
-		if (!$foundit) {
+		if ( !$foundit ) {
 			fwrite( $f, "\n# BEGIN {$marker}\n" );
 			foreach ( $insertion as $insertline )
 				fwrite( $f, "{$insertline}\n" );
@@ -126,11 +126,11 @@
 	global $wp_rewrite;
 
 	$home_path = get_home_path();
-	$htaccess_file = $home_path.'.htaccess';
+	$htaccess_file = $home_path . '.htaccess';
 
 	// If the file doesn't already exist check for write access to the directory and whether we have some rules.
 	// else check for write access to the file.
-	if ((!file_exists($htaccess_file) && is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable($htaccess_file)) {
+	if ( ( !file_exists( $htaccess_file ) && is_writable( $home_path ) && $wp_rewrite->using_mod_rewrite_permalinks() ) || is_writable( $htaccess_file ) ) {
 		if ( got_mod_rewrite() ) {
 			$rules = explode( "\n", $wp_rewrite->mod_rewrite_rules() );
 			return insert_with_markers( $htaccess_file, 'WordPress', $rules );
@@ -158,12 +158,12 @@
 	$web_config_file = $home_path . 'web.config';
 
 	// Using win_is_writable() instead of is_writable() because of a bug in Windows PHP
-	if ( iis7_supports_permalinks() && ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) ) {
-		$rule = $wp_rewrite->iis7_url_rewrite_rules(false, '', '');
-		if ( ! empty($rule) ) {
-			return iis7_add_rewrite_rule($web_config_file, $rule);
+	if ( iis7_supports_permalinks() && ( ( ! file_exists( $web_config_file ) && win_is_writable( $home_path ) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable( $web_config_file ) ) ) {
+		$rule = $wp_rewrite->iis7_url_rewrite_rules( false, '', '' );
+		if ( ! empty( $rule ) ) {
+			return iis7_add_rewrite_rule( $web_config_file, $rule );
 		} else {
-			return iis7_delete_rewrite_rule($web_config_file);
+			return iis7_delete_rewrite_rule( $web_config_file );
 		}
 	}
 	return false;
@@ -177,7 +177,7 @@
  * @param unknown_type $file
  */
 function update_recently_edited( $file ) {
-	$oldfiles = (array ) get_option( 'recently_edited' );
+	$oldfiles = ( array ) get_option( 'recently_edited' );
 	if ( $oldfiles ) {
 		$oldfiles = array_reverse( $oldfiles );
 		$oldfiles[] = $file;
@@ -202,7 +202,7 @@
 function update_home_siteurl( $old_value, $value ) {
 	global $wp_rewrite;
 
-	if ( defined( "WP_INSTALLING" ) )
+	if ( defined( 'WP_INSTALLING' ) )
 		return;
 
 	// If home changed, write rewrite rules to new location.
@@ -221,12 +221,12 @@
  * @return string
  */
 function url_shorten( $url ) {
-	$short_url = str_replace( 'http://', '', stripslashes( $url ));
+	$short_url = str_replace( 'http://', '', stripslashes( $url ) );
 	$short_url = str_replace( 'www.', '', $short_url );
-	if ('/' == substr( $short_url, -1 ))
+	if ('/' == substr( $short_url, -1 ) )
 		$short_url = substr( $short_url, 0, -1 );
 	if ( strlen( $short_url ) > 35 )
-		$short_url = substr( $short_url, 0, 32 ).'...';
+		$short_url = substr( $short_url, 0, 32 ) . '...';
 	return $short_url;
 }
 
@@ -242,17 +242,17 @@
  * @param array $vars An array of globals to reset.
  */
 function wp_reset_vars( $vars ) {
-	for ( $i=0; $i<count( $vars ); $i += 1 ) {
+	for ( $i = 0; $i < count( $vars ); $i += 1 ) {
 		$var = $vars[$i];
 		global $$var;
 
-		if ( empty( $_POST[$var] ) ) {
-			if ( empty( $_GET[$var] ) )
+		if ( empty( $_POST[ $var ] ) ) {
+			if ( empty( $_GET[ $var ] ) )
 				$$var = '';
 			else
-				$$var = $_GET[$var];
+				$$var = $_GET[ $var ];
 		} else {
-			$$var = $_POST[$var];
+			$$var = $_POST[ $var ];
 		}
 	}
 }
@@ -264,8 +264,8 @@
  *
  * @param unknown_type $message
  */
-function show_message($message) {
-	if ( is_wp_error($message) ){
+function show_message( $message ) {
+	if ( is_wp_error( $message) ){
 		if ( $message->get_error_data() )
 			$message = $message->get_error_message() . ': ' . $message->get_error_data();
 		else
@@ -284,24 +284,24 @@
  * @param unknown_type $message
  */
 function wp_doc_link_parse( $content ) {
-	if ( !is_string( $content ) || empty( $content ) )
+	if ( ! is_string( $content ) || empty( $content ) )
 		return array();
 
-	if ( !function_exists('token_get_all') )
+	if ( ! function_exists( 'token_get_all' ) )
 		return array();
 
 	$tokens = token_get_all( $content );
 	$functions = array();
 	$ignore_functions = array();
 	for ( $t = 0, $count = count( $tokens ); $t < $count; $t++ ) {
-		if ( !is_array( $tokens[$t] ) ) continue;
-		if ( T_STRING == $tokens[$t][0] && ( '(' == $tokens[ $t + 1 ] || '(' == $tokens[ $t + 2 ] ) ) {
+		if ( ! is_array( $tokens[ $t ] ) ) continue;
+		if ( T_STRING == $tokens[ $t ][ 0 ] && ( '(' == $tokens[ $t + 1 ] || '(' == $tokens[ $t + 2 ] ) ) {
 			// If it's a function or class defined locally, there's not going to be any docs available
-			if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] ) ) {
-				$ignore_functions[] = $tokens[$t][1];
+			if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][ 1 ], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][ 0 ] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][ 0 ] ) ) {
+				$ignore_functions[] = $tokens[$t][ 1 ];
 			}
 			// Add this to our stack of unique references
-			$functions[] = $tokens[$t][1];
+			$functions[] = $tokens[ $t ][ 1 ];
 		}
 	}
 
@@ -327,25 +327,25 @@
 **/
 function set_screen_options() {
 
-	if ( isset($_POST['wp_screen_options']) && is_array($_POST['wp_screen_options']) ) {
+	if ( isset( $_POST[ 'wp_screen_options' ] ) && is_array( $_POST[ 'wp_screen_options' ] ) ) {
 		check_admin_referer( 'screen-options-nonce', 'screenoptionnonce' );
 
 		if ( !$user = wp_get_current_user() )
 			return;
-		$option = $_POST['wp_screen_options']['option'];
-		$value = $_POST['wp_screen_options']['value'];
-
-		if ( !preg_match( '/^[a-z_-]+$/', $option ) )
+		$option = $_POST[ 'wp_screen_options' ][ 'option' ];
+		$value = $_POST[ 'wp_screen_options' ][ 'value' ];
+
+		if ( ! preg_match( '/^[a-z_-]+$/', $option ) )
 			return;
 
-		$option = str_replace('-', '_', $option);
+		$option = str_replace( '-', '_', $option );
 
 		$map_option = $option;
-		$type = str_replace('edit_', '', $map_option);
-		$type = str_replace('_per_page', '', $type);
-		if ( in_array($type, get_post_types()) )
+		$type = str_replace( 'edit_', '', $map_option );
+		$type = str_replace( '_per_page', '', $type );
+		if ( in_array( $type, get_post_types() ) )
 			$map_option = 'edit_per_page';
-		if ( in_array( $type, get_taxonomies()) )
+		if ( in_array( $type, get_taxonomies() ) )
 			$map_option = 'edit_tags_per_page';
 
 
@@ -363,19 +363,19 @@
 			case 'plugins_network_per_page':
 			case 'themes_network_per_page':
 			case 'site_themes_network_per_page':
-				$value = (int) $value;
+				$value = ( int ) $value;
 				if ( $value < 1 || $value > 999 )
 					return;
 				break;
 			default:
-				$value = apply_filters('set-screen-option', false, $option, $value);
+				$value = apply_filters( 'set-screen-option', false, $option, $value );
 				if ( false === $value )
 					return;
 				break;
 		}
 
-		update_user_meta($user->ID, $option, $value);
-		wp_redirect( remove_query_arg( array('pagenum', 'apage', 'paged'), wp_get_referer() ) );
+		update_user_meta( $user->ID, $option, $value );
+		wp_redirect( remove_query_arg( array( 'pagenum', 'apage', 'paged' ), wp_get_referer() ) );
 		exit;
 	}
 }
@@ -388,9 +388,9 @@
  * @param unknown_type $message
  */
 function wp_menu_unfold() {
-	if ( isset($_GET['unfoldmenu']) ) {
+	if ( isset( $_GET[ 'unfoldmenu' ] ) ) {
 		delete_user_setting('mfold');
-		wp_redirect( remove_query_arg( 'unfoldmenu', stripslashes($_SERVER['REQUEST_URI']) ) );
+		wp_redirect( remove_query_arg( 'unfoldmenu', stripslashes( $_SERVER[ 'REQUEST_URI' ] ) ) );
 	 	exit;
 	}
 }
@@ -403,17 +403,17 @@
  * @return bool
  * @param string $filename The file path to the configuration file
  */
-function iis7_rewrite_rule_exists($filename) {
-	if ( ! file_exists($filename) )
-		return false;
-	if ( ! class_exists('DOMDocument') )
+function iis7_rewrite_rule_exists( $filename ) {
+	if ( ! file_exists( $filename ) )
+		return false;
+	if ( ! class_exists( 'DOMDocument' ) )
 		return false;
 
 	$doc = new DOMDocument();
-	if ( $doc->load($filename) === false )
-		return false;
-	$xpath = new DOMXPath($doc);
-	$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
+	if ( $doc->load( $filename ) === false )
+		return false;
+	$xpath = new DOMXPath( $doc );
+	$rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]' );
 	if ( $rules->length == 0 )
 		return false;
 	else
@@ -428,27 +428,27 @@
  * @param string $filename Name of the configuration file
  * @return bool
  */
-function iis7_delete_rewrite_rule($filename) {
+function iis7_delete_rewrite_rule( $filename ) {
 	// If configuration file does not exist then rules also do not exist so there is nothing to delete
-	if ( ! file_exists($filename) )
+	if ( ! file_exists( $filename ) )
 		return true;
 
-	if ( ! class_exists('DOMDocument') )
+	if ( ! class_exists( 'DOMDocument' ) )
 		return false;
 
 	$doc = new DOMDocument();
 	$doc->preserveWhiteSpace = false;
 
-	if ( $doc -> load($filename) === false )
-		return false;
-	$xpath = new DOMXPath($doc);
-	$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
+	if ( $doc -> load( $filename ) === false )
+		return false;
+	$xpath = new DOMXPath( $doc );
+	$rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]' );
 	if ( $rules->length > 0 ) {
 		$child = $rules->item(0);
 		$parent = $child->parentNode;
-		$parent->removeChild($child);
+		$parent->removeChild( $child );
 		$doc->formatOutput = true;
-		saveDomDocument($doc, $filename);
+		saveDomDocument( $doc, $filename );
 	}
 	return true;
 }
@@ -463,72 +463,72 @@
  * @return bool
  */
 function iis7_add_rewrite_rule($filename, $rewrite_rule) {
-	if ( ! class_exists('DOMDocument') )
+	if ( ! class_exists( 'DOMDocument' ) )
 		return false;
 
 	// If configuration file does not exist then we create one.
 	if ( ! file_exists($filename) ) {
-		$fp = fopen( $filename, 'w');
-		fwrite($fp, '<configuration/>');
-		fclose($fp);
+		$fp = fopen( $filename, 'w' );
+		fwrite( $fp, '<configuration/>' );
+		fclose( $fp );
 	}
 
 	$doc = new DOMDocument();
 	$doc->preserveWhiteSpace = false;
 
-	if ( $doc->load($filename) === false )
-		return false;
-
-	$xpath = new DOMXPath($doc);
+	if ( $doc->load( $filename ) === false )
+		return false;
+
+	$xpath = new DOMXPath( $doc );
 
 	// First check if the rule already exists as in that case there is no need to re-add it
-	$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
+	$wordpress_rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]' );
 	if ( $wordpress_rules->length > 0 )
 		return true;
 
 	// Check the XPath to the rewrite rule and create XML nodes if they do not exist
-	$xmlnodes = $xpath->query('/configuration/system.webServer/rewrite/rules');
+	$xmlnodes = $xpath->query( '/configuration/system.webServer/rewrite/rules' );
 	if ( $xmlnodes->length > 0 ) {
 		$rules_node = $xmlnodes->item(0);
 	} else {
-		$rules_node = $doc->createElement('rules');
-
-		$xmlnodes = $xpath->query('/configuration/system.webServer/rewrite');
+		$rules_node = $doc->createElement( 'rules' );
+
+		$xmlnodes = $xpath->query( '/configuration/system.webServer/rewrite' );
 		if ( $xmlnodes->length > 0 ) {
-			$rewrite_node = $xmlnodes->item(0);
-			$rewrite_node->appendChild($rules_node);
+			$rewrite_node = $xmlnodes->item( 0 );
+			$rewrite_node->appendChild( $rules_node );
 		} else {
-			$rewrite_node = $doc->createElement('rewrite');
-			$rewrite_node->appendChild($rules_node);
-
-			$xmlnodes = $xpath->query('/configuration/system.webServer');
+			$rewrite_node = $doc->createElement( 'rewrite' );
+			$rewrite_node->appendChild( $rules_node );
+
+			$xmlnodes = $xpath->query( '/configuration/system.webServer' );
 			if ( $xmlnodes->length > 0 ) {
-				$system_webServer_node = $xmlnodes->item(0);
-				$system_webServer_node->appendChild($rewrite_node);
+				$system_webServer_node = $xmlnodes->item( 0 );
+				$system_webServer_node->appendChild( $rewrite_node );
 			} else {
-				$system_webServer_node = $doc->createElement('system.webServer');
-				$system_webServer_node->appendChild($rewrite_node);
-
-				$xmlnodes = $xpath->query('/configuration');
+				$system_webServer_node = $doc->createElement( 'system.webServer' );
+				$system_webServer_node->appendChild( $rewrite_node );
+
+				$xmlnodes = $xpath->query( '/configuration' );
 				if ( $xmlnodes->length > 0 ) {
-					$config_node = $xmlnodes->item(0);
-					$config_node->appendChild($system_webServer_node);
+					$config_node = $xmlnodes->item( 0 );
+					$config_node->appendChild( $system_webServer_node );
 				} else {
-					$config_node = $doc->createElement('configuration');
-					$doc->appendChild($config_node);
-					$config_node->appendChild($system_webServer_node);
+					$config_node = $doc->createElement( 'configuration' );
+					$doc->appendChild( $config_node );
+					$config_node->appendChild( $system_webServer_node );
 				}
 			}
 		}
 	}
 
 	$rule_fragment = $doc->createDocumentFragment();
-	$rule_fragment->appendXML($rewrite_rule);
-	$rules_node->appendChild($rule_fragment);
-
-	$doc->encoding = "UTF-8";
+	$rule_fragment->appendXML( $rewrite_rule );
+	$rules_node->appendChild( $rule_fragment );
+
+	$doc->encoding = 'UTF-8';
 	$doc->formatOutput = true;
-	saveDomDocument($doc, $filename);
+	saveDomDocument( $doc, $filename );
 
 	return true;
 }
@@ -541,12 +541,12 @@
  * @param DOMDocument $doc
  * @param string $filename
  */
-function saveDomDocument($doc, $filename) {
+function saveDomDocument( $doc, $filename ) {
 	$config = $doc->saveXML();
 	$config = preg_replace("/([^\r])\n/", "$1\r\n", $config);
-	$fp = fopen($filename, 'w');
-	fwrite($fp, $config);
-	fclose($fp);
+	$fp = fopen( $filename, 'w' );
+	fwrite( $fp, $config );
+	fclose( $fp );
 }
 
 /**
@@ -564,12 +564,12 @@
 	 * see http://bugs.php.net/bug.php?id=30931
 	 */
 
-	if ( $path[strlen( $path ) - 1] == '/' ) // recursively return a temporary file path
-		return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
+	if ( $path[ strlen( $path ) - 1 ] == '/' ) // recursively return a temporary file path
+		return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp' );
 	else if ( is_dir( $path ) )
 		return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
 	// check tmp file for read/write capabilities
-	$should_delete_tmp_file = !file_exists( $path );
+	$should_delete_tmp_file = ! file_exists( $path );
 	$f = @fopen( $path, 'a' );
 	if ( $f === false )
 		return false;
@@ -588,20 +588,20 @@
 	global $_wp_admin_css_colors, $user_id; ?>
 <fieldset><legend class="screen-reader-text"><span><?php _e('Admin Color Scheme')?></span></legend>
 <?php
-$current_color = get_user_option('admin_color', $user_id);
-if ( empty($current_color) )
+$current_color = get_user_option( 'admin_color', $user_id );
+if ( empty( $current_color ) )
 	$current_color = 'fresh';
 foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
-<div class="color-option"><input name="admin_color" id="admin_color_<?php echo $color; ?>" type="radio" value="<?php echo esc_attr($color) ?>" class="tog" <?php checked($color, $current_color); ?> />
+<div class="color-option"><input name="admin_color" id="admin_color_<?php echo $color; ?>" type="radio" value="<?php echo esc_attr($color) ?>" class="tog" <?php checked( $color, $current_color ); ?> />
 	<table class="color-palette">
 	<tr>
 	<?php foreach ( $color_info->colors as $html_color ): ?>
-	<td style="background-color: <?php echo $html_color ?>" title="<?php echo $color ?>">&nbsp;</td>
+	<td style="background-color: <?php echo $html_color; ?>" title="<?php echo $color ?>">&nbsp;</td>
 	<?php endforeach; ?>
 	</tr>
 	</table>
 
-	<label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
+	<label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name; ?></label>
 </div>
 	<?php endforeach; ?>
 </fieldset>
