Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1083,6 +1083,7 @@ |
1084 | 1084 | 'right-siteadmin', |
1085 | 1085 | 'right-reset-passwords', |
1086 | 1086 | 'right-override-export-depth', |
| 1087 | + 'right-versiondetail', |
1087 | 1088 | ), |
1088 | 1089 | 'rightslog' => array( |
1089 | 1090 | 'rightslog', |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1136,6 +1136,12 @@ |
1137 | 1137 | $wgSpecialVersionShowHooks = false; |
1138 | 1138 | |
1139 | 1139 | /** |
| 1140 | + * By default, only show the MediaWiki, PHP, Database versions. |
| 1141 | + * Setting this to true will try and determine versions of all helper programs. |
| 1142 | + */ |
| 1143 | +$wgSpecialVersionExtended = false; |
| 1144 | + |
| 1145 | +/** |
1140 | 1146 | * Whether to show "we're sorry, but there has been a database error" pages. |
1141 | 1147 | * Displaying errors aids in debugging, but may display information useful |
1142 | 1148 | * to an attacker. |
— | — | @@ -1341,6 +1347,7 @@ |
1342 | 1348 | $wgGroupPermissions['sysop']['apihighlimits'] = true; |
1343 | 1349 | $wgGroupPermissions['sysop']['browsearchive'] = true; |
1344 | 1350 | $wgGroupPermissions['sysop']['noratelimit'] = true; |
| 1351 | +$wgGroupPermissions['sysop']['versiondetail'] = true; |
1345 | 1352 | $wgGroupPermissions['sysop']['movefile'] = true; |
1346 | 1353 | #$wgGroupPermissions['sysop']['mergehistory'] = true; |
1347 | 1354 | |
Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -102,206 +102,212 @@ |
103 | 103 | static function softwareInformation() { |
104 | 104 | global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgDiff3, $wgDiff, $wgUseTeX; |
105 | 105 | global $wgAllowTitlesInSVG, $wgSVGConverter, $wgSVGConverters, $wgSVGConverterPath; |
| 106 | + global $wgUser, $wgSpecialVersionExtended; |
106 | 107 | $dbr = wfGetDB( DB_SLAVE ); |
107 | 108 | |
108 | | - // Get the web server name and its version, if applicable |
109 | | - // Chop off PHP text from the string if it has the text desired |
110 | | - $serverSoftware = $_SERVER['SERVER_SOFTWARE']; |
111 | | - if ( strrpos( $serverSoftware, 'PHP' ) === false ) { |
112 | | - } else { |
113 | | - $serverSoftware = trim( substr( $serverSoftware, 0, strrpos($serverSoftware,'PHP') - 1 ) ); |
114 | | - } |
115 | | - |
116 | | - // Get the web server name and its version. |
117 | | - $serverSoftwareLine = explode('/',$serverSoftware); |
118 | | - $serverSoftwareName = $serverSoftwareLine[0]; |
119 | | - |
120 | | - // Insert the website of the web server if applicable. |
121 | | - if ( stristr( $serverSoftwareName, 'Apache' ) ) |
122 | | - $serverSoftwareURL = 'http://httpd.apache.org/'; |
123 | | - else if ( stristr( $serverSoftwareName, 'IIS' ) ) |
124 | | - $serverSoftwareURL = 'http://www.microsoft.com/iis/'; |
125 | | - else if ( stristr( $serverSoftwareName, 'Cherokee' ) ) |
126 | | - $serverSoftwareURL = 'http://www.cherokee-project.com/'; |
127 | | - else if ( stristr( $serverSoftwareName, 'lighttpd' ) ) |
128 | | - $serverSoftwareURL = 'http://www.lighttpd.net/'; |
129 | | - else if ( stristr( $serverSoftwareName, 'Sun' ) ) |
130 | | - $serverSoftwareURL = 'http://www.sun.com/software/products/web_srvr/'; |
131 | | - |
132 | | - // Get the version of the web server. If does not have one, |
133 | | - // leave it as empty. |
134 | | - if ( $serverSoftwareLine[1] != '' ) { |
135 | | - $serverSoftwareVersion = $serverSoftwareLine[1]; |
136 | | - } else { |
137 | | - $serverSoftwareVersion = ''; |
138 | | - } |
139 | | - |
140 | 109 | // Put the software in an array of form 'name' => 'version'. All messages should |
141 | 110 | // be loaded here, so feel free to use wfMsg*() in the 'name'. Raw HTML or wikimarkup |
142 | 111 | // can be used |
143 | 112 | $software = array(); |
| 113 | + |
144 | 114 | $software['[http://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked(); |
145 | | - if ( isset( $serverSoftwareURL ) ) |
146 | | - $software["[$serverSoftwareURL $serverSoftwareName]"] = $serverSoftwareVersion; |
147 | | - else |
148 | | - $software[$serverSoftwareName] = $serverSoftwareVersion; |
149 | 115 | $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . php_sapi_name() . ")"; |
150 | 116 | $software[$dbr->getSoftwareLink()] = $dbr->getServerVersion(); |
151 | 117 | |
152 | | - // Version information for diff3 |
153 | | - if ( file_exists( trim( $wgDiff3, '"' ) ) ) { |
154 | | - $swDiff3Info = self::execOutput( $wgDiff3 . ' -v' ); |
155 | | - $swDiff3Line = explode("\n",$swDiff3Info ,2); |
156 | | - $swDiff3Ver = $swDiff3Line[0]; |
157 | | - $swDiff3Ver = str_replace( 'diff3 (GNU diffutils) ', '' , $swDiff3Ver); |
158 | | - $software['[http://www.gnu.org/software/diffutils/diffutils.html diff3]'] = $swDiff3Ver; |
159 | | - } |
| 118 | + if( $wgSpecialVersionExtended || $wgUser->isAllowed( 'versiondetail' ) ) { |
| 119 | + // Get the web server name and its version, if applicable |
| 120 | + // Chop off PHP text from the string if it has the text desired |
| 121 | + $serverSoftware = $_SERVER['SERVER_SOFTWARE']; |
| 122 | + if ( strrpos( $serverSoftware, 'PHP' ) === false ) { |
| 123 | + } else { |
| 124 | + $serverSoftware = trim( substr( $serverSoftware, 0, strrpos($serverSoftware,'PHP') - 1 ) ); |
| 125 | + } |
160 | 126 | |
161 | | - // Version information for diff |
162 | | - if ( file_exists( trim( $wgDiff, '"' ) ) ) { |
163 | | - $swDiffInfo = self::execOutput( $wgDiff . ' -v' ); |
164 | | - $swDiffLine = explode("\n",$swDiffInfo ,2); |
165 | | - $swDiffVer = $swDiffLine[0]; |
166 | | - $swDiffVer = str_replace( 'diff (GNU diffutils) ', '' , $swDiffVer); |
167 | | - $software['[http://www.gnu.org/software/diffutils/diffutils.html diff]'] = $swDiffVer; |
168 | | - } |
| 127 | + // Get the web server name and its version. |
| 128 | + $serverSoftwareLine = explode('/',$serverSoftware); |
| 129 | + $serverSoftwareName = $serverSoftwareLine[0]; |
169 | 130 | |
170 | | - // Look for ImageMagick's version, if did not found, try to find the GD library version |
171 | | - if ( $wgUseImageMagick ) { |
172 | | - if ( file_exists( trim( $wgImageMagickConvertCommand, '"' ) ) ) { |
173 | | - $swImageMagickInfo = self::execOutput( $wgImageMagickConvertCommand . ' -version' ); |
174 | | - list( $head, $tail ) = explode( 'ImageMagick', $swImageMagickInfo ); |
175 | | - list( $swImageMagickVer ) = explode('http://www.imagemagick.org', $tail ); |
176 | | - $software['[http://www.imagemagick.org/ ImageMagick]'] = $swImageMagickVer; |
| 131 | + // Insert the website of the web server if applicable. |
| 132 | + if ( stristr( $serverSoftwareName, 'Apache' ) ) |
| 133 | + $serverSoftwareURL = 'http://httpd.apache.org/'; |
| 134 | + else if ( stristr( $serverSoftwareName, 'IIS' ) ) |
| 135 | + $serverSoftwareURL = 'http://www.microsoft.com/iis/'; |
| 136 | + else if ( stristr( $serverSoftwareName, 'Cherokee' ) ) |
| 137 | + $serverSoftwareURL = 'http://www.cherokee-project.com/'; |
| 138 | + else if ( stristr( $serverSoftwareName, 'lighttpd' ) ) |
| 139 | + $serverSoftwareURL = 'http://www.lighttpd.net/'; |
| 140 | + else if ( stristr( $serverSoftwareName, 'Sun' ) ) |
| 141 | + $serverSoftwareURL = 'http://www.sun.com/software/products/web_srvr/'; |
| 142 | + else if ( stristr( $serverSoftwareName, 'nginx' ) ) |
| 143 | + $serverSoftwareURL = 'http://nginx.net/'; |
| 144 | + |
| 145 | + // Get the version of the web server. If does not have one, |
| 146 | + // leave it as empty. |
| 147 | + if ( $serverSoftwareLine[1] != '' ) { |
| 148 | + $serverSoftwareVersion = $serverSoftwareLine[1]; |
| 149 | + } else { |
| 150 | + $serverSoftwareVersion = ''; |
177 | 151 | } |
178 | | - } else { |
179 | | - if( function_exists( 'gd_info' ) ) { |
180 | | - $gdInfo = gd_info(); |
181 | | - if ( strstr( $gdInfo['GD Version'], 'bundled' ) != false ) { |
182 | | - $gd_URL = 'http://www.php.net/gd'; |
| 152 | + |
| 153 | + if ( isset( $serverSoftwareURL ) ) |
| 154 | + $software["[$serverSoftwareURL $serverSoftwareName]"] = $serverSoftwareVersion; |
| 155 | + else |
| 156 | + $software[$serverSoftwareName] = $serverSoftwareVersion; |
| 157 | + |
| 158 | + // Version information for diff3 |
| 159 | + if ( file_exists( trim( $wgDiff3, '"' ) ) ) { |
| 160 | + $swDiff3Info = self::execOutput( $wgDiff3 . ' -v' ); |
| 161 | + $swDiff3Line = explode("\n",$swDiff3Info ,2); |
| 162 | + $swDiff3Ver = $swDiff3Line[0]; |
| 163 | + $swDiff3Ver = str_replace( 'diff3 (GNU diffutils) ', '' , $swDiff3Ver); |
| 164 | + $software['[http://www.gnu.org/software/diffutils/diffutils.html diff3]'] = $swDiff3Ver; |
| 165 | + } |
| 166 | + |
| 167 | + // Version information for diff |
| 168 | + if ( file_exists( trim( $wgDiff, '"' ) ) ) { |
| 169 | + $swDiffInfo = self::execOutput( $wgDiff . ' -v' ); |
| 170 | + $swDiffLine = explode("\n",$swDiffInfo ,2); |
| 171 | + $swDiffVer = $swDiffLine[0]; |
| 172 | + $swDiffVer = str_replace( 'diff (GNU diffutils) ', '' , $swDiffVer); |
| 173 | + $software['[http://www.gnu.org/software/diffutils/diffutils.html diff]'] = $swDiffVer; |
| 174 | + } |
| 175 | + |
| 176 | + // Look for ImageMagick's version, if did not found, try to find the GD library version |
| 177 | + if ( $wgUseImageMagick ) { |
| 178 | + if ( file_exists( trim( $wgImageMagickConvertCommand, '"' ) ) ) { |
| 179 | + $swImageMagickInfo = self::execOutput( $wgImageMagickConvertCommand . ' -version' ); |
| 180 | + list( $head, $tail ) = explode( 'ImageMagick', $swImageMagickInfo ); |
| 181 | + list( $swImageMagickVer ) = explode('http://www.imagemagick.org', $tail ); |
| 182 | + $software['[http://www.imagemagick.org/ ImageMagick]'] = $swImageMagickVer; |
183 | 183 | } |
184 | | - else { |
185 | | - $gd_URL = 'http://www.libgd.org'; |
| 184 | + } else { |
| 185 | + if( function_exists( 'gd_info' ) ) { |
| 186 | + $gdInfo = gd_info(); |
| 187 | + if ( strstr( $gdInfo['GD Version'], 'bundled' ) != false ) { |
| 188 | + $gd_URL = 'http://www.php.net/gd'; |
| 189 | + } else { |
| 190 | + $gd_URL = 'http://www.libgd.org'; |
| 191 | + } |
| 192 | + $software['[' . $gd_URL . ' GD library]'] = $gdInfo['GD Version']; |
186 | 193 | } |
187 | | - $software['[' . $gd_URL . ' GD library]'] = $gdInfo['GD Version']; |
188 | 194 | } |
189 | | - } |
190 | 195 | |
191 | | - // Look for SVG converter and print the version info |
192 | | - if ( $wgAllowTitlesInSVG ) { |
193 | | - $swSVGConvName = $wgSVGConverter; |
194 | | - $haveSVGConvVer = false; |
195 | | - $pathVar = '$path/'; |
196 | | - $binPath = '/usr/bin/'; |
197 | | - $execPath = strtok(strstr($wgSVGConverters[$wgSVGConverter],$pathVar), ' '); |
198 | | - $execPath = substr_replace($execPath, '', 0, strlen($pathVar)); |
199 | | - $execFullPath = trim($wgSVGConverterPath,'"') . $execPath; |
200 | | - $execBinPath = $binPath . $execPath; |
201 | | - if (strstr($execFullPath, ' ') != false) { |
202 | | - $execFullPath = '"' . $execFullPath . '"'; |
| 196 | + // Look for SVG converter and print the version info |
| 197 | + if ( $wgAllowTitlesInSVG ) { |
| 198 | + $swSVGConvName = $wgSVGConverter; |
| 199 | + $haveSVGConvVer = false; |
| 200 | + $pathVar = '$path/'; |
| 201 | + $binPath = '/usr/bin/'; |
| 202 | + $execPath = strtok(strstr($wgSVGConverters[$wgSVGConverter],$pathVar), ' '); |
| 203 | + $execPath = substr_replace($execPath, '', 0, strlen($pathVar)); |
| 204 | + $execFullPath = trim($wgSVGConverterPath,'"') . $execPath; |
| 205 | + $execBinPath = $binPath . $execPath; |
| 206 | + if (strstr($execFullPath, ' ') != false) { |
| 207 | + $execFullPath = '"' . $execFullPath . '"'; |
| 208 | + } |
| 209 | + if ( !strcmp( $wgSVGConverter, 'ImageMagick') ) { |
| 210 | + // Get version info for ImageMagick |
| 211 | + if ( file_exists( $execBinPath ) ) |
| 212 | + $swSVGConvInfo = self::execOutput( $execBinPath . ' -version' ); |
| 213 | + else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
| 214 | + $swSVGConvInfo = self::execOutput( $execFullPath . ' -version' ); |
| 215 | + list( $head, $tail ) = explode( 'ImageMagick', $swSVGConvInfo ); |
| 216 | + list( $swSVGConvVer ) = explode('http://www.imagemagick.org', $tail ); |
| 217 | + $swSVGConvURL = 'http://www.imagemagick.org/'; |
| 218 | + $haveSVGConvVer = true; |
| 219 | + } else if ( strstr ($execFullPath, 'rsvg') != false ) { |
| 220 | + // Get version info for rsvg |
| 221 | + if ( file_exists( $execBinPath ) ) |
| 222 | + $swSVGConvInfo = self::execOutput( $execBinPath . ' -v' ); |
| 223 | + else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
| 224 | + $swSVGConvInfo = self::execOutput( $execFullPath . ' -v' ); |
| 225 | + $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
| 226 | + $swSVGConvVer = $swSVGConvLine[0]; |
| 227 | + $swSVGConvURL = 'http://librsvg.sourceforge.net/'; |
| 228 | + $haveSVGConvVer = true; |
| 229 | + } else if ( strstr ($execFullPath, 'inkscape') != false ) { |
| 230 | + // Get version info for Inkscape |
| 231 | + if ( file_exists( $execBinPath ) ) |
| 232 | + $swSVGConvInfo = self::execOutput( $execBinPath . ' -z -V' ); |
| 233 | + else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
| 234 | + $swSVGConvInfo = self::execOutput( $execFullPath . ' -z -V' ); |
| 235 | + $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
| 236 | + $swSVGConvVer = ltrim( $swSVGConvLine[0], 'Inkscape ' ); |
| 237 | + $swSVGConvURL = 'http://www.inkscape.org/'; |
| 238 | + $swSVGConvName = ucfirst( $wgSVGConverter ); |
| 239 | + $haveSVGConvVer = true; |
| 240 | + } |
| 241 | + if ( $haveSVGConvVer ) |
| 242 | + $software["[$swSVGConvURL $swSVGConvName]"] = $swSVGConvVer; |
203 | 243 | } |
204 | | - if ( !strcmp( $wgSVGConverter, 'ImageMagick') ) { |
205 | | - // Get version info for ImageMagick |
206 | | - if ( file_exists( $execBinPath ) ) |
207 | | - $swSVGConvInfo = self::execOutput( $execBinPath . ' -version' ); |
208 | | - else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
209 | | - $swSVGConvInfo = self::execOutput( $execFullPath . ' -version' ); |
210 | | - list( $head, $tail ) = explode( 'ImageMagick', $swSVGConvInfo ); |
211 | | - list( $swSVGConvVer ) = explode('http://www.imagemagick.org', $tail ); |
212 | | - $swSVGConvURL = 'http://www.imagemagick.org/'; |
213 | | - $haveSVGConvVer = true; |
214 | | - } else if ( strstr ($execFullPath, 'rsvg') != false ) { |
215 | | - // Get version info for rsvg |
216 | | - if ( file_exists( $execBinPath ) ) |
217 | | - $swSVGConvInfo = self::execOutput( $execBinPath . ' -v' ); |
218 | | - else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
219 | | - $swSVGConvInfo = self::execOutput( $execFullPath . ' -v' ); |
220 | | - $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
221 | | - $swSVGConvVer = $swSVGConvLine[0]; |
222 | | - $swSVGConvURL = 'http://librsvg.sourceforge.net/'; |
223 | | - $haveSVGConvVer = true; |
224 | | - } else if ( strstr ($execFullPath, 'inkscape') != false ) { |
225 | | - // Get version info for Inkscape |
226 | | - if ( file_exists( $execBinPath ) ) |
227 | | - $swSVGConvInfo = self::execOutput( $execBinPath . ' -z -V' ); |
228 | | - else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
229 | | - $swSVGConvInfo = self::execOutput( $execFullPath . ' -z -V' ); |
230 | | - $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
231 | | - $swSVGConvVer = ltrim( $swSVGConvLine[0], 'Inkscape ' ); |
232 | | - $swSVGConvURL = 'http://www.inkscape.org/'; |
233 | | - $swSVGConvName = ucfirst( $wgSVGConverter ); |
234 | | - $haveSVGConvVer = true; |
235 | | - } |
236 | | - if ( $haveSVGConvVer ) |
237 | | - $software["[$swSVGConvURL $swSVGConvName]"] = $swSVGConvVer; |
238 | | - } |
239 | 244 | |
240 | | - // Look for TeX support and print the software version info |
241 | | - if ( $wgUseTeX ) { |
242 | | - $binPath = '/usr/bin/'; |
243 | | - $swMathName = Array( |
244 | | - 'ocaml' => 'OCaml', |
245 | | - 'gs' => 'Ghostscript', |
246 | | - 'dvips' => 'Dvips', |
247 | | - 'latex' => 'LaTeX', |
248 | | - 'imagemagick' => 'ImageMagick', |
249 | | - ); |
250 | | - $swMathURL = Array( |
251 | | - 'ocaml' => 'http://caml.inria.fr/', |
252 | | - 'gs' => 'http://www.ghostscript.com/', |
253 | | - 'dvips' => 'http://www.radicaleye.com/dvips.html', |
254 | | - 'latex' => 'http://www.latex-project.org/', |
255 | | - 'imagemagick' => 'http://www.imagemagick.org/', |
256 | | - ); |
257 | | - $swMathExec = Array( |
258 | | - 'ocaml' => 'ocamlc', |
259 | | - 'gs' => 'gs', |
260 | | - 'dvips' => 'dvips', |
261 | | - 'latex' => 'latex', |
262 | | - 'imagemagick' => 'convert', |
263 | | - ); |
264 | | - $swMathParam = Array( |
265 | | - 'ocaml' => '-version', |
266 | | - 'gs' => '-v', |
267 | | - 'dvips' => '-v', |
268 | | - 'latex' => '-v', |
269 | | - 'imagemagick' => '-version', |
270 | | - ); |
271 | | - foreach ( $swMathExec as $swMath => $swMathCmd ) { |
272 | | - $wBinPath = ''; |
273 | | - if ( file_exists( $binPath . 'whereis' ) ) { |
274 | | - $swWhereIsInfo = self::execOutput( $binPath . 'whereis -b ' . $swMathCmd ); |
275 | | - $swWhereIsLine = explode( "\n", $swWhereIsInfo, 2); |
276 | | - $swWhereIsFirstLine = $swWhereIsLine[0]; |
277 | | - $swWhereIsBinPath = explode( ' ', $swWhereIsFirstLine, 3); |
278 | | - if ( count( $swWhereIsBinPath ) > 1 ) |
279 | | - $wBinPath = dirname( $swWhereIsBinPath[1] ); |
280 | | - } else { |
281 | | - $swPathLine = explode( ';', $_SERVER['PATH'] ); |
282 | | - $swPathFound = false; |
283 | | - foreach( $swPathLine as $swPathDir ) { |
284 | | - if ( file_exists( $swPathDir . '/' . $swMathCmd . '.exe' ) && ($swPathFound === false) ) { |
285 | | - $wBinPath = $swPathDir . '/'; |
286 | | - $swPathFound = true; |
| 245 | + // Look for TeX support and print the software version info |
| 246 | + if ( $wgUseTeX ) { |
| 247 | + $binPath = '/usr/bin/'; |
| 248 | + $swMathName = Array( |
| 249 | + 'ocaml' => 'OCaml', |
| 250 | + 'gs' => 'Ghostscript', |
| 251 | + 'dvips' => 'Dvips', |
| 252 | + 'latex' => 'LaTeX', |
| 253 | + 'imagemagick' => 'ImageMagick', |
| 254 | + ); |
| 255 | + $swMathURL = Array( |
| 256 | + 'ocaml' => 'http://caml.inria.fr/', |
| 257 | + 'gs' => 'http://www.ghostscript.com/', |
| 258 | + 'dvips' => 'http://www.radicaleye.com/dvips.html', |
| 259 | + 'latex' => 'http://www.latex-project.org/', |
| 260 | + 'imagemagick' => 'http://www.imagemagick.org/', |
| 261 | + ); |
| 262 | + $swMathExec = Array( |
| 263 | + 'ocaml' => 'ocamlc', |
| 264 | + 'gs' => 'gs', |
| 265 | + 'dvips' => 'dvips', |
| 266 | + 'latex' => 'latex', |
| 267 | + 'imagemagick' => 'convert', |
| 268 | + ); |
| 269 | + $swMathParam = Array( |
| 270 | + 'ocaml' => '-version', |
| 271 | + 'gs' => '-v', |
| 272 | + 'dvips' => '-v', |
| 273 | + 'latex' => '-v', |
| 274 | + 'imagemagick' => '-version', |
| 275 | + ); |
| 276 | + foreach ( $swMathExec as $swMath => $swMathCmd ) { |
| 277 | + $wBinPath = ''; |
| 278 | + if ( file_exists( $binPath . 'whereis' ) ) { |
| 279 | + $swWhereIsInfo = self::execOutput( $binPath . 'whereis -b ' . $swMathCmd ); |
| 280 | + $swWhereIsLine = explode( "\n", $swWhereIsInfo, 2); |
| 281 | + $swWhereIsFirstLine = $swWhereIsLine[0]; |
| 282 | + $swWhereIsBinPath = explode( ' ', $swWhereIsFirstLine, 3); |
| 283 | + if ( count( $swWhereIsBinPath ) > 1 ) |
| 284 | + $wBinPath = dirname( $swWhereIsBinPath[1] ); |
| 285 | + } else { |
| 286 | + $swPathLine = explode( ';', $_SERVER['PATH'] ); |
| 287 | + $swPathFound = false; |
| 288 | + foreach( $swPathLine as $swPathDir ) { |
| 289 | + if ( file_exists( $swPathDir . '/' . $swMathCmd . '.exe' ) && ($swPathFound === false) ) { |
| 290 | + $wBinPath = $swPathDir . '/'; |
| 291 | + $swPathFound = true; |
| 292 | + } |
287 | 293 | } |
288 | 294 | } |
| 295 | + if ( file_exists( $binPath . $swMathCmd ) || file_exists( $wBinPath . $swMathCmd ) ) { |
| 296 | + $swMathInfo = self::execOutput( $swMathCmd . ' ' . $swMathParam[$swMath] ); |
| 297 | + $swMathLine = explode( "\n", $swMathInfo, 2); |
| 298 | + $swMathVerInfo = $swMathLine[0]; |
| 299 | + if ( !strcmp( $swMath, 'gs' ) ) |
| 300 | + $swMathVerInfo = str_replace( 'GPL Ghostscript ', '', $swMathVerInfo ); |
| 301 | + else if ( !strcmp( $swMath, 'dvips' ) ) { |
| 302 | + $swMathVerParts = explode( ' ' , $swMathVerInfo ); |
| 303 | + $swMathVerInfo = $swMathVerParts[3]; |
| 304 | + } else if ( !strcmp( $swMath, 'imagemagick' ) ) { |
| 305 | + list( $head, $tail ) = explode( 'ImageMagick', $swMathVerInfo ); |
| 306 | + list( $swMathVerInfo ) = explode('http://www.imagemagick.org', $tail ); |
| 307 | + } |
| 308 | + $swMathVer[$swMath] = trim( $swMathVerInfo ); |
| 309 | + $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = $swMathVer[$swMath]; |
| 310 | + } |
289 | 311 | } |
290 | | - if ( file_exists( $binPath . $swMathCmd ) || file_exists( $wBinPath . $swMathCmd ) ) { |
291 | | - $swMathInfo = self::execOutput( $swMathCmd . ' ' . $swMathParam[$swMath] ); |
292 | | - $swMathLine = explode( "\n", $swMathInfo, 2); |
293 | | - $swMathVerInfo = $swMathLine[0]; |
294 | | - if ( !strcmp( $swMath, 'gs' ) ) |
295 | | - $swMathVerInfo = str_replace( 'GPL Ghostscript ', '', $swMathVerInfo ); |
296 | | - else if ( !strcmp( $swMath, 'dvips' ) ) { |
297 | | - $swMathVerParts = explode( ' ' , $swMathVerInfo ); |
298 | | - $swMathVerInfo = $swMathVerParts[3]; |
299 | | - } else if ( !strcmp( $swMath, 'imagemagick' ) ) { |
300 | | - list( $head, $tail ) = explode( 'ImageMagick', $swMathVerInfo ); |
301 | | - list( $swMathVerInfo ) = explode('http://www.imagemagick.org', $tail ); |
302 | | - } |
303 | | - $swMathVer[$swMath] = trim( $swMathVerInfo ); |
304 | | - $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = $swMathVer[$swMath]; |
305 | | - } |
306 | 312 | } |
307 | 313 | } |
308 | 314 | |
Index: trunk/phase3/languages/messages/MessagesZh_hans.php |
— | — | @@ -1344,6 +1344,7 @@ |
1345 | 1345 | 'right-siteadmin' => '锁定和解除锁定数据库', |
1346 | 1346 | 'right-reset-passwords' => '重设其他用户的密码', |
1347 | 1347 | 'right-override-export-depth' => '导出含有五层深度链接页面之页面', |
| 1348 | +'right-versiondetail' => '显示延伸软件版本的资料', |
1348 | 1349 | |
1349 | 1350 | # User rights log |
1350 | 1351 | 'rightslog' => '用户权限日志', |
Index: trunk/phase3/languages/messages/MessagesYue.php |
— | — | @@ -1303,6 +1303,7 @@ |
1304 | 1304 | 'right-siteadmin' => '鎖同解鎖資料庫', |
1305 | 1305 | 'right-reset-passwords' => '重設其他用戶嘅密碼', |
1306 | 1306 | 'right-override-export-depth' => '倒出包含有五層深連版嘅頁面', |
| 1307 | +'right-versiondetail' => '顯示伸展軟件版本嘅資料', |
1307 | 1308 | |
1308 | 1309 | # User rights log |
1309 | 1310 | 'rightslog' => '用戶權限日誌', |
Index: trunk/phase3/languages/messages/MessagesZh_hant.php |
— | — | @@ -1321,6 +1321,7 @@ |
1322 | 1322 | 'right-siteadmin' => '鎖定和解除鎖定資料庫', |
1323 | 1323 | 'right-reset-passwords' => '重設其他用戶的密碼', |
1324 | 1324 | 'right-override-export-depth' => '匯出含有五層深度連結頁面之頁面', |
| 1325 | +'right-versiondetail' => '顯示延伸軟件版本的資料', |
1325 | 1326 | |
1326 | 1327 | # User rights log |
1327 | 1328 | 'rightslog' => '用戶權限日誌', |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1891,6 +1891,7 @@ |
1892 | 1892 | 'right-siteadmin' => 'Lock and unlock the database', |
1893 | 1893 | 'right-reset-passwords' => "Reset other users' passwords", |
1894 | 1894 | 'right-override-export-depth' => 'Export pages including linked pages up to a depth of 5', |
| 1895 | +'right-versiondetail' => 'Show the extended software version information', |
1895 | 1896 | |
1896 | 1897 | # User rights log |
1897 | 1898 | 'rightslog' => 'User rights log', |
Index: trunk/phase3/languages/messages/MessagesLzh.php |
— | — | @@ -1145,6 +1145,7 @@ |
1146 | 1146 | 'right-siteadmin' => '鎖與解鎖資料庫', |
1147 | 1147 | 'right-reset-passwords' => '設他簿之符節', |
1148 | 1148 | 'right-override-export-depth' => '出有五層深之頁', |
| 1149 | +'right-versiondetail' => '示延用之版', |
1149 | 1150 | |
1150 | 1151 | # User rights log |
1151 | 1152 | 'rightslog' => '職權志', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -73,6 +73,8 @@ |
74 | 74 | * $wgRegisterInternalExternals can be used to record external links pointing |
75 | 75 | to same server |
76 | 76 | * $wgHtml5 outputs an HTML 5 doctype instead of XHTML 1.0 Transitional. |
| 77 | +* $wgSpecialVersionExtended shows the extended version information besides |
| 78 | + PHP and database version. |
77 | 79 | |
78 | 80 | === New features in 1.16 === |
79 | 81 | |
— | — | @@ -124,7 +126,8 @@ |
125 | 127 | * Added a PHP port of CDB (constant database), for improved local caching when |
126 | 128 | the DBA extension is not available. |
127 | 129 | * (bug 14611) Added support showing the version of the web server, image |
128 | | - thumbnailing engine, diff/diff3 engine and TeX engine. |
| 130 | + thumbnailing engine, diff/diff3 engine and TeX engine, enabled for sysops |
| 131 | + by default. |
129 | 132 | * Introduced a new system for localisation caching. The system is based around |
130 | 133 | fast fetches of individual messages, minimising memory overhead and startup |
131 | 134 | time in the typical case. The database backend will be used by default, but |