Index: branches/conrad/phase3/includes/parser/Parser.php |
— | — | @@ -372,29 +372,24 @@ |
373 | 373 | |
374 | 374 | wfRunHooks( 'ParserBeforeTidy', array( &$this, &$text ) ); |
375 | 375 | |
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 |
382 | 377 | |
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; |
393 | 391 | } |
| 392 | + $this->mStripState->general->setPair( $marker, $output ); |
394 | 393 | } |
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. |
399 | 394 | $text = $this->mStripState->unstripGeneral( $text ); |
400 | 395 | |
401 | 396 | $text = Sanitizer::normalizeCharReferences( $text ); |
— | — | @@ -4241,9 +4236,7 @@ |
4242 | 4237 | return $oldVal; |
4243 | 4238 | } |
4244 | 4239 | |
4245 | | - /* An old work-around for bug 2257 - deprecated 2010-02-13 */ |
4246 | 4240 | function setTransparentTagHook( $tag, $callback ) { |
4247 | | - wfDeprecated( __METHOD__ ); |
4248 | 4241 | $tag = strtolower( $tag ); |
4249 | 4242 | $oldVal = isset( $this->mTransparentTagHooks[$tag] ) ? $this->mTransparentTagHooks[$tag] : null; |
4250 | 4243 | $this->mTransparentTagHooks[$tag] = $callback; |