Changeset 604 for trunk/plugins/ExtendedFileManager/Classes
- Timestamp:
- 10/29/06 23:53:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/ExtendedFileManager/Classes/ExtendedFileManager.php
r586 r604 723 723 { 724 724 $fullpath = Files::makePath($this->getImagesDir(),$relative); 725 if($this->countFiles($fullpath) <= 0)725 // if($this->countFiles($fullpath) <= 0) 726 726 return Files::delFolder($fullpath,true); //delete recursively. 727 else728 Return false;727 //else 728 //Return false; 729 729 } 730 730 … … 770 770 $oldName = preg_replace('#\.\.#', '', $oldName); 771 771 772 // path to old file 773 $oldPath = Files::makeFile($this->getImagesDir(), $oldName); 774 775 $ret = Files::renameFile($oldPath, $newName); 776 if ($ret === true) { 777 // delete old thumbnail 778 Files::delFile($this->getThumbname($oldPath)); 772 if (is_dir($oldPath = Files::makeFile($this->getImagesDir(), $_GET['dir'].$oldName))) 773 { 774 $newPath = Files::makeFile($this->getImagesDir(), $_GET['dir'].$newName); 775 return Files::rename($oldPath,$newPath); 776 } 777 else 778 { 779 // path to old file 780 $oldPath = Files::makeFile($this->getImagesDir(), $oldName); 781 782 $ret = Files::renameFile($oldPath, $newName); 783 if ($ret === true) { 784 // delete old thumbnail 785 Files::delFile($this->getThumbname($oldPath)); 786 } 779 787 } 780 788 return $ret; … … 784 792 } 785 793 794 function processPaste() 795 { 796 switch ($_GET['paste']) 797 { 798 case 'copyFile': 799 $src = Files::makeFile($this->getImagesDir(), $_GET['srcdir'].$_GET['file']); 800 $file = $_GET['file']; 801 $dest = Files::makeFile($this->getImagesDir(), $_GET['dir']); 802 return Files::copyFile($src,$dest,$file); 803 break; 804 case 'copyDir': 805 $basePath = $this->getImagesDir(); 806 $src = $_GET['srcdir'].$_GET['file']; 807 $dest = $_GET['dir'].$_GET['file']; 808 return Files::copyDir($basePath,$src,$dest); 809 break; 810 case 'moveFile': 811 $src = Files::makePath($this->getImagesDir(), $_GET['srcdir'].$_GET['file']); 812 $dest = Files::makePath($this->getImagesDir(), $_GET['dir'].$_GET['file']); 813 return Files::rename($src,$dest); 814 break; 815 case 'moveDir': 816 $src = Files::makeFile($this->getImagesDir(), $_GET['srcdir'].$_GET['file']); 817 $dest = Files::makeFile($this->getImagesDir(), $_GET['dir'].$_GET['file']); 818 return Files::rename($src,$dest); 819 break; 820 } 821 } 786 822 } 787 823
Note: See TracChangeset
for help on using the changeset viewer.