[wp-cvs] wordpress/wp-admin templates.php,1.18,1.19

Ryan Boren rboren at users.sourceforge.net
Mon Jun 7 22:40:19 CDT 2004


Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21680

Modified Files:
	templates.php 
Log Message:
Make the template editor use the home setting to find the index.

Index: templates.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/templates.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** templates.php	7 May 2004 23:56:29 -0000	1.18
--- templates.php	8 Jun 2004 03:40:17 -0000	1.19
***************
*** 97,102 ****
  	}
  
!     $file = validate_file($file);	
! 	$real_file = '../' . $file;
  	
  	if (!is_file($real_file))
--- 97,109 ----
  	}
  
!     $home = get_settings('home');
!     if ($home != '' && ('index.php' == $file || get_settings('blogfilename') == $file)) {
!         $home_root = str_replace('http://', '', $home);
!         $home_root = preg_replace('|([^/]*)(.*)|i', '$2', $home_root);
!         $real_file = $_SERVER['DOCUMENT_ROOT'] . $home_root . '/' . $file;
!     } else {
!         $file = validate_file($file);
!         $real_file = '../' . $file;
!     }
  	
  	if (!is_file($real_file))




More information about the cvs mailing list