From: <ki...@us...> - 2024-02-07 15:53:42
|
Revision: 7419 http://sourceforge.net/p/nsis/code/7419 Author: kichik Date: 2024-02-07 15:53:40 +0000 (Wed, 07 Feb 2024) Log Message: ----------- Update for PHP 8 Modified Paths: -------------- nsisweb/trunk/mediawiki/extensions/GeSHiHighlight.php Modified: nsisweb/trunk/mediawiki/extensions/GeSHiHighlight.php =================================================================== --- nsisweb/trunk/mediawiki/extensions/GeSHiHighlight.php 2023-12-21 06:32:34 UTC (rev 7418) +++ nsisweb/trunk/mediawiki/extensions/GeSHiHighlight.php 2024-02-07 15:53:40 UTC (rev 7419) @@ -37,10 +37,11 @@ "winbatch","xml"); foreach ( $langArray as $lang ){ - $wgParser->setHook( 'highlight-' . $lang, - create_function( '$text', '$geshi = new GeSHi(rtrim(ltrim($text,"\n\r")), "' . $lang . '", "' . $geshiPath . '"); - #$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS); - return $geshi->parse_code();')); + $wgParser->setHook( 'highlight-' . $lang, function ($text) use ($lang, $geshiPath) { + $geshi = new GeSHi(rtrim(ltrim($text,"\n\r")), "' . $lang . '", "' . $geshiPath . '"); + #$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS); + return $geshi->parse_code(); + }); } return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |