From 8fec7ed09ab23f99855cb76faf630b3aa9e0223d Mon Sep 17 00:00:00 2001 From: Thalia Date: Thu, 8 Nov 2018 14:28:21 +0000 Subject: [PATCH] TitlesMultiselectWidget: rename 'limit' config to 'tagLimit' To avoid conflicting with TitleWidget config. Bug: T209057 Change-Id: Ia0dbc49f38a116202eb2658b7556fb7f0627f1bb --- .../htmlform/fields/HTMLTitlesMultiselectField.php | 2 +- includes/widget/TitlesMultiselectWidget.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/htmlform/fields/HTMLTitlesMultiselectField.php b/includes/htmlform/fields/HTMLTitlesMultiselectField.php index 9385c8183d..e2399b9c55 100644 --- a/includes/htmlform/fields/HTMLTitlesMultiselectField.php +++ b/includes/htmlform/fields/HTMLTitlesMultiselectField.php @@ -96,7 +96,7 @@ class HTMLTitlesMultiselectField extends HTMLTitleTextField { } if ( isset( $this->mParams['max'] ) ) { - $params['limit'] = $this->mParams['max']; + $params['tagLimit'] = $this->mParams['max']; } if ( isset( $this->mParams['showMissing'] ) ) { diff --git a/includes/widget/TitlesMultiselectWidget.php b/includes/widget/TitlesMultiselectWidget.php index 61aa40524b..316748d2ad 100644 --- a/includes/widget/TitlesMultiselectWidget.php +++ b/includes/widget/TitlesMultiselectWidget.php @@ -15,7 +15,7 @@ class TitlesMultiselectWidget extends \OOUI\Widget { protected $titlesArray = []; protected $inputName = null; protected $inputPlaceholder = null; - protected $limit = null; + protected $tagLimit = null; protected $showMissing = null; /** @@ -23,7 +23,7 @@ class TitlesMultiselectWidget extends \OOUI\Widget { * - array $config['titles'] Array of titles to use as preset data * - array $config['placeholder'] Placeholder message for input * - array $config['name'] Name attribute (used in forms) - * - number $config['limit'] Maximum number of selected titles + * - number $config['tagLimit'] Maximum number of selected titles * - bool $config['showMissing'] Show missing pages */ public function __construct( array $config = [] ) { @@ -39,8 +39,8 @@ class TitlesMultiselectWidget extends \OOUI\Widget { if ( isset( $config['placeholder'] ) ) { $this->inputPlaceholder = $config['placeholder']; } - if ( isset( $config['limit'] ) ) { - $this->limit = $config['limit']; + if ( isset( $config['tagLimit'] ) ) { + $this->tagLimit = $config['tagLimit']; } if ( isset( $config['showMissing'] ) ) { $this->showMissing = $config['showMissing']; @@ -69,8 +69,8 @@ class TitlesMultiselectWidget extends \OOUI\Widget { if ( $this->inputPlaceholder !== null ) { $config['placeholder'] = $this->inputPlaceholder; } - if ( $this->limit !== null ) { - $config['limit'] = $this->limit; + if ( $this->tagLimit !== null ) { + $config['tagLimit'] = $this->tagLimit; } if ( $this->showMissing !== null ) { $config['showMissing'] = $this->showMissing; -- 2.20.1