Changeset 9771


Ignore:
Timestamp:
Mar 19, 2011, 1:31:06 PM (10 years ago)
Author:
patdenice
Message:

Add orientation parameter for ratio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/square_thumbnails/trunk/functions.inc.php

    r9770 r9771  
    298298
    299299  if (!isset($conf['thumbnails_ratio']) or !preg_match('/^\d+:\d+$/', $conf['thumbnails_ratio']))
    300   {
    301300    $conf['thumbnails_ratio'] = '1:1';
    302   }
     301
     302  if (!isset($conf['thumbnails_ratio_orientation']))
     303    $conf['thumbnails_ratio_orientation'] = true;
    303304
    304305  $x = 0;
    305306  $y = 0;
    306307
    307   if ($source_width >= $source_height)
     308  if ($source_width >= $source_height or !$conf['thumbnails_ratio_orientation'])
    308309    list($widthRatio, $heightRatio) = explode(':', $conf['thumbnails_ratio']);
    309310  else
Note: See TracChangeset for help on using the changeset viewer.