Ignore:
Timestamp:
03/16/11 11:06:54 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #1646 - Erro em gerenciamento de pastas do File manager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/filemanager/inc/class.uiconfig.inc.php

    r3636 r3873  
    88        \**************************************************************************/ 
    99 
    10 require_once("load_lang.php"); 
     10//require_once("load_lang.php"); 
    1111require_once("class.notifications.inc.php"); 
    1212 
     
    2121                'folders'                       => True, 
    2222                'groups_users'          => True,                 
    23                 'load_quota'            => True, 
     23                'load_quota'                    => True, 
    2424                'notifyUploads'         => True, 
    2525                'renameFolder'          => True, 
    2626                'removeFolder'          => True, 
    2727                'reconstructFolder'     => True, 
    28                 'search_dir'            => True, 
     28                'search_dir'                    => True, 
    2929                'set_owner'                     => True,                 
    3030                'search_user'           => True, 
    31                 'set_permission'        => True, 
     31                'set_permission'                => True, 
    3232                'update_quota'          => True, 
    3333                'quota'                         => True 
     
    5656                $GLOBALS['phpgw']->common->phpgw_header(); 
    5757 
    58                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/connector.js'></script>"; 
    59                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/common_functions.js'></script>"; 
    60                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/config.js'></script>"; 
    61  
    62  
    6358                $this->template->set_file(array('config_list' => 'config_folders.tpl')); 
    6459                $this->template->set_block('config_list','body','body'); 
    6560                 
    6661                $vars = array(  
     62                                                'lang_back'                             => lang('Back'), 
    6763                                                'lang_directory'        => lang('directory'), 
    6864                                                'lang_search'           => lang('search'), 
     
    7066                                                'lang_rename'           => lang('rename'), 
    7167                                                'lang_create'           => lang('create'), 
    72                                                 'lang_reconstruct'      => lang('reconstruct') 
     68                                                'lang_reconstruct'      => lang('reconstruct'), 
     69                                                'path_filemanager'      => $GLOBALS['phpgw_info']['flags']['currentapp'] 
    7370                                        ); 
    7471 
     
    8582                $GLOBALS['phpgw']->common->phpgw_header(); 
    8683 
    87                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/connector.js'></script>"; 
    88                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/common_functions.js'></script>"; 
    89                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/config.js'></script>"; 
    90  
    9184                $this->template->set_file(array('config_list' => 'config_owner.tpl')); 
    9285                $this->template->set_block('config_list','body','body'); 
    9386                 
    9487                $vars = array( 
    95                                                 'lang_directory'                => lang('directory'), 
     88                                                'lang_Add'                              => lang('Add'), 
     89                                                'lang_directory'                        => lang('directory'), 
     90                                                'lang_Delete'                           => lang('Delete'), 
     91                                                'lang_Edit'                             => lang('Edit'), 
     92                                                'lang_Read'                             => lang('Read'), 
     93                                                'lang_private'                  => lang('private'),              
    9694                                                'lang_search'                   => lang('search'), 
    9795                                                'lang_setowner'                 => lang('set owner'), 
    9896                                                'lang_setperm'                  => lang('set permission'), 
    99                                                 'lang_users_and_groups' => lang('Users and groups') 
     97                                                'lang_users_and_groups' => lang('Users and groups'), 
     98                                                'path_filemanager'              => $GLOBALS['phpgw_info']['flags']['currentapp'] 
    10099                                        ); 
    101100                 
     
    103102                $this->template->pparse('out','body'); 
    104103 
    105         $GLOBALS['phpgw']->common->phpgw_footer(); 
    106         $GLOBALS['phpgw']->common->phpgw_exit(); 
     104                $GLOBALS['phpgw']->common->phpgw_footer(); 
     105                $GLOBALS['phpgw']->common->phpgw_exit(); 
    107106         } 
    108107 
     
    151150                          
    152151                 $this->bo = CreateObject('filemanager.bofilemanager'); 
    153                  $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['dir'])); 
     152                 $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_POST['dir'])); 
    154153                 if (strlen($name) < 2) 
    155154                         return false; 
     
    172171                         } 
    173172                 } 
    174                  return;  
     173                 else 
     174                         echo lang("No permission to delete the folder %1", $name ); 
    175175 
    176176        } 
     
    184184                          
    185185                 $this->bo = CreateObject('filemanager.bofilemanager'); 
    186                  $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['dir'])); 
     186                 $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_POST['dir'])); 
    187187                 if (strlen($name) < 2) 
    188188                         return false; 
     
    235235                $GLOBALS['phpgw']->common->phpgw_header(); 
    236236 
    237                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/connector.js'></script>"; 
    238                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/common_functions.js'></script>"; 
    239                 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/config.js'></script>"; 
    240  
    241237                $this->template->set_file(array('config_list' => 'config_quota.tpl')); 
    242238                $this->template->set_block('config_list','body','body'); 
     
    245241                                                'lang_directory' => lang('directory'), 
    246242                                                'lang_save' =>lang('save'),                                              
    247                                                 'lang_search' => lang('search') 
     243                                                'lang_search' => lang('search'), 
     244                                                'path_filemanager'      => $GLOBALS['phpgw_info']['flags']['currentapp'] 
    248245                                        ); 
    249246 
     
    365362                 $GLOBALS['phpgw_info']['flags']['nofooter']    = True; 
    366363                 $GLOBALS['phpgw_info']['flags']['noappheader'] = True; 
    367                           
     364 
     365                 $_options = ""; 
     366                 $query = ""; 
     367                  
    368368                 $name = $GLOBALS['phpgw']->db->db_addslashes($_GET['name']); 
    369                  $GLOBALS['phpgw']->db->query('SELECT DISTINCT directory FROM phpgw_vfs WHERE (directory like \'%'.$name.'%\') LIMIT 20',__LINE__,__FILE__); 
    370                  while ($GLOBALS['phpgw']->db->next_record()){ 
     369                  
     370                 $query = 'SELECT directory,name from phpgw_vfs WHERE directory = \'/home\' and name like \'%'.$name.'%\' LIMIT 1'; 
     371                  
     372                 $GLOBALS['phpgw']->db->query($query,__LINE__,__FILE__); 
     373 
     374                while ($GLOBALS['phpgw']->db->next_record()) 
     375                { 
    371376                         $val = $GLOBALS['phpgw']->db->row(); 
    372                          echo "<option>".$val['directory']."</option>"; 
    373                  } 
    374                  $GLOBALS['phpgw']->db->query('SELECT directory,name from phpgw_vfs WHERE directory = \'/home\' and name like \'%'.$name.'%\' LIMIT 1',__LINE__,__FILE__); 
    375                  if ($GLOBALS['phpgw']->db->next_record()){ 
    376                          $val = $GLOBALS['phpgw']->db->row(); 
    377                          echo "<option>".$val['directory']."/".$val['name']."</option>"; 
    378                  } 
    379                  
    380  
     377                         $_options .= "<option>".$val['directory']."/".$val['name']."</option>"; 
     378                } 
     379 
     380                echo $_options; 
    381381        } 
    382382         
Note: See TracChangeset for help on using the changeset viewer.