X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialEditTags.php;h=476c452ad8a1ed9d59911715adf00284f59f0f7d;hb=e6cc2e79254c42e6c8e50c7dd43f9302fc74a10f;hp=916ba6b7bb0658dfbba84a863be8b8499ff8c4b5;hpb=23299ca8790bcf1aebcf54e0932b94338e630474;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialEditTags.php b/includes/specials/SpecialEditTags.php index 916ba6b7bb..476c452ad8 100644 --- a/includes/specials/SpecialEditTags.php +++ b/includes/specials/SpecialEditTags.php @@ -75,8 +75,8 @@ class SpecialEditTags extends UnlistedSpecialPage { $this->setHeaders(); $this->outputHeader(); - $this->getOutput()->addModules( array( 'mediawiki.special.edittags', - 'mediawiki.special.edittags.styles' ) ); + $this->getOutput()->addModules( [ 'mediawiki.special.edittags', + 'mediawiki.special.edittags.styles' ] ); $this->submitClicked = $request->wasPosted() && $request->getBool( 'wpSubmit' ); @@ -87,7 +87,7 @@ class SpecialEditTags extends UnlistedSpecialPage { $this->ids = explode( ',', $ids ); } else { // Array input - $this->ids = array_keys( $request->getArray( 'ids', array() ) ); + $this->ids = array_keys( $request->getArray( 'ids', [] ) ); } $this->ids = array_unique( array_filter( $this->ids ) ); @@ -145,7 +145,7 @@ class SpecialEditTags extends UnlistedSpecialPage { 'tag', $this->targetObj, '', /* user */ - array( 'lim' => 25, 'conds' => array(), 'useMaster' => $this->wasSaved ) + [ 'lim' => 25, 'conds' => [], 'useMaster' => $this->wasSaved ] ); } @@ -158,29 +158,30 @@ class SpecialEditTags extends UnlistedSpecialPage { // Also set header tabs to be for the target. $this->getSkin()->setRelevantTitle( $this->targetObj ); - $links = array(); - $links[] = Linker::linkKnown( + $linkRenderer = $this->getLinkRenderer(); + $links = []; + $links[] = $linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'Log' ), - $this->msg( 'viewpagelogs' )->escaped(), - array(), - array( + $this->msg( 'viewpagelogs' )->text(), + [], + [ 'page' => $this->targetObj->getPrefixedText(), 'hide_tag_log' => '0', - ) + ] ); if ( !$this->targetObj->isSpecialPage() ) { // Give a link to the page history - $links[] = Linker::linkKnown( + $links[] = $linkRenderer->makeKnownLink( $this->targetObj, - $this->msg( 'pagehist' )->escaped(), - array(), - array( 'action' => 'history' ) + $this->msg( 'pagehist' )->text(), + [], + [ 'action' => 'history' ] ); } // Link to Special:Tags - $links[] = Linker::linkKnown( + $links[] = $linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'Tags' ), - $this->msg( 'tags-edit-manage-link' )->escaped() + $this->msg( 'tags-edit-manage-link' )->text() ); // Logs themselves don't have histories or archived revisions $this->getOutput()->addSubtitle( $this->getLanguage()->pipeList( $links ) ); @@ -209,11 +210,11 @@ class SpecialEditTags extends UnlistedSpecialPage { $out = $this->getOutput(); // Messages: tags-edit-revision-selected, tags-edit-logentry-selected - $out->wrapWikiMsg( "$1", array( + $out->wrapWikiMsg( "$1", [ "tags-edit-{$this->typeName}-selected", $this->getLanguage()->formatNum( count( $this->ids ) ), $this->targetObj->getPrefixedText() - ) ); + ] ); $this->addHelpLink( 'Help:Tags' ); $out->addHTML( "
';
- $tagSelect = $this->getTagSelect( array(), $this->msg( 'tags-edit-add' )->plain() );
+ $tagSelect = $this->getTagSelect( [], $this->msg( 'tags-edit-add' )->plain() );
$html .= ' ' . $tagSelect[0] . ' ' . $tagSelect[1] . ' | '; $html .= Xml::element( 'p', null, $this->msg( 'tags-edit-remove' )->plain() ); $html .= Xml::checkLabel( $this->msg( 'tags-edit-remove-all-tags' )->plain(), @@ -328,10 +329,10 @@ class SpecialEditTags extends UnlistedSpecialPage { $i = 0; // used for generating checkbox IDs only foreach ( $tags as $tag ) { $html .= Xml::element( 'br' ) . "\n" . Xml::checkLabel( $tag, - 'wpTagsToRemove[]', 'mw-edittags-remove-' . $i++, false, array( + 'wpTagsToRemove[]', 'mw-edittags-remove-' . $i++, false, [ 'value' => $tag, 'class' => 'mw-edittags-remove-checkbox', - ) ); + ] ); } } @@ -356,7 +357,7 @@ class SpecialEditTags extends UnlistedSpecialPage { * index 1 */ protected function getTagSelect( $selectedTags, $label ) { - $result = array(); + $result = []; $result[0] = Xml::label( $label, 'mw-edittags-tag-list' ); $select = new XmlSelect( 'wpTagList[]', 'mw-edittags-tag-list', $selectedTags ); @@ -390,11 +391,11 @@ class SpecialEditTags extends UnlistedSpecialPage { // Evaluate incoming request data $tagList = $request->getArray( 'wpTagList' ); if ( is_null( $tagList ) ) { - $tagList = array(); + $tagList = []; } $existingTags = $request->getVal( 'wpExistingTags' ); if ( is_null( $existingTags ) || $existingTags === '' ) { - $existingTags = array(); + $existingTags = []; } else { $existingTags = explode( ',', $existingTags ); } |