Ignore:
Timestamp:
08/22/11 10:00:54 (13 years ago)
Author:
fernando-alberto
Message:

Ticket #1269 - Mergiando revisoes do branch22 de rev4876 ate rev4971

Location:
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/after_upload.php

    r3610 r4972  
    2121include_once("../../header.inc.php"); 
    2222 
     23 
     24function convert_char( $String ) 
     25{ 
     26                $String = trim( str_replace( "\'", "", $String) ); 
     27                $String = str_replace( "'", "", $String ); 
     28                $String = str_replace( "ç", "c", $String ); 
     29                $String = str_replace( "Ç", "C", $String ); 
     30                $String = ereg_replace( "[áàâã]", "a", $String ); 
     31                $String = ereg_replace( "[ÁÀÂÃ]", "A", $String ); 
     32                $String = ereg_replace( "[éÚê]", "e", $String ); 
     33                $String = ereg_replace( "[ÉÈÊ]", "E", $String ); 
     34                $String = ereg_replace( "[íìîï]", "i", $String ); 
     35                $String = ereg_replace( "[ÍÌÎ]", "I", $String ); 
     36                $String = ereg_replace( "[óòÎõ]", "o", $String ); 
     37                $String = ereg_replace( "[ÓÒÔÕ]", "O", $String ); 
     38                $String = ereg_replace( "[úùû]", "u", $String ); 
     39                $String = ereg_replace( "[ÚÙÛ]", "U", $String ); 
     40                 
     41                return $String; 
     42} 
     43 
    2344$bo = CreateObject('filemanager.bofilemanager'); 
    2445 
    25 foreach ($files as $f) { 
    26                 if ($bo->vfs->cp(array( 
    27                         'from'=> $f['fullName'], 
    28                         'to'=> $f['name'], 
    29                         'relatives'     => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 
    30                 ))) 
     46foreach ($files as $f) 
     47{ 
     48        $newName = convert_char( $f['name'] ); 
     49         
     50        $_array = array( 
     51                        'from'          => $f['fullName'], 
     52                        'to'            => $newName, 
     53                        'relatives'     => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 
     54        ); 
     55         
     56        if ( $bo->vfs->cp($_array) ) 
     57        { 
     58                $bo->vfs->set_attributes(array( 
     59                        'string'                => $newName, 
     60                        'relatives'             => array( RELATIVE_ALL ), 
     61                        'attributes'    => array( 'mime_type' => $f['mimetype'] ) 
     62                )); 
     63                 
     64                $fullName = $f['fullName']; 
     65                 
     66                if( file_exists($fullName) ) 
    3167                { 
    32                                 $bo->vfs->set_attributes(array( 
    33                                 'string'=> $f['name'], 
    34                                 'relatives'     => array(RELATIVE_ALL), 
    35                                 'attributes'=> array( 
    36                                 'mime_type' => $f['mimetype'] 
    37                                 ) 
    38                         )); 
    39                         exec("rm -f ".escapeshellcmd(escapeshellarg($f['fullName']))); 
     68                        exec("rm -f ".escapeshellcmd(escapeshellarg($fullName))); 
    4069                } 
     70        } 
    4171} 
    4272 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/class.uifilemanager.inc.php

    r4228 r4972  
    582582                $return['files'] = $output; 
    583583                $return['quota']['quotaSize'] = ($quota * 1024 * 1024); 
     584                //echo serialize(htmlspecialchars_decode(htmlentities($return))); 
    584585                echo serialize($return); 
    585586        } 
     
    609610                        $return[] = $dir['directory'] . $dir['name']; 
    610611                sort(&$return, SORT_STRING); 
     612 
    611613                echo serialize($return); 
    612614        } 
     
    752754        } 
    753755 
    754         function createdir() { 
     756        function createdir() 
     757        { 
    755758                if ($this->bo->badchar = $this->bo->bad_chars($this->filename, True, True)) { 
    756759                        echo lang('Error:') . $this->bo->html_encode(lang('Directory names cannot contain "%1"', $badchar), 1); 
     
    771774                $fileinfo = $ls_array[0]; 
    772775 
    773                 if ($fileinfo['name']) { 
     776                if ($fileinfo['name']) 
     777                { 
    774778                        if ($fileinfo['mime_type'] != 'Directory') { 
    775779                                echo lang('Error:') . lang('%1 already exists as a file', $fileinfo['name']); 
     
    777781                                echo lang('Error:') . lang('Directory %1 already exists', $fileinfo['name']); 
    778782                        } 
    779                 } else { 
     783                } 
     784                else 
     785                { 
    780786                        $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 
    781787 
    782                         if ($this->bo->vfs->mkdir(array('string' => $this->filename))) { 
    783                                 echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 
    784                         } else { 
     788                        if ($this->bo->vfs->mkdir(array('string' => $this->filename))) 
     789                        { 
     790                                echo "True"; 
     791                                //echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 
     792                        } 
     793                        else 
     794                        { 
    785795                                echo lang('Error:') . lang('Could not create %1', $this->disppath . '/' . $this->filename); 
    786796                        } 
    787797                } 
    788                 echo lang('Directory created'); 
     798                 
    789799        } 
    790800 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/load_lang.php

    r3873 r4972  
    2525        } 
    2626         
    27         echo "var array_lang = new Array(); \n$script"; 
     27        echo "var array_lang = new Array();\n{$script}"; 
    2828         
    2929?> 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/upload.php

    r3897 r4972  
    3333$path                                   = $_POST['path']; 
    3434$notifUser                              = $_POST['notifTo']; 
    35 $show_upload_boxes      = count($_FILES['upload_file']['name']); 
    36 $filesUpload                            = $_FILES['upload_file']; 
     35$show_upload_boxes              = count($_FILES['upload_file']['name']); 
     36$filesUpload                    = $_FILES['upload_file']; 
    3737 
    3838function create_summaryImage($file) 
     
    121121                { 
    122122                        $badchar = $bo->bad_chars( $_FILES['upload_file']['name'][$i], True, True ); 
    123                          
     123 
    124124                        if( $badchar ) 
    125125                        { 
     
    165165                                $bo->vfs->cp($tmp_arr); 
    166166                                $tmp_arr=array( 
    167                                                 'string'=> $_FILES['upload_file']['name'][$i], 
    168                                                 'relatives'     => array(RELATIVE_ALL), 
     167                                                'string'                => $_FILES['upload_file']['name'][$i], 
     168                                                'relatives'             => array(RELATIVE_ALL), 
    169169                                                'attributes'    => array( 
    170                                                         'owner_id' => $bo->userinfo['username'], 
    171                                                         'modifiedby_id' => $bo->userinfo['username'], 
    172                                                         'size' => $_FILES['upload_file']['size'][$i], 
    173                                                         'mime_type' => $_FILES['upload_file']['type'][$i], 
    174                                                         'deleteable' => 'Y', 
    175                                                         'comment' => stripslashes($_POST['upload_comment'][$i]) 
     170                                                'owner_id'              => $bo->userinfo['username'], 
     171                                                'modifiedby_id' => $bo->userinfo['username'], 
     172                                                'size'                  => $_FILES['upload_file']['size'][$i], 
     173                                                'mime_type'             => $_FILES['upload_file']['type'][$i], 
     174                                                'deleteable'    => 'Y', 
     175                                                'comment'               => stripslashes($_POST['upload_comment'][$i]) 
    176176                                        ) 
    177177                                ); 
     
    191191                                ))) 
    192192                                { 
    193                                         $bo->vfs->set_attributes(array( 
     193                                $bo->vfs->set_attributes(array( 
    194194                                                        'string'                => $_FILES['upload_file']['name'][$i], 
    195195                                                        'relatives'     => array(RELATIVE_ALL), 
    196196                                                        'attributes'    => array( 
    197                                                                 'mime_type'     => $_FILES['upload_file']['type'][$i], 
    198                                                                 'comment'       => stripslashes($_POST['upload_comment'][$i]) 
     197                                                        'mime_type'     => $_FILES['upload_file']['type'][$i], 
     198                                                        'comment'       => stripslashes($_POST['upload_comment'][$i]) 
    199199                                                        ) 
    200200                                        )); 
     
    218218                        $bo->vfs->set_attributes(array( 
    219219                                        'string'                => $_FILES['upload_file']['name'][$i], 
    220                                         'relatives'     => array(RELATIVE_ALL), 
     220                                        'relatives'             => array(RELATIVE_ALL), 
    221221                                        'attributes'    => array( 
    222                                                                                 'mime_type'     => $_FILES['upload_file']['type'][$i], 
    223                                                                                 'comment'       => stripslashes($_POST['upload_comment'][$i]) 
     222                                        'mime_type'     => $_FILES['upload_file']['type'][$i], 
     223                                        'comment'       => stripslashes($_POST['upload_comment'][$i]) 
    224224                                        ) 
    225225                        )); 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/uploadApp.php

    r3894 r4972  
    3434                                                        'maxFileSize'           => $maxFileSize, 
    3535                                                        'maxChunkSize'          => $maxChunkSize, 
    36                                                         'archive'                               => '../tp/juploader/wjhk.jupload.jar', 
    37                                                         'afterUploadURL'                => 'after_upload.php', 
     36                                                        'archive'                       => '../tp/juploader/wjhk.jupload.jar', 
     37                                                        'afterUploadURL'        => 'after_upload.php', 
    3838                                                        'sendMD5Sum'            => 'true', 
    39                                                         'showLogWindow' => 'false', 
    40                                                         'debugLevel'                    => 0  
     39                                                        'showLogWindow'         => 'false', 
     40                                                        'debugLevel'            => 0  
    4141                                                ); 
    4242 
    4343$classParameters = array( 
    44                                                         'demo_mode'     => false, 
     44                                                        'demo_mode'             => false, 
    4545                                                        'allow_subdirs' => true, 
    46                                                         'destdir'                       => '/tmp'  //Where to store the files on the webserver  
     46                                                        'destdir'               => '/tmp'  //Where to store the files on the webserver  
    4747                                                ); 
    4848 
Note: See TracChangeset for help on using the changeset viewer.