Plugin Directory

Changeset 886364


Ignore:
Timestamp:
04/02/2014 03:24:22 PM (12 years ago)
Author:
pdamsten
Message:

add round patch

Location:
fullscreen-galleria
Files:
1 deleted
2 edited
13 copied

Legend:

Unmodified
Added
Removed
  • fullscreen-galleria/tags/1.4.6/galleria-fs.php

    r873216 r886364  
    55Plugin URI: http://torturedmind.org/
    66Description: Fullscreen gallery for Wordpress
    7 Version: 1.4.5
     7Version: 1.4.6
    88Author: Petri Damstén
    99Author URI: http://torturedmind.org/
     
    1212******************************************************************************/
    1313
    14 $fsg_ver = '1.4.5';
     14$fsg_ver = '1.4.6';
    1515$fsg_db_key = 'fsg_plugin_settings';
    1616
     
    410410    return $value;
    411411  } 
     412
     413  function camera_round($v, $limit)
     414  {
     415    if ($v > $limit) {
     416      return round($v, 0);
     417    } else {
     418      return round($v, 1);
     419    }
     420  }
    412421 
    413422  function camera_info($exif)
     
    445454    if (!empty($exif['FNumber'])) {
    446455      $f = $this->exifv($exif['FNumber']);
    447       $f = $f[0] / $f[1];
     456      $f = $this->camera_round($f[0] / $f[1], 10);
    448457      $f = ' and f/'.$f;
    449458    }
     
    451460      $s = $this->exifv($exif['ExposureTime']);
    452461      if ($s[0] > $s[1]) {
    453         $s = $s[0] / $s[1];
     462        $s = $this->camera_round($s[0] / $s[1], 10);
    454463      } else {
    455         $s = $s[1] / $s[0];
     464        $s = $this->camera_round($s[1] / $s[0], 5);
    456465        $s = '1/'.$s;
    457466      }
  • fullscreen-galleria/tags/1.4.6/readme.txt

    r873216 r886364  
    8787
    8888== Changelog ==
     89= 1.4.6 =
     90* round numbers. Patch from: https://gist.github.com/asquelt/9624792
     91
    8992= 1.4.5 =
    9093* fix icons
  • fullscreen-galleria/trunk/galleria-fs.php

    r873216 r886364  
    55Plugin URI: http://torturedmind.org/
    66Description: Fullscreen gallery for Wordpress
    7 Version: 1.4.5
     7Version: 1.4.6
    88Author: Petri Damstén
    99Author URI: http://torturedmind.org/
     
    1212******************************************************************************/
    1313
    14 $fsg_ver = '1.4.5';
     14$fsg_ver = '1.4.6';
    1515$fsg_db_key = 'fsg_plugin_settings';
    1616
     
    410410    return $value;
    411411  } 
     412
     413  function camera_round($v, $limit)
     414  {
     415    if ($v > $limit) {
     416      return round($v, 0);
     417    } else {
     418      return round($v, 1);
     419    }
     420  }
    412421 
    413422  function camera_info($exif)
     
    445454    if (!empty($exif['FNumber'])) {
    446455      $f = $this->exifv($exif['FNumber']);
    447       $f = $f[0] / $f[1];
     456      $f = $this->camera_round($f[0] / $f[1], 10);
    448457      $f = ' and f/'.$f;
    449458    }
     
    451460      $s = $this->exifv($exif['ExposureTime']);
    452461      if ($s[0] > $s[1]) {
    453         $s = $s[0] / $s[1];
     462        $s = $this->camera_round($s[0] / $s[1], 10);
    454463      } else {
    455         $s = $s[1] / $s[0];
     464        $s = $this->camera_round($s[1] / $s[0], 5);
    456465        $s = '1/'.$s;
    457466      }
  • fullscreen-galleria/trunk/readme.txt

    r873216 r886364  
    8787
    8888== Changelog ==
     89= 1.4.6 =
     90* round numbers. Patch from: https://gist.github.com/asquelt/9624792
     91
    8992= 1.4.5 =
    9093* fix icons
Note: See TracChangeset for help on using the changeset viewer.