mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-25 06:26:03 +00:00
53b377a6d3
Bug: T132284 Change-Id: Ife1ed3af19a4b4b506948763e4d92efc3a14a5bf
25 lines
657 B
PHP
25 lines
657 B
PHP
<?php
|
|
|
|
class AbuseFilterViewImport extends AbuseFilterView {
|
|
function show() {
|
|
$out = $this->getOutput();
|
|
if ( !$this->getUser()->isAllowed( 'abusefilter-modify' ) ) {
|
|
$out->addWikiMsg( 'abusefilter-edit-notallowed' );
|
|
return;
|
|
}
|
|
$url = SpecialPage::getTitleFor( 'AbuseFilter', 'new' )->getFullURL();
|
|
|
|
$formDescriptor = array(
|
|
'ImportText' => array(
|
|
'type' => 'textarea',
|
|
'cols' => 200,
|
|
)
|
|
);
|
|
$htmlForm = new HTMLForm( $formDescriptor, $this->getContext() );
|
|
$htmlForm->setHeaderText( $this->msg( 'abusefilter-import-intro' ) )
|
|
->setSubmitTextMsg( 'abusefilter-import-submit' )
|
|
->setAction( $url )
|
|
->show();
|
|
}
|
|
}
|