Changeset 1823


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

Ticket #597 - Melhorias no modulo gerenciador de arquivos

Location:
sandbox/filemanager
Files:
3 edited

Legend:

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

    r1791 r1823  
    144144                         $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['dir'])); 
    145145                         $size = ($_GET['val'])*1; 
    146                          $GLOBALS['phpgw']->db->query('UPDATE phpgw_vfs_quota SET quota_size = '.$size.' WHERE directory = \''.$name.'\'',__LINE__,__FILE__); 
    147                          if ($GLOBALS['phpgw']->db->Error) 
    148                                  echo "Erro"; 
     146 
     147                         /* See if quota exists or not */ 
     148                         $query = "SELECT count(directory) FROM phpgw_vfs_quota WHERE directory = '".$name."' LIMIT 1"; 
     149                         if ($GLOBALS['phpgw']->db->query($query) && $GLOBALS['phpgw']->db->next_record()) 
     150                                 $val = $GLOBALS['phpgw']->db->row(); 
    149151                         else 
    150                                  echo lang('entry updated sucessfully'); 
     152                         { 
     153                                 echo $GLOBALS['phpgw']->db->error; 
     154                                 return false; 
     155                         } 
     156                         if ($val['count'] == '1') 
     157                         { 
     158                                 $GLOBALS['phpgw']->db->query('UPDATE phpgw_vfs_quota SET quota_size = '.$size.' WHERE directory = \''.$name.'\'',__LINE__,__FILE__); 
     159                                 if ($GLOBALS['phpgw']->db->Error) 
     160                                         echo "Erro"; 
     161                                 else 
     162                                         echo lang('entry updated sucessfully'); 
     163                         } 
     164                         else 
     165                         { 
     166                                 /*preferences does not exist*/ 
     167                                 $query = "INSERT INTO phpgw_vfs_quota values ('".$name."',".$size.")"; 
     168                                 if (!$GLOBALS['phpgw']->db->query($query)) 
     169                                         echo $GLOBALS['phpgw']->db->error; 
     170                                 else 
     171                                         echo lang('entry updated sucessfully'); 
     172                         } 
    151173                         return;  
    152  
    153174                 } 
    154175                 function load_quota(){ 
  • sandbox/filemanager/js/common_functions.js

    r1812 r1823  
    359359        var response = unserialize(data); 
    360360        if (response[0] == "Ok") 
    361                 write_msg('All files created sucessfuly'); 
     361                write_msg(get_lang('All files created sucessfuly')); 
    362362        else 
    363363                for (var i=0;i < response.length; i++) 
Note: See TracChangeset for help on using the changeset viewer.