value = mw.widgets.TitleInputWidget.parent.prototype.cleanUpValue.call( this, value );
return $.trimByteLength( this.value, value, this.maxLength, function ( value ) {
- var title = widget.getTitle( value );
+ var title = widget.getMWTitle( value );
return title ? title.getMain() : value;
} ).newVal;
};
* @param {string} [value] Value to get a title for
* @return {mw.Title|null} Title object, or null if value is invalid
*/
- mw.widgets.TitleWidget.prototype.getTitle = function ( value ) {
+ mw.widgets.TitleWidget.prototype.getMWTitle = function ( value ) {
var title = value !== undefined ? value : this.getQueryValue(),
// mw.Title doesn't handle null well
titleObj = mw.Title.newFromText( title, this.namespace !== null ? this.namespace : undefined );
* @return {boolean} The query is valid
*/
mw.widgets.TitleWidget.prototype.isQueryValid = function () {
- return this.validateTitle ? !!this.getTitle() : true;
+ return this.validateTitle ? !!this.getMWTitle() : true;
};
}( jQuery, mediaWiki ) );