mediawiki-extensions-AbuseF.../Views/AbuseFilterViewImport.php
John Du Hart 274dcd06a2 Pass one of converting AbuseFilter to use ContextSource
The main AbuseFilter class still needs to be fixed up, but that's a bigger job and I'm out of time
2011-11-16 05:34:24 +00:00

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 );
}
}