r87232 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87231‎ | r87232 | r87233 >
Date:23:59, 1 May 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Make a method static per the comment, update the only non static usage (in Parser) itself
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -682,10 +682,8 @@
683683 * @param $matches Out parameter, Array: extracted tags
684684 * @param $uniq_prefix
685685 * @return String: stripped text
686 - *
687 - * @static
688686 */
689 - public function extractTagsAndParams( $elements, $text, &$matches, $uniq_prefix = '' ) {
 687+ public static function extractTagsAndParams( $elements, $text, &$matches, $uniq_prefix = '' ) {
690688 static $n = 1;
691689 $stripped = '';
692690 $matches = array();
@@ -5117,7 +5115,7 @@
51185116 function replaceTransparentTags( $text ) {
51195117 $matches = array();
51205118 $elements = array_keys( $this->mTransparentTagHooks );
5121 - $text = $this->extractTagsAndParams( $elements, $text, $matches, $this->mUniqPrefix );
 5119+ $text = self::extractTagsAndParams( $elements, $text, $matches, $this->mUniqPrefix );
51225120
51235121 foreach ( $matches as $marker => $data ) {
51245122 list( $element, $content, $params, $tag ) = $data;

Follow-up revisions

RevisionCommit summaryAuthorDate
r87316Fix up non static call to extractTagsAndParams in News...reedy02:57, 3 May 2011

Comments

#Comment by Platonides (talk | contribs)   22:16, 2 May 2011

extensions/News/NewsRenderer.php: $text = $parser->extractTagsAndParams

#Comment by Reedy (talk | contribs)   02:57, 3 May 2011

That's slightly amusing. It had one doing it one way, one the other

Status & tagging log