From 354e91279925097048df5c539a7e10b53e0640bd Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 16 Aug 2004 15:23:46 +0000 Subject: [PATCH] Comments, double to single quotes, foobar () { shema. --- includes/Parser.php | 66 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 8fd7ae069d..4da01d45e4 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -424,7 +424,7 @@ class Parser foreach ( $data AS $x ) { $t = $wgLang->getNsText ( $x->cur_namespace ) ; - if ( $t != "" ) $t .= ":" ; + if ( $t != '' ) $t .= ':' ; $t .= $x->cur_title ; if ( $x->cur_namespace == NS_CATEGORY ) { @@ -495,7 +495,7 @@ class Parser // entry in the categorylinks table is Category:A, not A, which it SHOULD be. // Workaround: If sortkey == "Category:".$title, than use $title for sorting, // else use sortkey... - if ( ($ns.":".$ctitle) == $x->cl_sortkey ) { + if ( ($ns.':'.$ctitle) == $x->cl_sortkey ) { array_push ( $children_start_char, $wgLang->firstChar( $x->cur_title ) ); } else { array_push ( $children_start_char, $wgLang->firstChar( $x->cl_sortkey ) ) ; @@ -625,7 +625,7 @@ class Parser } $r .= ''; - } elseif ( count ( $articles ) > 0) { + } elseif ( count($articles) > 0) { // for short lists of articles in categories. $ti = $this->mTitle->getText() ; @@ -898,8 +898,7 @@ class Parser } # Parse ^^ tokens and return html - /* private */ function doExponent ( $text ) - { + /* private */ function doExponent ( $text ) { $fname = 'Parser::doExponent'; wfProfileIn( $fname); $text = preg_replace('/\^\^(.*)\^\^/','\\1', $text); @@ -907,7 +906,7 @@ class Parser return $text; } - # Parse headers and return html + # Parse headers and return html /* private */ function doHeadings( $text ) { $fname = 'Parser::doHeadings'; wfProfileIn( $fname ); @@ -1149,10 +1148,10 @@ class Parser } else { # Expand the URL for printable version if ( ! $sk->suppressUrlExpansion() ) { - $paren = " (" . htmlspecialchars ( $encUrl ) . ")"; - } else { + $paren = " (" . htmlspecialchars ( $encUrl ) . ")"; + } else { $paren = ''; - } + } } # Process the trail (i.e. everything after this link up until start of the next link), @@ -1219,6 +1218,7 @@ class Parser return $s; } + # make an image if it's allowed function maybeMakeImageLink( $url ) { $sk =& $this->mOptions->getSkin(); $text = false; @@ -1418,8 +1418,7 @@ class Parser # These next three functions open, continue, and close the list # element appropriate to the prefix character passed into them. # - /* private */ function openList( $char ) - { + /* private */ function openList( $char ) { $result = $this->closeParagraph(); if ( '*' == $char ) { $result .= '