- env: dbtype=mysql dbuser=root
php: hhvm-3.18
allow_failures:
- - php: hhvm-3.24
+ - php: 7.2
+ - env: dbtype=postgres dbuser=travis
+ - php: hhvm-3.18
- php: hhvm-3.21
+ - php: hhvm-3.24
services:
- mysql
email: false
irc:
channels:
- - "chat.freenode.net#mediawiki-feed"
+ - "chat.freenode.net#wikimedia-dev"
+ template:
+ - "%{repository}#%{build_number} (%{branch} - %{commit} %{author}): %{message} - %{build_url}"
on_success: change
- on_failure: change
- skip_join: true
+ on_failure: always
* @return string The language code which complying with BCP 47 standards.
*/
function wfBCP47( $code ) {
+ wfDeprecated( __METHOD__, '1.31' );
return LanguageCode::bcp47( $code );
}
* @cfg {boolean} [showMissing=true] Show missing pages
* @cfg {boolean} [addQueryInput=true] Add exact user's input query to results
* @cfg {boolean} [excludeCurrentPage] Exclude the current page from suggestions
- * @cfg {boolean} [validateTitle=true] Whether the input must be a valid title (if set to true,
- * the widget will marks itself red for invalid inputs, including an empty query).
+ * @cfg {boolean} [validateTitle=true] Whether the input must be a valid title
+ * @cfg {boolean} [required=false] Whether the input must not be empty
* @cfg {Object} [cache] Result cache which implements a 'set' method, taking keyed values as an argument
* @cfg {mw.Api} [api] API object to use, creates a default mw.Api instance if not specified
*/
* @return {boolean} The query is valid
*/
mw.widgets.TitleWidget.prototype.isQueryValid = function () {
- return this.validateTitle ? !!this.getMWTitle() : true;
+ if ( !this.validateTitle ) {
+ return true;
+ }
+ if ( !this.required && this.getQueryValue() === '' ) {
+ return true;
+ }
+ return !!this.getMWTitle();
};
}( jQuery, mediaWiki ) );