r64050 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64049‎ | r64050 | r64051 >
Date:00:41, 23 March 2010
Author:conrad
Status:deferred
Tags:
Comment:
Revert r62434 and r62416, not relevant to pipe trick
Modified paths:
  • /branches/conrad/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: branches/conrad/phase3/includes/parser/Parser.php
@@ -372,29 +372,24 @@
373373
374374 wfRunHooks( 'ParserBeforeTidy', array( &$this, &$text ) );
375375
376 - if ( $this->mTransparentTagHooks ) {
377 - //!JF Move to its own function
378 - $uniq_prefix = $this->mUniqPrefix;
379 - $matches = array();
380 - $elements = array_keys( $this->mTransparentTagHooks );
381 - $text = self::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
 376+//!JF Move to its own function
382377
383 - foreach( $matches as $marker => $data ) {
384 - list( $element, $content, $params, $tag ) = $data;
385 - $tagName = strtolower( $element );
386 - if( isset( $this->mTransparentTagHooks[$tagName] ) ) {
387 - $output = call_user_func_array( $this->mTransparentTagHooks[$tagName],
388 - array( $content, $params, $this ) );
389 - } else {
390 - $output = $tag;
391 - }
392 - $this->mStripState->general->setPair( $marker, $output );
 378+ $uniq_prefix = $this->mUniqPrefix;
 379+ $matches = array();
 380+ $elements = array_keys( $this->mTransparentTagHooks );
 381+ $text = self::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
 382+
 383+ foreach( $matches as $marker => $data ) {
 384+ list( $element, $content, $params, $tag ) = $data;
 385+ $tagName = strtolower( $element );
 386+ if( isset( $this->mTransparentTagHooks[$tagName] ) ) {
 387+ $output = call_user_func_array( $this->mTransparentTagHooks[$tagName],
 388+ array( $content, $params, $this ) );
 389+ } else {
 390+ $output = $tag;
393391 }
 392+ $this->mStripState->general->setPair( $marker, $output );
394393 }
395 -
396 - # This was originally inserted for transparent tag hooks (now deprecated)
397 - # but some extensions (notably <poem>) rely on the extra unstripGeneral()
398 - # after unstripNoWiki() so they can modify the contents of <nowiki> tags.
399394 $text = $this->mStripState->unstripGeneral( $text );
400395
401396 $text = Sanitizer::normalizeCharReferences( $text );
@@ -4241,9 +4236,7 @@
42424237 return $oldVal;
42434238 }
42444239
4245 - /* An old work-around for bug 2257 - deprecated 2010-02-13 */
42464240 function setTransparentTagHook( $tag, $callback ) {
4247 - wfDeprecated( __METHOD__ );
42484241 $tag = strtolower( $tag );
42494242 $oldVal = isset( $this->mTransparentTagHooks[$tag] ) ? $this->mTransparentTagHooks[$tag] : null;
42504243 $this->mTransparentTagHooks[$tag] = $callback;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62416Deprecate old undocumented workaround to bug 2257 (setTransparentTagHook)conrad02:22, 13 February 2010
r62434Fix for <poem> after r62416conrad14:41, 13 February 2010

Status & tagging log