mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-14 19:31:44 +00:00
PortableInfoboxBuilder: Force "Template:" prefix on publishing (#53)
This commit is contained in:
parent
c934b05a49
commit
5ef16a60b6
|
@ -245,13 +245,15 @@
|
|||
required: true
|
||||
}
|
||||
} ).done( ( title ) => {
|
||||
if ( title === null || title.trim() === "" ) {
|
||||
if ( title === null || title.trim() === '' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
let namespace = ( title.substring( 0, 9 ) !== 'Template:' ? 'Template:' : '' );
|
||||
|
||||
this.api.postWithToken( 'csrf', {
|
||||
action: 'edit',
|
||||
title: title,
|
||||
title: namespace + title,
|
||||
text: this.getInfoboxMarkup(),
|
||||
summary: this.msg( 'editsummary' ),
|
||||
notminor: true,
|
||||
|
|
Loading…
Reference in a new issue