Index: includes/file.php
===================================================================
--- includes/file.php	(revision 27380)
+++ includes/file.php	(working copy)
@@ -53,16 +53,18 @@
  * @uses _cleanup_header_comment
  * @uses $wp_file_descriptions
  * @param string $file Filesystem path or filename
- * @return string Description of file from $wp_file_descriptions or basename of $file if description doesn't exist
+ * @return string Description of file from $wp_file_descriptions or basename of $file if description doesn't exist, 
+ * appends 'Page Template' to basename of $file if the file is a page template
  */
 function get_file_description( $file ) {
-	global $wp_file_descriptions;
-
-	if ( isset( $wp_file_descriptions[basename( $file )] ) ) {
-		return $wp_file_descriptions[basename( $file )];
+	global $wp_file_descriptions , $allowed_files;
+	$relative_pathinfo = pathinfo( $file );
+	$file_path = $allowed_files[ $file ];
+	if ( isset( $wp_file_descriptions[ basename( $file ) ] ) && '.' == $relative_pathinfo['dirname'] ) {
+		return $wp_file_descriptions[ basename( $file ) ];
 	}
-	elseif ( file_exists( $file ) && is_file( $file ) ) {
-		$template_data = implode( '', file( $file ) );
+	elseif ( file_exists( $file_path ) && is_file( $file_path) ) {
+		$template_data = implode( '', file( $file_path ) );
 		if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ))
 			return sprintf( __( '%s Page Template' ), _cleanup_header_comment($name[1]) );
 	}
@@ -1109,4 +1111,4 @@
 </form>
 <?php
 	return false;
-}
+}
\ No newline at end of file
Index: theme-editor.php
===================================================================
--- theme-editor.php	(revision 27380)
+++ theme-editor.php	(working copy)
@@ -14,8 +14,9 @@
 	exit();
 }
 
-if ( !current_user_can('edit_themes') )
+if ( ! current_user_can('edit_themes') ) {
 	wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site.').'</p>');
+}
 
 $title = __("Edit Themes");
 $parent_file = 'themes.php';
@@ -24,8 +25,8 @@
 'id'		=> 'overview',
 'title'		=> __('Overview'),
 'content'	=>
-	'<p>' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.') . '</p>
-	<p>' . __('Begin by choosing a theme to edit from the dropdown menu and clicking Select. A list then appears of all the template files. Clicking once on any file name causes the file to appear in the large Editor box.') . '</p>
+	'<p>' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up part of your theme.') . '</p>
+	<p>' . __('Begin by choosing a theme to edit from the dropdown menu and clicking Select. A list of php files with one level deep and css files of flat level appears . Clicking once on any file name causes the file to appear in the large Editor box.') . '</p>
 	<p>' . __('For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.') . '</p>
 	<p id="newcontent-description">' . __('In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key.') . '</p>
 	<p>' . __('After typing in your edits, click Update File.') . '</p>
@@ -45,18 +46,22 @@
 
 wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) );
 
-if ( $theme )
+if ( $theme ) {
 	$stylesheet = $theme;
-else
+}
+else {
 	$stylesheet = get_stylesheet();
+}
 
 $theme = wp_get_theme( $stylesheet );
 
-if ( ! $theme->exists() )
+if ( ! $theme->exists() ) {
 	wp_die( __( 'The requested theme does not exist.' ) );
+}
 
-if ( $theme->errors() && 'theme_no_stylesheet' == $theme->errors()->get_error_code() )
+if ( $theme->errors() && 'theme_no_stylesheet' == $theme->errors()->get_error_code() ) {
 	wp_die( __( 'The requested theme does not exist.' ) . ' ' . $theme->errors()->get_error_message() );
+}
 
 $allowed_files = $theme->get_files( 'php', 1 );
 $has_templates = ! empty( $allowed_files );
@@ -100,8 +105,9 @@
 
 	update_recently_edited( $file );
 
-	if ( ! is_file( $file ) )
+	if ( ! is_file( $file ) ) {
 		$error = true;
+	}
 
 	$content = '';
 	if ( ! $error && filesize( $file ) > 0 ) {
@@ -127,7 +133,7 @@
  <div id="message" class="updated"><p><?php _e( 'File edited successfully.' ) ?></p></div>
 <?php endif;
 
-$description = get_file_description( $file );
+$description = get_file_description( $relative_file );
 $file_show = array_search( $file, array_filter( $allowed_files ) );
 if ( $description != $file_show )
 	$description .= ' <span>(' . $file_show . ')</span>';
@@ -176,15 +182,17 @@
 	endif;
 
 	foreach ( $allowed_files as $filename => $absolute_filename ) :
-		if ( 'style.css' == $filename )
+		if ( 'style.css' == $filename ) {
 			echo "\t</ul>\n\t<h3>" . _x( 'Styles', 'Theme stylesheets in theme editor' ) . "</h3>\n\t<ul>\n";
+		}
 
-		$file_description = get_file_description( $absolute_filename );
-		if ( $file_description != basename( $filename ) )
+		$file_description = get_file_description( $filename );
+		if ( $filename != basename($absolute_filename) || $file_description !== $filename ) {
 			$file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
-
-		if ( $absolute_filename == $file )
+		}
+		if ( $absolute_filename == $file ) {
 			$file_description = '<span class="highlight">' . $file_description . '</span>';
+		}
 ?>
 		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
 <?php
@@ -242,4 +250,4 @@
 break;
 }
 
-include(ABSPATH . 'wp-admin/admin-footer.php' );
+include(ABSPATH . 'wp-admin/admin-footer.php' );
\ No newline at end of file
