Ignore:
Timestamp:
12/22/09 09:24:26 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria do FM. melhorias na interface, criação de pastas

File:
1 edited

Legend:

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

    r1879 r1880  
    616616                                $vars[css].='<link rel="stylesheet" type="text/css" href="phpgwapi/js/dftree/dftree.css">'; 
    617617                                $vars[preferences]='<input type="hidden" id="userPreferences" value=\''.serialize($_SESSION['phpgw_info']['user']['preferences']['filemanager']).'\'>'; 
     618                                // Used for important operations that needs security 
     619                                for ($key = ""; strlen($key) < 150; $key .= chr(rand(48,95))); 
     620                                $_SESSION['phpgw_info']['filemanager']['user']['sec_key'] = $key; 
     621                                $vars[sec_key]='<input type="hidden" id="userKey" value=\''.$key.'\'>'; 
    618622                                $vars[script]='<script>initDrawApi();</script>'; 
    619623                                 
     
    827831                function removedir() 
    828832                { 
    829                         $now = intval(time() / 5); 
    830                         for ($i=0;$i<20;$i++) 
    831                                 $now.=$now; 
    832                         $toRemove = $this->path ^ $now; 
     833                        $toRemove = $this->path ^ $_SESSION['phpgw_info']['filemanager']['user']['sec_key']; 
    833834                        if ( $this->bo->vfs->rm(array( 'string' => $toRemove, 
    834835                                'relatives' => array (RELATIVE_NONE) 
Note: See TracChangeset for help on using the changeset viewer.