Skip to content

Commit

Permalink
Merge pull request ezsystems#21 from fwoldt/patch_mixed_line_ending
Browse files Browse the repository at this point in the history
Fix EZP-29590: File has mixed line endings; this may cause incorrect results
  • Loading branch information
andrerom committed Sep 7, 2018
2 parents 125ebb3 + 7483b59 commit 08ccd64
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions classes/image_analyzer.php
@@ -1,55 +1,55 @@
<?php
/**
* File containing the eZIEImageAnalyzer class
* This class overrides ezcImageAnalyzer in order to support the ezpublish cluster constraints
*
<?php
/**
* File containing the eZIEImageAnalyzer class
* This class overrides ezcImageAnalyzer in order to support the ezpublish cluster constraints
*
* @copyright Copyright (C) eZ Systems AS.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
* @package ezie
*/
class eZIEImageAnalyzer extends ezcImageAnalyzer
{
protected $deleteLocal = true;

/**
* Constructor overload
* Creates a local copy of the image so that it can be analyzed
*
* @param string $file
*/
public function __construct( $file, $deleteLocal = true )
{
$clusterHandler = eZClusterFileHandler::instance( $file );
$clusterHandler->fetch();

parent::__construct( $file );

$this->deleteLocal = $deleteLocal;
if( $this->deleteLocal )
{
$clusterHandler->deleteLocal();
}
}

/**
* Overload of ezcImageAnalyzer::analyzeImage()
* Creates a temporary local copy of the image file so that it can be analyzed
*
* @return void
*/
public function analyzeImage()
{
$clusterHandler = eZClusterFileHandler::instance( $this->filePath );
$clusterHandler->fetch();

parent::analyzeImage();

if( $this->deleteLocal )
{
$clusterHandler->deleteLocal();
}
}
}

* @version //autogentag//
* @package ezie
*/
class eZIEImageAnalyzer extends ezcImageAnalyzer
{
protected $deleteLocal = true;

/**
* Constructor overload
* Creates a local copy of the image so that it can be analyzed
*
* @param string $file
*/
public function __construct( $file, $deleteLocal = true )
{
$clusterHandler = eZClusterFileHandler::instance( $file );
$clusterHandler->fetch();

parent::__construct( $file );

$this->deleteLocal = $deleteLocal;
if( $this->deleteLocal )
{
$clusterHandler->deleteLocal();
}
}

/**
* Overload of ezcImageAnalyzer::analyzeImage()
* Creates a temporary local copy of the image file so that it can be analyzed
*
* @return void
*/
public function analyzeImage()
{
$clusterHandler = eZClusterFileHandler::instance( $this->filePath );
$clusterHandler->fetch();

parent::analyzeImage();

if( $this->deleteLocal )
{
$clusterHandler->deleteLocal();
}
}
}

?>

0 comments on commit 08ccd64

Please sign in to comment.