Author: caefer
Date: 2010-04-13 07:09:22 +0200 (Tue, 13 Apr 2010)
New Revision: 29096
Modified:
plugins/sfImageTransformExtraPlugin/trunk/lib/source/sfImageSourceFile.class.php
Log:
small fix for the glob() patch. if the requested file was specified including
the extension the former version failed to match
Modified:
plugins/sfImageTransformExtraPlugin/trunk/lib/source/sfImageSourceFile.class.php
===================================================================
---
plugins/sfImageTransformExtraPlugin/trunk/lib/source/sfImageSourceFile.class.php
2010-04-13 04:55:51 UTC (rev 29095)
+++
plugins/sfImageTransformExtraPlugin/trunk/lib/source/sfImageSourceFile.class.php
2010-04-13 05:09:22 UTC (rev 29096)
@@ -52,10 +52,11 @@
}
$url = parse_url($path);
- $pos = strrpos($url['path'], '/');
- $path = substr($url['path'], 0, $pos);
- $file = substr($url['path'], $pos+1);
- $files =
sfFinder::type('file')->name(array($file.'.{jpg,png,gif,jpeg}'))->in(sfConfig::get('sf_upload_dir').$path);
+ $path = dirname($url['path']);
+ $file = basename($url['path']);
+ var_dump($file);
+ $files =
sfFinder::type('file')->name(array($file.'{.jpg,.png,.gif,.jpeg,}'))->in(sfConfig::get('sf_upload_dir').$path);
+ var_dump($files);
if(!count($files))
{
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.