Plugin Directory

Changeset 1456634


Ignore:
Timestamp:
07/18/2016 10:02:23 PM (10 years ago)
Author:
kosinix
Message:

To trunk version 2.12.3

Location:
cyclone-slider-2/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cyclone-slider-2/trunk/README.txt

    r1456331 r1456634  
    118118
    119119== Changelog ==
     120
     121= 2.12.3 - 2016-07-19 =
     122* Fix for require_once not finding relative paths and fatal error when saving non image slides.
    120123
    121124= 2.12.2 - 2016-07-18 =
  • cyclone-slider-2/trunk/cyclone-slider.php

    r1456331 r1456634  
    44Plugin URI: http://www.codefleet.net/cyclone-slider-2/
    55Description: Create and manage sliders with ease. Built for both casual users and developers.
    6 Version: 2.12.2
     6Version: 2.12.3
    77Author: Nico Amarilla
    88Author URI: http://www.codefleet.net/
     
    255255    }
    256256
    257     $object = new CycloneSlider_ImageResizer( $plugin['image_sizes'], $plugin['image_editor'] );
     257    $object = new CycloneSlider_ImageResizer( $plugin['image_sizes'], $plugin['image_editor'], $plugin['path'] );
    258258    return $object;
    259259}
  • cyclone-slider-2/trunk/src/CycloneSlider/ImageResizer.php

    r1456331 r1456634  
    44*/
    55class CycloneSlider_ImageResizer {
    6    
     6
    77    protected $image_sizes;
    88    protected $image_editor;
    9    
    10     public function __construct( $image_sizes, $image_editor ){
    11         $this->image_sizes = $image_sizes;
     9    protected $path;
     10
     11    public function __construct( $image_sizes, $image_editor, $path ){
     12        $this->image_sizes = $image_sizes;
    1213        $this->image_editor = $image_editor;
    13     }
     14        $this->path = $path;
     15    }
    1416
    1517    /**
     
    102104        if(version_compare(PHP_VERSION, '5.3', '>=')){
    103105
    104             require_once '../code-5.3.php'; // Hack. This code is not placed here but in an external file to prevent PHP from parsing the code in versions below 5.3.0 despite the if..else check. See http://stackoverflow.com/questions/17275557/run-a-conditional-using-php-version
     106            require_once $this->path.'src/code-5.3.php'; // Hack. This code is not placed here but in an external file to prevent PHP from parsing the code in versions below 5.3.0 despite the if..else check. See http://stackoverflow.com/questions/17275557/run-a-conditional-using-php-version
    105107
    106108        } else {
     
    114116                $image->save( $image_file_dest, $resize_quality );
    115117
    116                 return true;
     118
    117119            }
    118120            return false;
    119121        }
    120 
     122        return true;
    121123    }
    122124   
  • cyclone-slider-2/trunk/src/code-5.3.php

    r1456331 r1456634  
    11<?php
    22// Used in ImageResizer
    3 $editor = \CycloneSlider\Grafika\Grafika::createEditor();
    4 $editor->open( $image_file );
    5 if('fill'==$resize_option){
    6     $editor->resizeFill( $width, $height );
    7 } else if('crop'==$resize_option){
    8     $editor->crop( $width, $height );
    9 } else if('exact'==$resize_option){
    10     $editor->resizeExact( $width, $height );
    11 } else if('exactHeight'==$resize_option){
    12     $editor->resizeExactHeight( $height );
    13 } else if('exactWidth'==$resize_option){
    14     $editor->resizeExactWidth( $width );
    15 } else {
    16     $editor->resizeFit( $width, $height );
     3try {
     4    $editor = \CycloneSlider\Grafika\Grafika::createEditor();
     5    $editor->open($image_file);
     6    if ('fill' == $resize_option) {
     7        $editor->resizeFill($width, $height);
     8    } else if ('crop' == $resize_option) {
     9        $editor->crop($width, $height);
     10    } else if ('exact' == $resize_option) {
     11        $editor->resizeExact($width, $height);
     12    } else if ('exactHeight' == $resize_option) {
     13        $editor->resizeExactHeight($height);
     14    } else if ('exactWidth' == $resize_option) {
     15        $editor->resizeExactWidth($width);
     16    } else {
     17        $editor->resizeFit($width, $height);
     18    }
     19    $editor->save($image_file_dest, null, $resize_quality);
     20    return true;
     21} catch (Exception $e){
     22    return false;
    1723}
    18 $editor->save( $image_file_dest, null, $resize_quality );
    19 
    20 return true;
Note: See TracChangeset for help on using the changeset viewer.