mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-12 08:49:28 +00:00
274dcd06a2
The main AbuseFilter class still needs to be fixed up, but that's a bigger job and I'm out of time
25 lines
647 B
PHP
25 lines
647 B
PHP
<?php
|
|
class AbuseFilterViewImport extends AbuseFilterView {
|
|
|
|
function show() {
|
|
$out = $this->getOutput();
|
|
if ( !$this->getUser()->isAllowed( 'abusefilter-modify' ) ) {
|
|
$out->addWikiMsg( 'abusefilter-edit-notallowed' );
|
|
return;
|
|
}
|
|
|
|
$out->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 );
|
|
|
|
$out->addHTML( $html );
|
|
}
|
|
}
|