Changeset 4317 in subversion


Ignore:
Timestamp:
Dec 7, 2010 5:33:01 PM (2 years ago)
Author:
thomasb
Message:

Little corrections and improvements

Location:
branches/devel-addressbook
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-addressbook/config/main.inc.php.dist

    r4314 r4317  
    293293$rcmail_config['im_convert_path'] = null; 
    294294 
    295 // maximum size of uploaded contact photos 
     295// maximum size of uploaded contact photos in pixel 
    296296$rcmail_config['contact_photo_size'] = 160; 
    297297 
  • branches/devel-addressbook/program/include/rcmail.php

    r4314 r4317  
    13591359   * @param $cmd Format string with {keywords} to be replaced 
    13601360   * @param $values (zero, one or more arrays can be passed) 
    1361    * @return output of command. shell errors not detectable, see error_log in /www/server/logs 
     1361   * @return output of command. shell errors not detectable 
    13621362   */ 
    13631363  public static function exec(/* $cmd, $values1 = array(), ... */) 
  • branches/devel-addressbook/program/steps/addressbook/save.inc

    r4314 r4317  
    66 |                                                                       | 
    77 | This file is part of the Roundcube Webmail client                     | 
    8  | Copyright (C) 2005-2009, Roundcube Dev. - Switzerland                 | 
     8 | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland                 | 
    99 | Licensed under the GNU GPL                                            | 
    1010 |                                                                       | 
     
    3737 
    3838    if ($filepath = $_FILES['_photo']['tmp_name']) { 
    39         // TODO: check file type and resize image 
     39        // check file type and resize image 
    4040        $imageprop = rcmail::imageprops($_FILES['_photo']['tmp_name']); 
    4141         
    4242        if ($imageprop['width'] && $imageprop['height']) { 
    43             $maxsize = $RCMAIL->config->get('contact_photo_size', 160); 
     43            $maxsize = intval($RCMAIL->config->get('contact_photo_size', 160)); 
    4444            $tmpfname = tempnam($RCMAIL->config->get('temp_dir'), 'rcmImgConvert'); 
    4545            $save_hook = 'attachment_upload'; 
     
    5757                'size' => $_FILES['_photo']['size'], 
    5858                'name' => $_FILES['_photo']['name'], 
    59                 'mimetype' => rc_mime_content_type($filepath, $_FILES['_photo']['name'], 'image/' . $imageprop['type']) 
     59                'mimetype' => 'image/' . $imageprop['type'], 
    6060            )); 
    6161        } 
  • branches/devel-addressbook/program/steps/addressbook/show.inc

    r4314 r4317  
    4747    if (preg_match('/^\x89\x50\x4E\x47/', $data))      $type = 'png'; 
    4848    else if (preg_match('/^\x47\x49\x46\x38/', $data)) $type = 'gif'; 
     49    else if (preg_match('/^\x00\x00\x01\x00/', $data)) $type = 'ico'; 
    4950//  else if (preg_match('/^\xFF\xD8\xFF\xE0/', $data)) $type = 'jpeg'; 
    5051     
  • branches/devel-addressbook/skins/default/functions.js

    r4314 r4317  
    8989    // toggle: #1486823, #1486930 
    9090    uploadmenu:     {id:'attachment-form', editable:1, above:1, toggle:!bw.ie&&!bw.linux }, 
    91     uploadform:     {id:'upload-form', editable:1, toggle:true} 
     91    uploadform:     {id:'upload-form', editable:1, toggle:!bw.ie&&!bw.linux } 
    9292  }; 
    9393 
Note: See TracChangeset for help on using the changeset viewer.