* - string: Any non-empty string, not expected to be very long or contain newlines.
* <input type="text"> would be an appropriate HTML form field.
* - submodule: The name of a submodule of this module, see PARAM_SUBMODULE_MAP.
+ * - tags: A string naming an existing, explicitly-defined tag. Should usually be
+ * used with PARAM_ISMULTI.
* - text: Any non-empty string, expected to be very long or contain newlines.
* <textarea> would be an appropriate HTML form field.
* - timestamp: A timestamp in any format recognized by MWTimestamp, or the
break;
case 'upload': // nothing to do
break;
+ case 'tags':
+ // If change tagging was requested, check that the tags are valid.
+ if ( !is_array( $value ) && !$multi ) {
+ $value = array( $value );
+ }
+ $tagsStatus = ChangeTags::canAddTagsAccompanyingChange( $value );
+ if ( !$tagsStatus->isGood() ) {
+ $this->dieStatus( $tagsStatus );
+ }
+ break;
default:
ApiBase::dieDebug( __METHOD__, "Param $encParamName's type is unknown - $type" );
}