Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -43,6 +43,18 @@ |
44 | 44 | $wgOut->addHTML( '</div>' ); |
45 | 45 | } |
46 | 46 | |
| 47 | + /** |
| 48 | + * execuate command for output |
| 49 | + * @param string command |
| 50 | + * @return string output |
| 51 | + */ |
| 52 | + function execOutput( $cmd ) { |
| 53 | + $out = array( $cmd ); |
| 54 | + exec( $cmd.' 2>&1', $out ); |
| 55 | + unset($out[0]); |
| 56 | + return implode("\n", $out ); |
| 57 | + } |
| 58 | + |
47 | 59 | /**#@+ |
48 | 60 | * @private |
49 | 61 | */ |
— | — | @@ -88,6 +100,7 @@ |
89 | 101 | * @return wiki text showing the third party software versions (apache, php, mysql). |
90 | 102 | */ |
91 | 103 | static function softwareInformation() { |
| 104 | + global $wgUseImageMagick, $wgImageMagickConvertCommand; |
92 | 105 | $dbr = wfGetDB( DB_SLAVE ); |
93 | 106 | |
94 | 107 | // Put the software in an array of form 'name' => 'version'. All messages should |
— | — | @@ -98,6 +111,27 @@ |
99 | 112 | $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . php_sapi_name() . ")"; |
100 | 113 | $software[$dbr->getSoftwareLink()] = $dbr->getServerVersion(); |
101 | 114 | |
| 115 | + // Look for ImageMagick's version, if did not found, try to find the GD library version |
| 116 | + if ( $wgUseImageMagick === true ) { |
| 117 | + if ( file_exists( $wgImageMagickConvertCommand ) ) { |
| 118 | + $swImageMagickInfo = self::execOutput( $wgImageMagickConvertCommand . ' -version' ); |
| 119 | + list( $head, $tail ) = explode( 'ImageMagick', $swImageMagickInfo ); |
| 120 | + list( $swImageMagickVer ) = explode('http://www.imagemagick.org', $tail ); |
| 121 | + $software['[http://www.imagemagick.org/ ImageMagick]'] = $swImageMagickVer; |
| 122 | + } |
| 123 | + } else { |
| 124 | + if( function_exists( 'gd_info' ) ) { |
| 125 | + $gdInfo = gd_info(); |
| 126 | + if ( strstr( $gdInfo['GD Version'], 'bundled' ) !== '' ) { |
| 127 | + $gd_URL = 'http://www.php.net/gd'; |
| 128 | + } |
| 129 | + else { |
| 130 | + $gd_URL = 'http://www.libgd.org'; |
| 131 | + } |
| 132 | + $software['[' . $gd_URL . ' GD library]'] = $gdInfo['GD Version']; |
| 133 | + } |
| 134 | + } |
| 135 | + |
102 | 136 | // Allow a hook to add/remove items |
103 | 137 | wfRunHooks( 'SoftwareInfo', array( &$software ) ); |
104 | 138 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -91,8 +91,9 @@ |
92 | 92 | stripped from them. |
93 | 93 | * Added a PHP port of CDB (constant database), for improved local caching when |
94 | 94 | the DBA extension is not available. |
| 95 | +* (bug 14611) Added support showing the version of the image thumbnailing |
| 96 | + engine. |
95 | 97 | |
96 | | - |
97 | 98 | === Bug fixes in 1.16 === |
98 | 99 | |
99 | 100 | * (bug 18031) Make namespace selector on Special:Export remember the previous |