Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| AbuseFilterViewImport | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| show | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\AbuseFilter\View; |
| 4 | |
| 5 | use MediaWiki\HTMLForm\HTMLForm; |
| 6 | |
| 7 | class AbuseFilterViewImport extends AbuseFilterView { |
| 8 | /** |
| 9 | * Shows the page |
| 10 | */ |
| 11 | public function show() { |
| 12 | $out = $this->getOutput(); |
| 13 | if ( !$this->afPermManager->canEdit( $this->getAuthority() ) ) { |
| 14 | $out->addWikiMsg( 'abusefilter-edit-notallowed' ); |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | $out->addWikiMsg( 'abusefilter-import-intro' ); |
| 19 | |
| 20 | $formDescriptor = [ |
| 21 | 'ImportText' => [ |
| 22 | 'type' => 'textarea', |
| 23 | 'required' => true |
| 24 | ] |
| 25 | ]; |
| 26 | HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) |
| 27 | ->setTitle( $this->getTitle( 'new' ) ) |
| 28 | ->setSubmitTextMsg( 'abusefilter-import-submit' ) |
| 29 | ->show(); |
| 30 | } |
| 31 | } |