Ignore:
Timestamp:
11/23/09 10:58:52 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhorias no módulo gerenciados de arquivos

File:
1 edited

Legend:

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

    r1693 r1694  
    5454                var $current_config; 
    5555                var $goto_x; 
    56                 var $todir; 
     56                var $to; 
    5757                var $changedir; // for switching dir. 
    5858                var $cdtodir; // for switching dir. 
     
    7979                var $file; // FIXME WHERE IS THIS FILLED? 
    8080                var $sortby; 
    81                 var $messages = array(); 
     81                var $messages; 
    8282                var $show_upload_boxes; 
    8383 
     
    8686                function uifilemanager() 
    8787                { 
    88                         //                      error_reporting(8); 
     88                        $this->messages = &$_SESSION['phpgw_info']['filemanager']['user']['messages']; 
     89 
    8990                        $GLOBALS['phpgw']->browser = CreateObject('phpgwapi.browser'); 
    9091 
     
    124125                                'sortby'        => array('sortby' => ''), 
    125126                                'messages'      => array('messages'     => ''), 
    126                                 'show_upload_boxes'     => array('show_upload_boxes' => '') 
     127                                'show_upload_boxes'     => array('show_upload_boxes' => ''), 
     128                                'to' => array('to' => '') 
     129 
    127130                        ); 
    128131 
     
    591594                                        foreach($this->messages as $msg) 
    592595                                        { 
    593                                                 $messages.='<p>'.$msg.'</p>'; 
    594                                         } 
    595                                 } 
    596  
     596                                                $messages.='<span>'.$msg.'</span>'; 
     597                                        } 
     598                                } 
     599                                $this->messages = NULL; 
     600                                 
    597601                                $vars[messages]=$messages; 
    598602 
     
    696700                                                } 
    697701                                                $link=$this->encode_href('/index.php','menuaction=filemanager.vfs_functions.setRestricted','file='.$files['name'].'&path='.$this->path); 
    698                                                 $minibar_data = '<img id="restrict_'.$files['name'].'" onClick="cExecute(\''.$link.'\',setRestricted)" alt="'.lang("mark as restricted").'" title="'.lang("mark as restricted").'" src="'.$image.'">'; 
     702                                                $minibar_data = '<img id="restrict_'.$files['name'].'" onClick="setRestricted(\''.$link.'\')" alt="'.lang("mark as restricted").'" title="'.lang("mark as restricted").'" src="'.$image.'">'; 
    699703                                        } 
    700704 
     
    11021106                function moveTo() 
    11031107                { 
    1104                         if(!$this->todir) 
     1108                        if(!$this->to) 
    11051109                        { 
    11061110                                $this->messages[] = lang('Error:').lang('Could not move file because no destination directory is given ', $this->disppath.'/'.$file); 
     
    11141118                                        if($this->bo->vfs->mv(array( 
    11151119                                                'from'  => $file, 
    1116                                                 'to'    => $this->todir . '/' . $file, 
     1120                                                'to'    => $this->to . '/' . $file, 
    11171121                                                'relatives'     => array(RELATIVE_ALL, RELATIVE_NONE) 
    11181122                                        ))) 
    11191123                                        { 
    11201124                                                $moved++; 
    1121                                                 $this->messages[]=lang('Moved %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 
     1125                                                $this->messages[]=lang('Moved %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file); 
    11221126                                        } 
    11231127                                        else 
    11241128                                        { 
    1125                                                 $this->messages[] = lang('Error:').lang('Could not move %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 
     1129                                                $this->messages[] = lang('Error:').lang('Could not move %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file); 
    11261130                                        } 
    11271131                                } 
     
    11401144                function copyTo() 
    11411145                { 
    1142                         if(!$this->todir) 
     1146                        if(!$this->to) 
    11431147                        { 
    11441148                                $this->messages[] = lang('Error:').lang('Could not copy file because no destination directory is given ', $this->disppath.'/'.$file); 
     
    11511155                                        if($this->bo->vfs->cp(array( 
    11521156                                                'from'  => $file, 
    1153                                                 'to'    => $this->todir . '/' . $file, 
     1157                                                'to'    => $this->to . '/' . $file, 
    11541158                                                'relatives'     => array(RELATIVE_ALL, RELATIVE_NONE) 
    11551159                                        ))) 
    11561160                                        { 
    11571161                                                $copied++; 
    1158                                                 $this->messages[] = lang('Copied %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 
     1162                                                $this->messages[] = lang('Copied %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file); 
    11591163                                        } 
    11601164                                        else 
    11611165                                        { 
    1162                                                 $this->messages[] = lang('Error:').lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 
     1166                                                $this->messages[] = lang('Error:').lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file); 
    11631167                                        } 
    11641168                                } 
     
    15311535                                        return; 
    15321536                                } 
    1533                                 $_SESSION['debug'][] = $ls_array; 
    15341537                                if($ls_array[0]['mime_type']) 
    15351538                                { 
Note: See TracChangeset for help on using the changeset viewer.