Ignore:
Timestamp:
12/22/09 15:13:10 (15 years ago)
Author:
amuller
Message:

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

File:
1 edited

Legend:

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

    r1823 r1888  
    1616                        'quota' => True, 
    1717                        'removeFolder' => True, 
     18                        'reconstructFolder' => True, 
     19                        'renameFolder' => True, 
    1820                        'folders' => True 
    1921                 ); 
     
    4345                        $vars[lang_search]=lang('search'); 
    4446                        $vars[lang_remove]=lang('remove'); 
     47                        $vars[lang_rename]=lang('rename'); 
     48                        $vars[lang_reconstruct]=lang('reconstruct'); 
    4549 
    4650                        $t->set_var($vars); 
     
    8488 
    8589                 } 
    86  
     90                 function reconstructFolder(){ 
     91                         $GLOBALS['phpgw_info']['flags'] = array 
     92                                 ( 
     93                                         'currentapp'    => 'filemanager', 
     94                                         'noheader'      => True, 
     95                                         'nonavbar' => True, 
     96                                         'nofooter'      => True, 
     97                                         'noappheader'   => True, 
     98                                         'enable_browser_class'  => True 
     99                                 ); 
     100                         $bo = CreateObject('filemanager.bofilemanager'); 
     101                         $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['dir'])); 
     102                         if (strlen($name) < 2) 
     103                                 return false; 
     104                         $bo->vfs->update_real(array( 
     105                                 'string'        => $name, 
     106                                 'relatives'     => array(RELATIVE_NONE) 
     107                         )); 
     108                         $bo->vfs->flush_journal(array( 
     109                                 'string' => $name, 
     110                                 'relatives' => array(RELATIVE_NONE), 
     111                                 'deleteall' => True 
     112                         )); 
     113                         echo lang('Your operation was successfully executed'); 
     114                 } 
     115 
     116                 function renameFolder(){ 
     117                         $GLOBALS['phpgw_info']['flags'] = array 
     118                                 ( 
     119                                         'currentapp'    => 'filemanager', 
     120                                         'noheader'      => True, 
     121                                         'nonavbar' => True, 
     122                                         'nofooter'      => True, 
     123                                         'noappheader'   => True, 
     124                                         'enable_browser_class'  => True 
     125                                 ); 
     126                         $bo = CreateObject('filemanager.bofilemanager'); 
     127                         $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['dir'])); 
     128                         $to = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['to'])); 
     129                         if (strlen($name) < 2) 
     130                                 return false; 
     131                        if ( $bo->vfs->mv(array( 
     132                                 'from'        => $name, 
     133                                 'to'   => $to, 
     134                                 'relatives'     => array(RELATIVE_NONE) 
     135                         )) ){ 
     136                                 $bo->vfs->flush_journal(array( 
     137                                         'string' => $name, 
     138                                         'relatives' => array(RELATIVE_NONE), 
     139                                         'deleteall' => True 
     140                                 )); 
     141                                 echo lang('Your operation was successfully executed'); 
     142                         } 
     143                        else 
     144                                echo lang('Error'); 
     145                 } 
    87146 
    88147                 function quota(){ 
Note: See TracChangeset for help on using the changeset viewer.