Jsahleen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/185479

Change subject: Publishing options: Fix user namespace publishing
......................................................................

Publishing options: Fix user namespace publishing

* Changes regex to look for username when updating version on drafts.

Bug: T76180
Change-Id: I0af1e9510f5e3f8ebe4a611194b1aaefe86548f7
---
M modules/publish/ext.cx.publish.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/79/185479/1

diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index 0d53c03..0a542bd 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -225,7 +225,7 @@
                                                        .text( mw.msg( 
'cx-publish-button' ) );
                                        } );
                                } else if ( publishAnyway === false ) {
-                                       if ( /^User:/.test( publishedTitle ) ) {
+                                       if ( new RegExp( username ).test( 
publishedTitle ) ) {
                                                publishedTitle = 
increaseVersion( publishedTitle );
                                        } else {
                                                publishedTitle = 'User:' + 
username + '/' + publishedTitle;

-- 
To view, visit https://gerrit.wikimedia.org/r/185479
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0af1e9510f5e3f8ebe4a611194b1aaefe86548f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to