Skip to content

Commit

Permalink
Fix phpThumb 3rd party library to find real image file, bad routine u…
Browse files Browse the repository at this point in the history
…sed to locate absolute path [#388]
  • Loading branch information
dleffler committed Nov 3, 2011
1 parent 46ee9df commit a7550d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion external/ExtPrograms.csv
Expand Up @@ -6,7 +6,7 @@ ups-php,0.2,code.google.com/p/ups-php,0.2,
fedex-php,9.0.0,,,
swfobject,2.2,code.google.com/p/swfobject,2.2,
Smarty,3.1.4,smarty.net,3.1.4,
phpthumb,1.7.9,phpthumb.sourceforge.net,1.7.9,phpThumb.config.php - we set the cache folder
phpthumb,1.7.11,phpthumb.sourceforge.net,1.7.11,phpThumb.config.php - we set the cache folder
minify,2.1.3,github.com/mrclay/minify,2.1.4beta,
YUI2,2.9.0,developer.yahoo.com/yui/2,2.9.0,
YUI3,3.4.0,developer.yahoo.com/yui/3,3.4.1,
Expand Down
6 changes: 3 additions & 3 deletions external/phpThumb/phpthumb.class.php
Expand Up @@ -1068,8 +1068,8 @@ function ResolveFilenameToAbsolute($filename) {
} else {

// relative to current directory (any OS)
//$AbsoluteFilename = $this->config_document_root.preg_replace('#[/\\\\]#', DIRECTORY_SEPARATOR, dirname(@$_SERVER['PHP_SELF'])).DIRECTORY_SEPARATOR.preg_replace('#[/\\\\]#', DIRECTORY_SEPARATOR, $filename);
$AbsoluteFilename = dirname(__FILE__).DIRECTORY_SEPARATOR.preg_replace('#[/\\\\]#', DIRECTORY_SEPARATOR, $filename);
$AbsoluteFilename = $this->config_document_root.preg_replace('#[/\\\\]#', DIRECTORY_SEPARATOR, dirname(@$_SERVER['PHP_SELF'])).DIRECTORY_SEPARATOR.preg_replace('#[/\\\\]#', DIRECTORY_SEPARATOR, $filename);
//$AbsoluteFilename = dirname(__FILE__).DIRECTORY_SEPARATOR.preg_replace('#[/\\\\]#', DIRECTORY_SEPARATOR, $filename);

//if (!@file_exists($AbsoluteFilename) && @file_exists(realpath($this->DotPadRelativeDirectoryPath($filename)))) {
// $AbsoluteFilename = realpath($this->DotPadRelativeDirectoryPath($filename));
Expand Down Expand Up @@ -1303,7 +1303,7 @@ function ImageMagickThumbnailToGD() {
// $UnAllowedParameters contains options that can only be processed in GD, not ImageMagick
// note: 'fltr' *may* need to be processed by GD, but we'll check that in more detail below
$UnAllowedParameters = array('xto', 'ar', 'bg', 'bc');
// 'ra' may be part of this list, if not a multiple of 90°
// 'ra' may be part of this list, if not a multiple of 90
foreach ($UnAllowedParameters as $parameter) {
if (isset($this->$parameter)) {
$this->DebugMessage('$this->useRawIMoutput=false because "'.$parameter.'" is set', __FILE__, __LINE__);
Expand Down

0 comments on commit a7550d6

Please sign in to comment.