Index: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php |
— | — | @@ -318,8 +318,8 @@ |
319 | 319 | } else { |
320 | 320 | // Get link changes in the slowest way known to man |
321 | 321 | $oldtext = $this->loadText( $editPage, $section ); |
322 | | - $oldLinks = $this->findLinks( $oldtext ); |
323 | | - $newLinks = $this->findLinks( $newtext ); |
| 322 | + $oldLinks = $this->findLinks( $editPage, $oldtext ); |
| 323 | + $newLinks = $this->findLinks( $editPage, $newtext ); |
324 | 324 | } |
325 | 325 | |
326 | 326 | $unknownLinks = array_filter( $newLinks, array( &$this, 'filterLink' ) ); |
— | — | @@ -647,12 +647,12 @@ |
648 | 648 | * @param string $text |
649 | 649 | * @return array of strings |
650 | 650 | */ |
651 | | - function findLinks( $text ) { |
652 | | - global $wgParser, $wgTitle, $wgUser; |
| 651 | + function findLinks( &$editpage, $text ) { |
| 652 | + global $wgParser, $wgUser; |
653 | 653 | |
654 | 654 | $options = new ParserOptions(); |
655 | | - $text = $wgParser->preSaveTransform( $text, $wgTitle, $wgUser, $options ); |
656 | | - $out = $wgParser->parse( $text, $wgTitle, $options ); |
| 655 | + $text = $wgParser->preSaveTransform( $text, $editpage->mTitle, $wgUser, $options ); |
| 656 | + $out = $wgParser->parse( $text, $editpage->mTitle, $options ); |
657 | 657 | |
658 | 658 | return array_keys( $out->getExternalLinks() ); |
659 | 659 | } |