summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialEditTags.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-12-20 09:00:55 +0100
committerPierre Schmitz <pierre@archlinux.de>2015-12-20 09:00:55 +0100
commita2190ac74dd4d7080b12bab90e552d7aa81209ef (patch)
tree8b31f38de9882d18df54cf8d9e0de74167a094eb /includes/specials/SpecialEditTags.php
parent15e69f7b20b6596b9148030acce5b59993b95a45 (diff)
parent257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff)
Merge branch 'mw-1.26'
Diffstat (limited to 'includes/specials/SpecialEditTags.php')
-rw-r--r--includes/specials/SpecialEditTags.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/includes/specials/SpecialEditTags.php b/includes/specials/SpecialEditTags.php
index f41a1f1d..d2b2e708 100644
--- a/includes/specials/SpecialEditTags.php
+++ b/includes/specials/SpecialEditTags.php
@@ -123,7 +123,7 @@ class SpecialEditTags extends UnlistedSpecialPage {
// Either submit or create our form
if ( $this->isAllowed && $this->submitClicked ) {
- $this->submit( $request );
+ $this->submit();
} else {
$this->showForm();
}
@@ -349,20 +349,18 @@ class SpecialEditTags extends UnlistedSpecialPage {
protected function getTagSelect( $selectedTags, $label ) {
$result = array();
$result[0] = Xml::label( $label, 'mw-edittags-tag-list' );
- $result[1] = Xml::openElement( 'select', array(
- 'name' => 'wpTagList[]',
- 'id' => 'mw-edittags-tag-list',
- 'multiple' => 'multiple',
- 'size' => '8',
- ) );
+
+ $select = new XmlSelect( 'wpTagList[]', 'mw-edittags-tag-list', $selectedTags );
+ $select->setAttribute( 'multiple', 'multiple' );
+ $select->setAttribute( 'size', '8' );
$tags = ChangeTags::listExplicitlyDefinedTags();
$tags = array_unique( array_merge( $tags, $selectedTags ) );
- foreach ( $tags as $tag ) {
- $result[1] .= Xml::option( $tag, $tag, in_array( $tag, $selectedTags ) );
- }
- $result[1] .= Xml::closeElement( 'select' );
+ // Values of $tags are also used as <option> labels
+ $select->addOptions( array_combine( $tags, $tags ) );
+
+ $result[1] = $select->getHTML();
return $result;
}