[pLog-CVS] plog/class/gallery/resizers gallerygdresizer.class.php,1.11,1.11.2.1
Brought to you by:
jondaley
From: Oscar R. <phu...@us...> - 2004-06-28 18:35:54
|
Update of /cvsroot/plog/plog/class/gallery/resizers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6822/class/gallery/resizers Modified Files: Tag: PLOG_0_3_2_DEVEL gallerygdresizer.class.php Log Message: added a new setting for forcing GD1 to be used even if GD2 is available... Index: gallerygdresizer.class.php =================================================================== RCS file: /cvsroot/plog/plog/class/gallery/resizers/gallerygdresizer.class.php,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** gallerygdresizer.class.php 16 Apr 2004 18:15:13 -0000 1.11 --- gallerygdresizer.class.php 28 Jun 2004 18:35:46 -0000 1.11.2.1 *************** *** 56,65 **** function isGD2Available() { $testGD = get_extension_funcs("gd"); // Grab function list ! if ( !$testGD ) return false; ! if (in_array ("imagegd2",$testGD)) return true; ! else return false; } --- 56,82 ---- function isGD2Available() { + // maybe the blog has been configured to use the gd1 routines no matter + // if gd2 is detected or not... in that case, we don't go ahead and simply + // say that gd2 is not available + $config =& Config::getConfig(); + if( $config->getValue( "thumbnail_generator_force_use_gd1" )) { + _debug("Forcing GD1"); + return false; + } + + // if not, we still check in case the user made a mistake... $testGD = get_extension_funcs("gd"); // Grab function list ! if ( !$testGD ) { ! _debug("There is no GD installed!"); ! return false; ! } ! if (in_array ("imagegd2",$testGD)) { ! _debug("Using GD2"); return true; ! } ! else { ! _debug("Using GD1"); return false; + } } |