Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/250484
Change subject: Actually display a link to existing file with the same name
......................................................................
Actually display a link to existing file with the same name
All the code and messages are there (code had some bugs because it
never ran), but we were checking for the wrong thing.
Change-Id: Iae0e9de59b17f9ad33cebdb368a1ce5e56212fb8
---
M resources/mw.UploadWizardDetails.js
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard
refs/changes/84/250484/1
diff --git a/resources/mw.UploadWizardDetails.js
b/resources/mw.UploadWizardDetails.js
index 2db8530..dff90d8 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -1025,13 +1025,13 @@
if ( !result.unique.isUnique ) {
// result is NOT unique
- if ( result.href ) {
- errHtml = mw.message(
'mwe-upwiz-fileexists-replace-on-page', titleString, $( '<a>' ).attr( { href:
result.href, target: '_blank' } ) ).parse();
+ if ( result.unique.href ) {
+ errHtml = mw.message(
'mwe-upwiz-fileexists-replace-on-page', titleString, $( '<a>' ).attr( { href:
result.unique.href, target: '_blank' } ) ).parse();
} else {
- errHtml = mw.message(
'mwe-upwiz-fileexists-replace-no-link', titleString ).text();
+ errHtml = mw.message(
'mwe-upwiz-fileexists-replace-no-link', titleString ).escaped();
}
- $errorEl.text( errHtml );
+ $errorEl.html( errHtml );
} else if ( result.unique.isProtected ) {
errHtml = mw.message(
'mwe-upwiz-error-title-protected' ).text();
$errorEl.text( errHtml );
--
To view, visit https://gerrit.wikimedia.org/r/250484
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae0e9de59b17f9ad33cebdb368a1ce5e56212fb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits