mediawiki-extensions-AbuseF.../Views/AbuseFilterViewImport.php
Siebrand Mazeland 176227e721 Maintenance for AbuseFilter extension.
* Replace deprecated methods.
* Remove no longer needed function fnmatch().
* Remove superfluous newlines.
* Remove unused and redundant local variables and globals.
* Deglobalization.
* Update documentation.
* Fix incorrect return values or add FIXMEs when in doubt.
* Escape output in a few places where needed.
* Remove unneeded MEDIAWIKI constant checks.
* Fix various JSHint/JSLint issues.

Patch Set 11: Merged https://gerrit.wikimedia.org/r/24701 into
this one per Siebrand's request

Change-Id: I02ba4ce31b6aca5b7324114093f8ece143abc295
2012-10-09 22:26:45 +02:00

25 lines
660 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(
$this->msg( 'abusefilter-import-submit' )->text(),
array( 'accesskey' => 's' )
);
$url = SpecialPage::getTitleFor( 'AbuseFilter', 'new' )->getFullURL();
$html = Xml::tags( 'form', array( 'method' => 'post', 'action' => $url ), $html );
$out->addHTML( $html );
}
}