Ignore:
Timestamp:
12/17/09 10:56:50 (15 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria do FM, Implementação do arquivamento

File:
1 edited

Legend:

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

    r1854 r1865  
    2727                        'delete'=>True, 
    2828                        'archive'=>True, 
     29                        'unarchive'=>True, 
    2930                        'summary' => True 
    3031                ); 
     
    294295                        $this->delete(); 
    295296                } 
     297                function unarchive(){ 
     298                        $command = escapeshellarg($this->file); 
     299                        if (strlen($this->pswd) > 0){ 
     300                                $command = " -P ".(base64_decode($this->pswd) ^ $this->path)." ".$command; 
     301                        } 
     302 
     303                        exec("cd ".escapeshellarg($this->bo->vfs->basedir.$this->path).";".escapeshellcmd("nice -n19 unzip ".$command),$output, $return_var); 
     304                        exec("history -c"); // privacy is good, we dont want get passwords! 
     305 
     306                        if ($return_var == 9 || $return_var == 5 || $return_var == 82){ 
     307                                echo "wpasswd:$command"; 
     308                                return false; 
     309                        }else if($return_var > 1){ 
     310                                echo "False:"; 
     311                        } 
     312 
     313                        $this->fileman[] = $this->file; 
     314                        $this->delete(); 
     315                        $this->bo->vfs->update_real(array( 
     316                                        'string'        => $this->path, 
     317                                        'relatives'     => array(RELATIVE_NONE) 
     318                                )); 
     319                } 
    296320                function editComment() 
    297321                { 
Note: See TracChangeset for help on using the changeset viewer.