r82744 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82743‎ | r82744 | r82745 >
Date:20:23, 24 February 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
* EOL w/s cleanup
* Normalize function names to eliminate two references to “HalfParsedDATA”
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -4267,7 +4267,7 @@
42684268 public function startExternalParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
42694269 $this->startParse( $title, $options, $outputType, $clearState );
42704270 }
4271 -
 4271+
42724272 private function startParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
42734273 $this->setTitle( $title );
42744274 $this->mOptions = $options;
@@ -4860,7 +4860,7 @@
48614861 /**
48624862 * Replace transparent tags in $text with the values given by the callbacks.
48634863 *
4864 - * Transparent tag hooks are like regular XML-style tag hooks, except they
 4864+ * Transparent tag hooks are like regular XML-style tag hooks, except they
48654865 * operate late in the transformation sequence, on HTML instead of wikitext.
48664866 */
48674867 function replaceTransparentTags( $text ) {
@@ -5227,13 +5227,13 @@
52285228 }
52295229
52305230 /**
5231 - * Call a callback function on all regions of the given text that are not
5232 - * inside strip markers, and replace those regions with the return value
 5231+ * Call a callback function on all regions of the given text that are not
 5232+ * inside strip markers, and replace those regions with the return value
52335233 * of the callback. For example, with input:
52345234 *
52355235 * aaa<MARKER>bbb
52365236 *
5237 - * This will call the callback function twice, with 'aaa' and 'bbb'. Those
 5237+ * This will call the callback function twice, with 'aaa' and 'bbb'. Those
52385238 * two strings will be replaced with the value returned by the callback in
52395239 * each case.
52405240 */
@@ -5262,15 +5262,15 @@
52635263 }
52645264
52655265 /**
5266 - * Save the parser state required to convert the given half-parsed text to
5267 - * HTML. "Half-parsed" in this context means the output of
5268 - * recursiveTagParse() or internalParse(). This output has strip markers
5269 - * from replaceVariables (extensionSubstitution() etc.), and link
5270 - * placeholders from replaceLinkHolders().
 5266+ * Save the parser state required to convert the given half-parsed text to
 5267+ * HTML. "Half-parsed" in this context means the output of
 5268+ * recursiveTagParse() or internalParse(). This output has strip markers
 5269+ * from replaceVariables (extensionSubstitution() etc.), and link
 5270+ * placeholders from replaceLinkHolders().
52715271 *
5272 - * Returns an array which can be serialized and stored persistently. This
5273 - * array can later be loaded into another parser instance with
5274 - * unserializeHalfParsedText(). The text can then be safely incorporated into
 5272+ * Returns an array which can be serialized and stored persistently. This
 5273+ * array can later be loaded into another parser instance with
 5274+ * unserializeHalfParsedText(). The text can then be safely incorporated into
52755275 * the return value of a parser hook.
52765276 */
52775277 function serializeHalfParsedText( $text ) {
@@ -5287,14 +5287,14 @@
52885288
52895289 /**
52905290 * Load the parser state given in the $data array, which is assumed to
5291 - * have been generated by serializeHalfParsedText(). The text contents is
5292 - * extracted from the array, and its markers are transformed into markers
5293 - * appropriate for the current Parser instance. This transformed text is
 5291+ * have been generated by serializeHalfParsedText(). The text contents is
 5292+ * extracted from the array, and its markers are transformed into markers
 5293+ * appropriate for the current Parser instance. This transformed text is
52945294 * returned, and can be safely included in the return value of a parser
52955295 * hook.
52965296 *
5297 - * If the $data array has been stored persistently, the caller should first
5298 - * check whether it is still valid, by calling isValidHalfParsedData().
 5297+ * If the $data array has been stored persistently, the caller should first
 5298+ * check whether it is still valid, by calling isValidHalfParsedText().
52995299 *
53005300 * @param $data Serialized data
53015301 * @return String
@@ -5316,13 +5316,13 @@
53175317 }
53185318
53195319 /**
5320 - * Returns true if the given array, presumed to be generated by
5321 - * serializeHalfParsedText(), is compatible with the current version of the
 5320+ * Returns true if the given array, presumed to be generated by
 5321+ * serializeHalfParsedText(), is compatible with the current version of the
53225322 * parser.
53235323 *
53245324 * @param $data Array.
53255325 */
5326 - function isValidHalfParsedData( $data ) {
 5326+ function isValidHalfParsedText( $data ) {
53275327 return isset( $data['version'] ) && $data['version'] == self::HALF_PARSED_VERSION;
53285328 }
53295329 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r82758Followup r82744 Always grep extensions, even for recent additions to the code...mah23:06, 24 February 2011

Comments

#Comment by Hashar (talk | contribs)   21:33, 24 February 2011

Breaks the cite extension?! :p

wikiextensions/Cite$ ack isValidHalfParsedData
Cite_body.php
624:		if ( !$data || !$this->mParser->isValidHalfParsedData( $data ) ) {

Status & tagging log