Changeset 1838


Ignore:
Timestamp:
12/15/09 12:31:37 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria do FM, Imagem padrão ao buscar thumbnail

Location:
sandbox/filemanager
Files:
1 added
2 edited

Legend:

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

    r1829 r1838  
    224224                                header("Pragma: public"); 
    225225                                header("Expires: ".gmdate('D, d M Y H:i:s', time()+$expires)); 
    226                                 echo $this->bo->vfs->summary(array('path' => $this->path, 
     226                                $content = $this->bo->vfs->summary(array('path' => $this->path, 
    227227                                        'string' => $this->file 
    228228                                )); 
     229                                if (sizeof($content) > 0) 
     230                                        echo $content; 
     231                                else 
     232                                { 
     233                                        $filename = './filemanager/templates/default/images/error.gif'; 
     234                                        $handle = fopen($filename,'rb'); 
     235                                        echo fread($handle,filesize($filename)); 
     236                                        fclose($handle); 
     237                                } 
     238 
    229239                                $GLOBALS['phpgw']->common->phpgw_exit(); 
    230240                        } 
  • sandbox/filemanager/inc/upload.php

    r1829 r1838  
    3636                break; 
    3737        default: 
    38                 return; 
     38                return false; 
    3939        } 
    4040        $max_resolution = 48; 
     
    149149                                        { 
    150150                                                $content = create_summaryImage($_FILES['upload_file']['tmp_name'][$i]); 
    151                                                 $bo->vfs->set_summary(array( 
    152                                                 'string'=> $_FILES['upload_file']['name'][$i], 
    153                                                 'relatives' => array(RELATIVE_ALL), 
    154                                                 'summary'=> $content 
    155                                         )); 
     151                                                if ($content){ 
     152                                                        $bo->vfs->set_summary(array( 
     153                                                        'string'=> $_FILES['upload_file']['name'][$i], 
     154                                                        'relatives' => array(RELATIVE_ALL), 
     155                                                        'summary'=> $content 
     156                                                        )); 
     157                                                } 
     158 
    156159                                        } 
    157160                                } 
Note: See TracChangeset for help on using the changeset viewer.