2009-04-23 04:23:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class AbuseFilterViewImport extends AbuseFilterView {
|
2009-10-07 13:57:06 +00:00
|
|
|
|
|
|
|
function show() {
|
|
|
|
global $wgOut, $wgUser;
|
2009-09-18 10:05:20 +00:00
|
|
|
if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) {
|
|
|
|
$wgOut->addWikiMsg( 'abusefilter-edit-notallowed' );
|
|
|
|
return;
|
|
|
|
}
|
2009-10-07 13:57:06 +00:00
|
|
|
|
2009-04-23 04:23:56 +00:00
|
|
|
$wgOut->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 );
|
|
|
|
$html .= Xml::submitButton( wfMsg( 'abusefilter-import-submit' ) );
|
|
|
|
$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
|
|
|
|
2009-04-23 04:23:56 +00:00
|
|
|
$wgOut->addHTML( $html );
|
|
|
|
}
|
|
|
|
}
|