Changeset 3896


Ignore:
Timestamp:
03/23/11 17:29:14 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #1648 - Erro no upload do arquivo, caso ja exista um arquivo com o mesmo nome.

Location:
branches/2.2/filemanager
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/filemanager/inc

    • Property svn:ignore set to
      .uploadApp.php.swp
      .setFileMaxSize.php.swp
      setFileMaxSize.php
  • branches/2.2/filemanager/inc/upload.php

    r3889 r3896  
    1111                 'max_postsize' => ini_get( 'post_max_size' ) 
    1212        ) ); 
     13 
    1314        exit; 
    1415} 
     
    154155                        if($fileinfo['name'] && $fileinfo['deleteable'] != 'N') 
    155156                        { 
     157                                $FILE_ORIGINAL = $_FILES['upload_file']['name'][$i]; 
    156158                                $_FILES['upload_file']['name'][$i] = date('Ymd-H:i')."-".$_FILES['upload_file']['name'][$i]; 
    157159                                $tmp_arr=array( 
     
    178180                                $return[] = array( 
    179181                                                                "file"          => $_FILES['upload_file']['name'][$i],                                                                   
    180                                                                 "undefined"     => lang( "There is a file %1, that was not replaced", $_FILES['upload_file']['name'][$i] ) 
     182                                                                "undefined"     => lang( "There is a file %1, that was not replaced", $FILE_ORIGINAL ) 
    181183                                ); 
    182184                        } 
     
    238240                } 
    239241        } 
    240          
    241         //error_log(print_r($return, true), 3, "/tmp/log"); 
    242242} 
    243243 
  • branches/2.2/filemanager/js/handler.js

    r3889 r3896  
    240240                { 
    241241                        /* 
    242                          *  
    243242                         * response['postize'] = ERRO POST; 
    244243                         * response['max_postsize] = diretiva do PHP para POST_MAX_SIZE; 
    245                          *  
    246244                         */  
    247245                         
     
    262260                                                if( response[i]['file'].toUpperCase() === _inputs[j].value.toUpperCase() && _indexOf > -1 ) 
    263261                                                {        
    264                                                         _inputs[j].setAttribute("erroUpload", "true"); 
     262                                                        _inputs[j].parentNode.setAttribute("erroUpload", "true"); 
    265263                                                         
    266264                                                        var _parent     = _inputs[j].parentNode; 
     
    300298                                                        } 
    301299                                                } 
     300                                                else 
     301                                                { 
     302                                                        write_msg( response[i]['undefined'] ); 
     303                                                        _winBuild( "dwindownewUpload" , "remove" );      
     304                                                } 
    302305                                        } 
    303306                                }        
     
    306309                        for( var j = 0 ; j < _inputs.length ; j++ ) 
    307310                        {        
    308                                 if ( !_inputs[j].getAttribute("erroUpload") && _inputs[j].getAttribute('type') == "file" ) 
     311                                if ( !_inputs[j].parentNode.getAttribute("erroUpload") && _inputs[j].getAttribute('type') == "file" ) 
    309312                                { 
    310313                                        _inputs[j].parentNode.parentNode.removeChild( _inputs[j].parentNode ); 
     314                                        j--; 
    311315                                } 
    312                         } 
     316                        }                        
    313317                } 
    314318                else 
  • branches/2.2/filemanager/setup/phpgw_pt-br.lang

    r3889 r3896  
    221221The file can be accessed by: %1 filemanager     pt-br   O arquivo pode ser acessado pelo endere&ccedil;o: %1 
    222222The following addresses will be notified        filemanager     pt-br   Os endereços abaixo serão notificados 
     223There is a file %1, that was not replaced       filemanager     pt-br   Há um arquivo %s1, que não foi substituído 
    223224Users and groups        filemanager     pt-br   Usuários e grupos 
    224225Send Notification email to:     filemanager     pt-br   Enviar email de notificação para: 
  • branches/2.2/filemanager/tp/expressowindow/xsl/upload.xsl

    r3881 r3896  
    3838                                        </span> 
    3939                                        <br/> 
    40                                         <div id="uploadOption" > 
     40                                        <div id="uploadOption" /> 
     41                                        <div>  
    4142                                                <div></div> 
    4243                                                <input maxlength="255" name="upload_file[]" type="file" style="margin-right:5px" /> 
Note: See TracChangeset for help on using the changeset viewer.