r80799 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80798‎ | r80799 | r80800 >
Date:09:38, 23 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Explicitally define a couple of variables
Modified paths:
  • /trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
@@ -185,6 +185,7 @@
186186 */
187187 public static function viewHook( $text, $title, $output ) {
188188 // Determine the language
 189+ $matches = array();
189190 preg_match( '!\.(css|js)$!u', $title->getText(), $matches );
190191 $lang = $matches[1] == 'css' ? 'css' : 'javascript';
191192 // Attempt to format
@@ -233,6 +234,7 @@
234235 private static function buildHeadItem( $geshi ) {
235236 global $wgUseSiteCss, $wgSquidMaxage;
236237 $lang = $geshi->language;
 238+ $css = array();
237239 $css[] = '<style type="text/css">/*<![CDATA[*/';
238240 $css[] = ".source-$lang {line-height: normal;}";
239241 $css[] = ".source-$lang li, .source-$lang pre {";

Status & tagging log