Changeset 10157 for trunk/admin


Ignore:
Timestamp:
Apr 8, 2011, 11:09:13 AM (13 years ago)
Author:
mistic100
Message:

bug:1791 display hd dimensions instead of websize dimensions

Location:
trunk/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_upload.inc.php

    r9952 r10157  
    348348      $update['has_high'] = 'true';
    349349      $update['high_filesize'] = $high_infos['filesize'];
     350      $update['high_width'] = $high_infos['width'];
     351      $update['high_height'] = $high_infos['height'];
    350352    }
    351353    else
     
    353355      $update['has_high'] = 'false';
    354356      $update['high_filesize'] = null;
     357      $update['high_width'] = null;
     358      $update['high_height'] = null;
    355359    }
    356360
     
    388392      $insert['has_high'] = 'true';
    389393      $insert['high_filesize'] = $high_infos['filesize'];
     394      $insert['high_width'] = $high_infos['width'];
     395      $insert['high_height'] = $high_infos['height'];
    390396    }
    391397
  • trunk/admin/site_reader_local.php

    r8728 r10157  
    155155  global $conf;
    156156
    157   $update_fields = array('filesize', 'width', 'height', 'high_filesize');
     157  $update_fields = array('filesize', 'width', 'height', 'high_filesize', 'high_width', 'high_height');
    158158
    159159  if ($conf['use_exif'])
     
    200200  {
    201201    $high_file = dirname($file).'/pwg_high/'.basename($file);
    202 
    203202    $data['high_filesize'] = floor(filesize($high_file)/1024);
     203   
     204    if ($high_size = @getimagesize($high_file))
     205    {
     206      $data['high_width'] = $high_size[0];
     207      $data['high_height'] = $high_size[1];
     208    }
    204209  }
    205210
  • trunk/admin/site_reader_remote.php

    r8728 r10157  
    4444    );
    4545  $this->metadata_attributes = array(
    46     'filesize', 'width', 'height', 'high_filesize'
     46    'filesize', 'width', 'height', 'high_filesize', 'high_width', 'high_height',
    4747    );
    4848
Note: See TracChangeset for help on using the changeset viewer.