mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-14 09:44:44 +00:00
25 lines
641 B
PHP
25 lines
641 B
PHP
<?php
|
|
class AbuseFilterViewImport extends AbuseFilterView {
|
|
|
|
function show() {
|
|
global $wgOut, $wgUser;
|
|
if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) {
|
|
$wgOut->addWikiMsg( 'abusefilter-edit-notallowed' );
|
|
return;
|
|
}
|
|
|
|
$wgOut->addWikiMsg( 'abusefilter-import-intro' );
|
|
|
|
$html = Xml::textarea( 'wpImportText', '', 40, 20 );
|
|
$html .= Xml::submitButton(
|
|
wfMsg( 'abusefilter-import-submit' ),
|
|
array( 'accesskey' => 's' )
|
|
);
|
|
$url = SpecialPage::getTitleFor( 'AbuseFilter', 'new' )->getFullURL();
|
|
|
|
$html = Xml::tags( 'form', array( 'method' => 'post', 'action' => $url ), $html );
|
|
|
|
$wgOut->addHTML( $html );
|
|
}
|
|
}
|