r113581 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113580‎ | r113581 | r113582 >
Date:18:58, 11 March 2012
Author:reedy
Status:ok
Tags:
Comment:
use getTitle() rather than Title()
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php
@@ -648,7 +648,7 @@
649649 */
650650 public static function pageQuality( $input, $args, $parser ) {
651651 list( $page_namespace, $index_namespace ) = self::getPageAndIndexNamespace();
652 - if ( !preg_match( "/^$page_namespace:(.*?)(\/([0-9]*)|)$/", $parser->Title()->getPrefixedText() ) ) {
 652+ if ( !preg_match( "/^$page_namespace:(.*?)(\/([0-9]*)|)$/", $parser->getTitle()->getPrefixedText() ) ) {
653653 return '';
654654 }
655655
@@ -669,7 +669,7 @@
670670 */
671671 public static function renderPageList( $input, $args, $parser ) {
672672 list( $page_namespace, $index_namespace ) = self::getPageAndIndexNamespace();
673 - if ( !preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $parser->Title()->getPrefixedText(), $m ) ) {
 673+ if ( !preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $parser->getTitle()->getPrefixedText(), $m ) ) {
674674 return '';
675675 }
676676
@@ -729,6 +729,10 @@
730730 /**
731731 * Parser hook that includes a list of pages.
732732 * parameters : index, from, to, header
 733+ * @param $input
 734+ * @param $args
 735+ * @param $parser Parser
 736+ * @return string
733737 */
734738 public static function renderPages( $input, $args, $parser ) {
735739 list( $page_namespace, $index_namespace ) = self::getPageAndIndexNamespace();
@@ -744,11 +748,11 @@
745749 $fromsection = array_key_exists( 'fromsection', $args ) ? $args['fromsection'] : null;
746750
747751 // abort if the tag is on an index page
748 - if ( preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $parser->Title()->getPrefixedText() ) ) {
 752+ if ( preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $parser->getTitle()->getPrefixedText() ) ) {
749753 return '';
750754 }
751755 // abort too if the tag is in the page namespace
752 - if ( preg_match( "/^$page_namespace:(.*?)(\/([0-9]*)|)$/", $parser->Title()->getPrefixedText() ) ) {
 756+ if ( preg_match( "/^$page_namespace:(.*?)(\/([0-9]*)|)$/", $parser->getTitle()->getPrefixedText() ) ) {
753757 return '';
754758 }
755759 if( !$index ) {
@@ -962,7 +966,7 @@
963967 $h_out .= "|value=$header";
964968 // find next and previous pages in list
965969 for( $i = 1; $i < count( $text_links[1] ); $i++ ) {
966 - if( $text_links[1][$i] == $parser->Title()->getPrefixedText() ) {
 970+ if( $text_links[1][$i] == $parser->getTitle()->getPrefixedText() ) {
967971 $current = $text_links[0][$i];
968972 break;
969973 }

Status & tagging log