Changeset 1889 for sandbox/filemanager/inc/class.uifilemanager.inc.php
- Timestamp:
- 12/23/09 09:51:15 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/class.uifilemanager.inc.php
r1880 r1889 477 477 } 478 478 479 # main action switch480 // FIXME this will become a switch481 479 if($this->newfile_x && $this->newfile_or_dir) // create new textfile 482 480 { 483 481 $this->createfile(); 484 }485 elseif($this->copy_to_x)486 {487 $this->copyTo();488 }489 elseif($this->move_to_x)490 {491 $this->moveTo();492 482 } 493 483 elseif($this->edit_cancel_x) … … 752 742 // end file count 753 743 } 754 755 # Handle Moving Files and Directories756 function moveTo()757 {758 if(!$this->to)759 {760 $this->messages[] = lang('Error:').lang('Could not move file because no destination directory is given ', $this->disppath.'/'.$file);761 762 }763 else764 {765 $this->to = $this->bo->fakebase.'/'.$this->to;766 while(list($num, $file) = each($this->fileman))767 {768 if($this->bo->vfs->mv(array(769 'from' => $this->from . '/' . $file,770 'to' => $this->to . '/' . $file,771 'relatives' => array(RELATIVE_NONE, RELATIVE_NONE)772 )))773 {774 $moved++;775 $this->messages[0]=lang('Files moved to %1 successfuly',$this->to);776 }777 else778 {779 $this->messages[] = lang('Error:').lang('Could not move %1 to %2', $file, $this->to);780 }781 }782 }783 784 if($moved)785 {786 $x=0;787 }788 789 $this->readFilesInfo();790 $this->filelisting();791 }792 793 // Handle Copying of Files and Directories794 function copyTo()795 {796 if(!$this->to)797 {798 $this->messages[] = lang('Error:').lang('Could not copy file because no destination directory is given ');799 800 }801 else802 {803 $this->to = $this->bo->fakebase.'/'.$this->to;804 while(list($num, $file) = each($this->fileman))805 {806 if($this->bo->vfs->cp(array(807 'from' => $this->from . '/' . $file,808 'to' => $this->to . '/' . $file,809 'relatives' => array(RELATIVE_NONE, RELATIVE_NONE)810 )))811 {812 $copied++;813 $this->messages[0] = lang('Files Copied to %1 successfuly', $this->to);814 }815 else816 {817 $this->messages[] = lang('Error:').lang('Could not copy %1',$file);818 }819 }820 }821 if($copied)822 823 {824 $x=0;825 }826 827 $this->readFilesInfo();828 $this->filelisting();829 }830 831 744 function removedir() 832 745 {
Note: See TracChangeset
for help on using the changeset viewer.