From: <var...@us...> - 2014-10-03 14:54:37
|
Revision: 9179 http://sourceforge.net/p/phpwiki/code/9179 Author: vargenau Date: 2014-10-03 14:54:29 +0000 (Fri, 03 Oct 2014) Log Message: ----------- function ImageTypes exists Modified Paths: -------------- trunk/lib/WikiPluginCached.php trunk/lib/plugin/TeX2png.php Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-10-03 14:47:32 UTC (rev 9178) +++ trunk/lib/WikiPluginCached.php 2014-10-03 14:54:29 UTC (rev 9179) @@ -539,16 +539,10 @@ 'xbm' => IMG_XBM, */ ); - if (function_exists('ImageTypes')) { - $presenttypes = ImageTypes(); - foreach ($imagetypes as $imgtype => $bitmask) - if ($presenttypes && $bitmask) - array_push($supportedtypes, $imgtype); - } else { - foreach ($imagetypes as $imgtype => $bitmask) - if (function_exists("Image" . $imgtype)) - array_push($supportedtypes, $imgtype); - } + $presenttypes = ImageTypes(); + foreach ($imagetypes as $imgtype => $bitmask) + if ($presenttypes && $bitmask) + array_push($supportedtypes, $imgtype); if (in_array($wish, $supportedtypes)) return $wish; elseif (!empty($supportedtypes)) Modified: trunk/lib/plugin/TeX2png.php =================================================================== --- trunk/lib/plugin/TeX2png.php 2014-10-03 14:47:32 UTC (rev 9178) +++ trunk/lib/plugin/TeX2png.php 2014-10-03 14:54:29 UTC (rev 9179) @@ -221,9 +221,7 @@ function run($dbi, $argstr, &$request, $basepage) { // from text2png.php - if ((function_exists('ImageTypes') and (ImageTypes() & IMG_PNG)) - or function_exists("ImagePNG") - ) { + if (ImageTypes() & IMG_PNG) { // we have gd & png so go ahead. extract($this->getArgs($argstr, $request)); return $this->tex2png($text); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |