From f925c3c2b43099bbbe661ea95ee34b3c5d305fae Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 4 Apr 2010 12:07:27 +0000 Subject: [PATCH] Adjust get_file_description() to account for absolute paths. see #12843 git-svn-id: http://svn.automattic.com/wordpress/trunk@13994 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index caf3c27c41..8eec04b11a 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -52,8 +52,8 @@ function get_file_description( $file ) { if ( isset( $wp_file_descriptions[basename( $file )] ) ) { return $wp_file_descriptions[basename( $file )]; } - elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) { - $template_data = implode( '', file( WP_CONTENT_DIR . $file ) ); + elseif ( file_exists( $file ) && is_file( $file ) ) { + $template_data = implode( '', file( $file ) ); if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name )) return _cleanup_header_comment($name[1]) . ' Page Template'; }