$form = new HTMLForm( $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( 'create' )->getLocalURL() );
$form->setWrapperLegendMsg( 'tags-create-heading' );
$form->setHeaderText( $this->msg( 'tags-create-explanation' )->parseAsBlock() );
$form = new HTMLForm( $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( 'create' )->getLocalURL() );
$form->setWrapperLegendMsg( 'tags-create-heading' );
$form->setHeaderText( $this->msg( 'tags-create-explanation' )->parseAsBlock() );
Xml::tags( 'th', null, $this->msg( 'tags-active-header' )->parse() ) .
Xml::tags( 'th', null, $this->msg( 'tags-hitcount-header' )->parse() ) .
( $userCanManage ?
Xml::tags( 'th', null, $this->msg( 'tags-active-header' )->parse() ) .
Xml::tags( 'th', null, $this->msg( 'tags-hitcount-header' )->parse() ) .
( $userCanManage ?
$isExtension = isset( $this->extensionDefinedTags[$tag] );
$isExplicit = isset( $this->explicitlyDefinedTags[$tag] );
if ( $isExtension ) {
$isExtension = isset( $this->extensionDefinedTags[$tag] );
$isExplicit = isset( $this->explicitlyDefinedTags[$tag] );
if ( $isExtension ) {
$hitcountLabel = Linker::link(
SpecialPage::getTitleFor( 'Recentchanges' ),
$hitcountLabel,
$hitcountLabel = Linker::link(
SpecialPage::getTitleFor( 'Recentchanges' ),
$hitcountLabel,
// delete
if ( ChangeTags::canDeleteTag( $tag )->isOK() ) {
$actionLinks[] = Linker::linkKnown( $this->getPageTitle( 'delete' ),
$this->msg( 'tags-delete' )->escaped(),
// delete
if ( ChangeTags::canDeleteTag( $tag )->isOK() ) {
$actionLinks[] = Linker::linkKnown( $this->getPageTitle( 'delete' ),
$this->msg( 'tags-delete' )->escaped(),
}
// activate
if ( ChangeTags::canActivateTag( $tag )->isOK() ) {
$actionLinks[] = Linker::linkKnown( $this->getPageTitle( 'activate' ),
$this->msg( 'tags-activate' )->escaped(),
}
// activate
if ( ChangeTags::canActivateTag( $tag )->isOK() ) {
$actionLinks[] = Linker::linkKnown( $this->getPageTitle( 'activate' ),
$this->msg( 'tags-activate' )->escaped(),
}
// deactivate
if ( ChangeTags::canDeactivateTag( $tag )->isOK() ) {
$actionLinks[] = Linker::linkKnown( $this->getPageTitle( 'deactivate' ),
$this->msg( 'tags-deactivate' )->escaped(),
}
// deactivate
if ( ChangeTags::canDeactivateTag( $tag )->isOK() ) {
$actionLinks[] = Linker::linkKnown( $this->getPageTitle( 'deactivate' ),
$this->msg( 'tags-deactivate' )->escaped(),
return true;
} elseif ( $status->isOK() ) {
// we have some warnings, so we show a confirmation form
return true;
} elseif ( $status->isOK() ) {
// we have some warnings, so we show a confirmation form
// fool HTMLForm into thinking the form hasn't been submitted yet. Otherwise
// we get into an infinite loop!
// fool HTMLForm into thinking the form hasn't been submitted yet. Otherwise
// we get into an infinite loop!
$subform->setAction( $this->getPageTitle( 'create' )->getLocalURL() );
$subform->setWrapperLegendMsg( 'tags-create-heading' );
$subform->setHeaderText( $headerText );
$subform->setAction( $this->getPageTitle( 'create' )->getLocalURL() );
$subform->setWrapperLegendMsg( 'tags-create-heading' );
$subform->setHeaderText( $headerText );
$form = new HTMLForm( $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( 'delete' )->getLocalURL() );
$form->tagAction = 'delete'; // custom property on HTMLForm object
$form = new HTMLForm( $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( 'delete' )->getLocalURL() );
$form->tagAction = 'delete'; // custom property on HTMLForm object
$form->setSubmitTextMsg( 'tags-delete-submit' );
$form->setSubmitDestructive(); // nasty!
$form->addPreText( $preText );
$form->setSubmitTextMsg( 'tags-delete-submit' );
$form->setSubmitDestructive(); // nasty!
$form->addPreText( $preText );
$func = $activate ? 'canActivateTag' : 'canDeactivateTag';
$result = ChangeTags::$func( $tag, $user );
if ( !$result->isGood() ) {
$func = $activate ? 'canActivateTag' : 'canDeactivateTag';
$result = ChangeTags::$func( $tag, $user );
if ( !$result->isGood() ) {
// tags-activate-question, tags-deactivate-question
$preText = $this->msg( "tags-$actionStr-question", $tag )->parseAsBlock();
// tags-activate-question, tags-deactivate-question
$preText = $this->msg( "tags-$actionStr-question", $tag )->parseAsBlock();
$form = new HTMLForm( $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( $actionStr )->getLocalURL() );
$form->tagAction = $actionStr;
$form = new HTMLForm( $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( $actionStr )->getLocalURL() );
$form->tagAction = $actionStr;
// tags-activate-submit, tags-deactivate-submit
$form->setSubmitTextMsg( "tags-$actionStr-submit" );
$form->addPreText( $preText );
// tags-activate-submit, tags-deactivate-submit
$form->setSubmitTextMsg( "tags-$actionStr-submit" );
$form->addPreText( $preText );
$tag, $data['Reason'], $context->getUser(), true );
if ( $status->isGood() ) {
$tag, $data['Reason'], $context->getUser(), true );
if ( $status->isGood() ) {
+ /**
+ * Return an array of subpages that this special page will accept.
+ *
+ * @return string[] subpages
+ */
+ public function getSubpagesForPrefixSearch() {
+ // The subpages does not have an own form, so not listing it at the moment
+ return [
+ // 'delete',
+ // 'activate',
+ // 'deactivate',
+ // 'create',
+ ];
+ }
+