X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialEditTags.php;h=252d07670e0b69b9bbf1f49fa0d572117abb5232;hb=279dd4156c6195be16fe497980d73cd2e5c95884;hp=97b04c23f555d903928dce43925a458d7079bdc6;hpb=f2ee7d246a9e1c32fb8c1f16c59f6f50d0478ca2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialEditTags.php b/includes/specials/SpecialEditTags.php index 97b04c23f5..252d07670e 100644 --- a/includes/specials/SpecialEditTags.php +++ b/includes/specials/SpecialEditTags.php @@ -55,6 +55,10 @@ class SpecialEditTags extends UnlistedSpecialPage { parent::__construct( 'EditTags', 'changetags' ); } + public function doesWrites() { + return true; + } + public function execute( $par ) { $this->checkPermissions(); $this->checkReadOnly(); @@ -71,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' ); @@ -83,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 ) ); @@ -141,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 ] ); } @@ -154,23 +158,23 @@ class SpecialEditTags extends UnlistedSpecialPage { // Also set header tabs to be for the target. $this->getSkin()->setRelevantTitle( $this->targetObj ); - $links = array(); + $links = []; $links[] = Linker::linkKnown( SpecialPage::getTitleFor( 'Log' ), $this->msg( 'viewpagelogs' )->escaped(), - array(), - array( + [], + [ 'page' => $this->targetObj->getPrefixedText(), 'hide_tag_log' => '0', - ) + ] ); if ( !$this->targetObj->isSpecialPage() ) { // Give a link to the page history $links[] = Linker::linkKnown( $this->targetObj, $this->msg( 'pagehist' )->escaped(), - array(), - array( 'action' => 'history' ) + [], + [ 'action' => 'history' ] ); } // Link to Special:Tags @@ -205,11 +209,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(), @@ -324,10 +328,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', - ) ); + ] ); } } @@ -352,7 +356,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 ); @@ -386,11 +390,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 ); } |