2009-04-23 04:23:56 +00:00
|
|
|
<?php
|
2009-10-07 13:57:06 +00:00
|
|
|
|
2012-09-02 11:07:02 +00:00
|
|
|
class AbuseFilterViewImport extends AbuseFilterView {
|
2009-10-07 13:57:06 +00:00
|
|
|
function show() {
|
2011-11-16 05:34:24 +00:00
|
|
|
$out = $this->getOutput();
|
|
|
|
if ( !$this->getUser()->isAllowed( 'abusefilter-modify' ) ) {
|
|
|
|
$out->addWikiMsg( 'abusefilter-edit-notallowed' );
|
2009-09-18 10:05:20 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-04-23 04:23:56 +00:00
|
|
|
$url = SpecialPage::getTitleFor( 'AbuseFilter', 'new' )->getFullURL();
|
2009-10-07 13:57:06 +00:00
|
|
|
|
2016-04-10 13:44:18 +00:00
|
|
|
$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();
|
2009-04-23 04:23:56 +00:00
|
|
|
}
|
|
|
|
}
|