diff options
| author | Lester Caine <lester@lsces.co.uk> | 2010-04-03 10:57:54 +0000 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2010-04-03 10:57:54 +0000 |
| commit | 10f77367d80a0f9fbdc95c131ca36e8a51ce1bef (patch) | |
| tree | 7fa1d00ff1699993b907f9bc344f1f199eb55fcb | |
| parent | a9859161e0e36095dced556d737131887e1e7ded (diff) | |
| download | liberty-10f77367d80a0f9fbdc95c131ca36e8a51ce1bef.tar.gz liberty-10f77367d80a0f9fbdc95c131ca36e8a51ce1bef.tar.bz2 liberty-10f77367d80a0f9fbdc95c131ca36e8a51ce1bef.zip | |
Tweak for PHP5.3 compatibility - I suspect my thumbnail generation problem is php5.3 related but this did not fix it.
| -rw-r--r-- | plugins/processor.gd.php | 6 | ||||
| -rw-r--r-- | plugins/processor.imagick.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/processor.gd.php b/plugins/processor.gd.php index fb80c5c..ccf75ea 100644 --- a/plugins/processor.gd.php +++ b/plugins/processor.gd.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_liberty/plugins/processor.gd.php,v 1.14 2009/01/03 09:37:04 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_liberty/plugins/processor.gd.php,v 1.15 2010/04/03 10:57:54 lsces Exp $ * * Image processor - extension: php-gd * @package liberty @@ -19,7 +19,7 @@ function liberty_gd_resize_image( &$pFileHash ) { global $gBitSystem; $ret = NULL; list($iwidth, $iheight, $itype, $iattr) = @getimagesize( $pFileHash['source_file'] ); - list($type, $ext) = split( '/', strtolower( $pFileHash['type'] ) ); + list($type, $ext) = explode( '/', strtolower( $pFileHash['type'] ) ); $destUrl = $pFileHash['dest_path'].$pFileHash['dest_base_name']; if( ( empty( $pFileHash['max_width'] ) || empty( $pFileHash['max_height'] ) ) || ( $iwidth <= $pFileHash['max_width'] && $iheight <= $pFileHash['max_height'] && ( $ext == 'gif' || $ext == 'png' || $ext == 'jpg' || $ext == 'jpeg' ) ) ) { // Keep the same dimensions as input file @@ -72,7 +72,7 @@ function liberty_gd_resize_image( &$pFileHash ) { } else { // make sure we have image_type_to_extension available include_once( UTIL_PKG_PATH.'PHP_Compat/Compat/Function/image_type_to_mime_type.php' ); - list( $type, $mimeExt ) = split( '/', strtolower( image_type_to_mime_type( $itype ))); + list( $type, $mimeExt ) = explode( '/', strtolower( image_type_to_mime_type( $itype ))); } if( $mimeExt = preg_replace( "!^(x-)?(jpeg|png|gif)$!", "$2", $mimeExt )) { diff --git a/plugins/processor.imagick.php b/plugins/processor.imagick.php index 10ce11c..2732062 100644 --- a/plugins/processor.imagick.php +++ b/plugins/processor.imagick.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_liberty/plugins/processor.imagick.php,v 1.12 2009/01/03 09:37:04 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_liberty/plugins/processor.imagick.php,v 1.13 2010/04/03 10:57:54 lsces Exp $ * * Image processor - extension: php-imagick * @package liberty @@ -112,7 +112,7 @@ function liberty_imagick0_resize_image( &$pFileHash ) { if( $gBitSystem->isFeatureActive( 'liberty_thumbnail_format' )) { $mimeExt = $gBitSystem->getConfig( 'liberty_thumbnail_format' ); } else { - list( $type, $mimeExt ) = split( '/', strtolower( $itype )); + list( $type, $mimeExt ) = explode( '/', strtolower( $itype )); } if( $mimeExt = preg_replace( "!^(x-)?(jpeg|png|gif)$!", "$2", $mimeExt )) { @@ -223,7 +223,7 @@ function liberty_imagick2_resize_image( &$pFileHash ) { if( $gBitSystem->isFeatureActive( 'liberty_thumbnail_format' )) { $mimeExt = $gBitSystem->getConfig( 'liberty_thumbnail_format' ); } else { - list( $type, $mimeExt ) = split( '/', strtolower( $pFileHash['type'] )); + list( $type, $mimeExt ) = explode( '/', strtolower( $pFileHash['type'] )); } if( preg_match( "!(png|gif)!", $mimeExt )) { |
