X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialTags.php;h=6b0598cefcc4deebd65baef0c803a656aaeb9cb8;hb=ae44721ee44aa7048e30ec0020bcea3d3cd04f7b;hp=898d170642e2556d5995870715906bc4558f2db3;hpb=ef50d30b7b8e3b6f8480b74135f2f2e30f479336;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index 898d170642..6b0598cefc 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -98,7 +98,7 @@ class SpecialTags extends SpecialPage { ], ]; - $form = new HTMLForm( $fields, $this->getContext() ); + $form = HTMLForm::factory( 'ooui', $fields, $this->getContext() ); $form->setAction( $this->getPageTitle( 'create' )->getLocalURL() ); $form->setWrapperLegendMsg( 'tags-create-heading' ); $form->setHeaderText( $this->msg( 'tags-create-explanation' )->parseAsBlock() ); @@ -176,7 +176,7 @@ class SpecialTags extends SpecialPage { $newRow .= Xml::tags( 'td', null, Xml::element( 'code', null, $tag ) ); $linkRenderer = $this->getLinkRenderer(); - $disp = ChangeTags::tagDescription( $tag ); + $disp = ChangeTags::tagDescription( $tag, $this->getContext() ); if ( $showEditLinks ) { $disp .= ' '; $editLink = $linkRenderer->makeLink( @@ -246,7 +246,6 @@ class SpecialTags extends SpecialPage { } if ( $showManageActions ) { // we've already checked that the user had the requisite userright - // activate if ( ChangeTags::canActivateTag( $tag )->isOK() ) { $actionLinks[] = $linkRenderer->makeKnownLink( @@ -264,7 +263,6 @@ class SpecialTags extends SpecialPage { [], [ 'tag' => $tag ] ); } - } if ( $showDeleteActions || $showManageActions ) { @@ -312,7 +310,7 @@ class SpecialTags extends SpecialPage { $out->parse( $status->getWikiText() ) . $this->msg( 'tags-create-warnings-below' )->parseAsBlock(); - $subform = new HTMLForm( $fields, $this->getContext() ); + $subform = HTMLForm::factory( 'ooui', $fields, $this->getContext() ); $subform->setAction( $this->getPageTitle( 'create' )->getLocalURL() ); $subform->setWrapperLegendMsg( 'tags-create-heading' ); $subform->setHeaderText( $headerText ); @@ -377,7 +375,7 @@ class SpecialTags extends SpecialPage { 'required' => true, ]; - $form = new HTMLForm( $fields, $this->getContext() ); + $form = HTMLForm::factory( 'ooui', $fields, $this->getContext() ); $form->setAction( $this->getPageTitle( 'delete' )->getLocalURL() ); $form->tagAction = 'delete'; // custom property on HTMLForm object $form->setSubmitCallback( [ $this, 'processTagForm' ] ); @@ -428,7 +426,7 @@ class SpecialTags extends SpecialPage { 'required' => true, ]; - $form = new HTMLForm( $fields, $this->getContext() ); + $form = HTMLForm::factory( 'ooui', $fields, $this->getContext() ); $form->setAction( $this->getPageTitle( $actionStr )->getLocalURL() ); $form->tagAction = $actionStr; $form->setSubmitCallback( [ $this, 'processTagForm' ] ); @@ -443,7 +441,7 @@ class SpecialTags extends SpecialPage { $out = $context->getOutput(); $tag = $data['HiddenTag']; - $status = call_user_func( [ 'ChangeTags', "{$form->tagAction}TagWithChecks" ], + $status = call_user_func( [ ChangeTags::class, "{$form->tagAction}TagWithChecks" ], $tag, $data['Reason'], $context->getUser(), true ); if ( $status->isGood() ) {