Index: trunk/extensions/FindSpam/FindSpam_body.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | */ |
23 | 23 | public function execute( $par ) { |
24 | 24 | global $wgRequest, $wgOut, $wgLocalDatabases, $wgUser; |
25 | | - global $wgConf, $wgCanonicalNamespaceNames, $wgLang; |
| 25 | + global $wgConf, $wgLang; |
26 | 26 | |
27 | 27 | $this->setHeaders(); |
28 | 28 | |
— | — | @@ -34,8 +34,7 @@ |
35 | 35 | $ip = $wgRequest->getText( 'ip' ); |
36 | 36 | |
37 | 37 | # Show form |
38 | | - $self = SpecialPage::getTitleFor( 'FindSpam' ); |
39 | | - $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) ); |
| 38 | + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) ); |
40 | 39 | $form .= '<table><tr><td align="right">' . wfMsgHtml( 'findspam-ip' ) . '</td>'; |
41 | 40 | $form .= '<td>' . Xml::input( 'ip', 50, $ip ) . '</td></tr>'; |
42 | 41 | $form .= '<tr><td></td><td>' . Xml::submitButton( wfMsg( 'findspam-ok' ) ) . '</td></tr></table></form>'; |
— | — | @@ -63,7 +62,7 @@ |
64 | 63 | if ( $row->rc_namespace == 0 ){ |
65 | 64 | $title = $row->rc_title; |
66 | 65 | } else { |
67 | | - $title = $wgCanonicalNamespaceNames[$row->rc_namespace] . ':' .$row->rc_title; |
| 66 | + $title = MWNamespace::getCanonicalName( $row->rc_namespace ) . ':' .$row->rc_title; |
68 | 67 | } |
69 | 68 | $encTitle = urlencode( $title ); |
70 | 69 | $url = "$baseUrl/wiki/$encTitle"; |
— | — | @@ -88,4 +87,4 @@ |
89 | 88 | $wgOut->addWikiText( $s.'<br />' ); |
90 | 89 | } |
91 | 90 | } |
92 | | -} |
\ No newline at end of file |
| 91 | +} |