From: Antoine Musso Date: Mon, 31 Jan 2005 22:59:55 +0000 (+0000) Subject: some quotes and phpdoc comments X-Git-Tag: 1.5.0alpha1~794 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=bb7a1ac93a4573e9c78ab974fae471e30e4b696c;p=lhc%2Fweb%2Fwiklou.git some quotes and phpdoc comments --- diff --git a/includes/Parser.php b/includes/Parser.php index 3ed672bbdf..b5ef19f584 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -128,7 +128,7 @@ class Parser function clearState() { $this->mOutput = new ParserOutput; $this->mAutonumber = 0; - $this->mLastSection = ""; + $this->mLastSection = ''; $this->mDTopen = false; $this->mVariables = false; $this->mIncludeCount = array(); @@ -142,6 +142,11 @@ class Parser * to internalParse() which does all the real work. * * @access private + * @param string $text Text we want to parse + * @param Title &$title A title object + * @param array $options + * @param boolean $linestart + * @param boolean $clearState * @return ParserOutput a ParserOutput */ function parse( $text, &$title, $options, $linestart = true, $clearState = true ) { @@ -173,7 +178,7 @@ class Parser # only if there is something before the space '/(.) (?=\\?|:|;|!|\\302\\273)/i' => '\\1 \\2', # french spaces, Guillemet-right - "/(\\302\\253) /i"=>"\\1 ", + '/(\\302\\253) /i' => '\\1 ', '/
/i' => '
', '/
/i' => '
', '/
/i' => '
', @@ -1120,7 +1125,6 @@ class Parser * * @access private */ - function replaceInternalLinks( $s ) { global $wgLang, $wgContLang, $wgLinkCache; global $wgDisableLangConversion; @@ -2378,9 +2382,12 @@ class Parser * * It loops through all headlines, collects the necessary data, then splits up the * string and re-inserts the newly formatted headlines. + * + * @param string $text + * @param boolean $isMain * @access private */ - /* private */ function formatHeadings( $text, $isMain=true ) { + function formatHeadings( $text, $isMain=true ) { global $wgInputEncoding, $wgMaxTocLevel, $wgContLang, $wgLinkHolders, $wgInterwikiLinkHolders; $doNumberHeadings = $this->mOptions->getNumberHeadings(); @@ -3270,14 +3277,17 @@ class ParserOptions function setSkin( &$x ) { $this->mSkin =& $x; } - # Get parser options - /* static */ function newFromUser( &$user ) { + /** + * Get parser options + * @static + */ + function newFromUser( &$user ) { $popts = new ParserOptions; $popts->initialiseFromUser( $user ); return $popts; } - # Get user options + /** Get user options */ function initialiseFromUser( &$userInput ) { global $wgUseTeX, $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages; $fname = 'ParserOptions::initialiseFromUser'; @@ -3303,8 +3313,6 @@ class ParserOptions $this->mShowToc = $user->getOption( 'showtoc' ); wfProfileOut( $fname ); } - - } /** @@ -3350,6 +3358,13 @@ function wfLoadSiteStats() { } } +/** + * Escape html tags + * Basicly replacing " > and < with HTML entities ( ", >, <) + * + * @param string $in Text that might contain HTML tags + * @return string Escaped string + */ function wfEscapeHTMLTagsOnly( $in ) { return str_replace( array( '"', '>', '<' ),