Ignore:
Timestamp:
12/23/09 09:51:15 (15 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria do FM. melhorias na interface, melhoria na cópia, ao mover e etc...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/inc/class.uifilemanager.inc.php

    r1880 r1889  
    477477                        } 
    478478 
    479                         # main action switch 
    480                         // FIXME this will become a switch 
    481479                        if($this->newfile_x && $this->newfile_or_dir) // create new textfile 
    482480                        { 
    483481                                $this->createfile(); 
    484                         } 
    485                         elseif($this->copy_to_x) 
    486                         { 
    487                                 $this->copyTo(); 
    488                         } 
    489                         elseif($this->move_to_x) 
    490                         { 
    491                                 $this->moveTo(); 
    492482                        } 
    493483                        elseif($this->edit_cancel_x) 
     
    752742                        // end file count 
    753743                } 
    754  
    755                 # Handle Moving Files and Directories 
    756                 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                         else 
    764                         { 
    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                                         else 
    778                                         { 
    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 Directories 
    794                 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                         else 
    802                         { 
    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                                         else 
    816                                         { 
    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  
    831744                function removedir() 
    832745                { 
Note: See TracChangeset for help on using the changeset viewer.