Index: branches/pageoutput/includes/SpecialPage.php |
— | — | @@ -632,17 +632,25 @@ |
633 | 633 | } |
634 | 634 | |
635 | 635 | /** |
| 636 | + * Get the textual form of the target. |
| 637 | + * This may be from the parameter or from the target in the request |
| 638 | + */ |
| 639 | + public function getTargetText() { |
| 640 | + $par = $this->getParameter(); |
| 641 | + if ( !is_null( $par ) ) { |
| 642 | + return $par; |
| 643 | + } |
| 644 | + return $this->getRequest()->getVal( 'target', null ); |
| 645 | + } |
| 646 | + |
| 647 | + /** |
636 | 648 | * Get the target. |
637 | 649 | * This may be from the parameter or from the target in the request |
638 | 650 | * @note This cannot be getTarget because SpecialEmailUser has a static with that name |
639 | 651 | */ |
640 | 652 | public function target() { |
641 | 653 | if ( is_null( $this->mTargetParameter ) ) { |
642 | | - $par = $this->getParameter(); |
643 | | - if ( !is_null( $par ) ) { |
644 | | - return $par; |
645 | | - } |
646 | | - $target = $this->getRequest()->getVal( 'target', null ); |
| 654 | + $target = $this->getTargetText(); |
647 | 655 | |
648 | 656 | if ( $this instanceof SpecialTitleTarget ) { |
649 | 657 | $target = Title::newFromURL( $target ); |