2009-04-23 04:23:56 +00:00
|
|
|
<?php
|
|
|
|
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-10-07 13:57:06 +00:00
|
|
|
|
2011-11-16 05:34:24 +00:00
|
|
|
$out->addWikiMsg( 'abusefilter-import-intro' );
|
2009-10-07 13:57:06 +00:00
|
|
|
|
2009-04-23 04:23:56 +00:00
|
|
|
$html = Xml::textarea( 'wpImportText', '', 40, 20 );
|
2010-03-13 17:35:12 +00:00
|
|
|
$html .= Xml::submitButton(
|
|
|
|
wfMsg( 'abusefilter-import-submit' ),
|
|
|
|
array( 'accesskey' => 's' )
|
|
|
|
);
|
2009-04-23 04:23:56 +00:00
|
|
|
$url = SpecialPage::getTitleFor( 'AbuseFilter', 'new' )->getFullURL();
|
2009-10-07 13:57:06 +00:00
|
|
|
|
2009-04-23 04:23:56 +00:00
|
|
|
$html = Xml::tags( 'form', array( 'method' => 'post', 'action' => $url ), $html );
|
2009-10-07 13:57:06 +00:00
|
|
|
|
2011-11-16 05:34:24 +00:00
|
|
|
$out->addHTML( $html );
|
2009-04-23 04:23:56 +00:00
|
|
|
}
|
|
|
|
}
|