mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-12-18 16:41:08 +00:00
176227e721
* 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
25 lines
660 B
PHP
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 );
|
|
}
|
|
}
|