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

Ernest MacDougal Campbell III emc3 at users.sourceforge.net
Fri Oct 8 14:59:55 UTC 2004


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

Modified Files:
	upload.php 
Log Message:
Fixed the file renaming bug that I introduced.

Index: upload.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upload.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** upload.php	2 Oct 2004 00:46:30 -0000	1.18
--- upload.php	8 Oct 2004 14:59:52 -0000	1.19
***************
*** 77,83 ****
  break;
  case 'upload':
- ?>
  
! <?php //Makes sure they choose a file
  
  //print_r($_FILES);
--- 77,82 ----
  break;
  case 'upload':
  
! //Makes sure they choose a file
  
  //print_r($_FILES);
***************
*** 86,90 ****
  
      $imgalt = basename( (isset($_POST['imgalt'])) ? $_POST['imgalt'] : '' );
! 
      $img1_name = (strlen($imgalt)) ? $imgalt : basename( $_FILES['img1']['name'] );
      $img1_type = (strlen($imgalt)) ? $_POST['img1_type'] : $_FILES['img1']['type'];
--- 85,89 ----
  
      $imgalt = basename( (isset($_POST['imgalt'])) ? $_POST['imgalt'] : '' );
!   
      $img1_name = (strlen($imgalt)) ? $imgalt : basename( $_FILES['img1']['name'] );
      $img1_type = (strlen($imgalt)) ? $_POST['img1_type'] : $_FILES['img1']['type'];
***************
*** 100,104 ****
      if (strlen($imgalt)) {
          $pathtofile = get_settings('fileupload_realpath')."/".$imgalt;
!         $img1 = $_POST['img1']['tmp_name'];
      } else {
          $pathtofile = get_settings('fileupload_realpath')."/".$img1_name;
--- 99,103 ----
      if (strlen($imgalt)) {
          $pathtofile = get_settings('fileupload_realpath')."/".$imgalt;
!         $img1 = $_POST['img1'];
      } else {
          $pathtofile = get_settings('fileupload_realpath')."/".$img1_name;
***************
*** 159,162 ****
--- 158,162 ----
  </div>
  <?php 
+ 
  require('admin-footer.php');
  die();




More information about the cvs mailing list