Hydriz has uploaded a new change for review.

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


Change subject: Fix link to article history not working properly when not using 
short URLs
......................................................................

Fix link to article history not working properly when not using short URLs

If the wiki has short URLs enabled (i.e. /wiki/Foo), the extension
will link to the article's history page correctly. If the wiki is
using old-style URLs (i.e. /w/index.php?title=Foo), the link to the
article history will then not work (since it appends "?action=history",
resulting in a "/w/index.php?title=Foo?action=history" link.

Change-Id: I6b8433fbd969587b3a4e30c090a6b9530ac00a0c
---
M modules/lastmodified.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LastModified 
refs/changes/13/107013/1

diff --git a/modules/lastmodified.js b/modules/lastmodified.js
index 07bda49..78388b8 100644
--- a/modules/lastmodified.js
+++ b/modules/lastmodified.js
@@ -81,7 +81,7 @@
  * @return string      Return the article title
  */
 function getArticleHistoryLink() {
-       return mw.util.wikiGetlink( mw.config.get('wgPageName') ) + 
'?action=history';
+       return mw.config.get( 'wgScript' ) + '?title=' + encodeURIComponent( 
mw.config.get( 'wgPageName' ) ) + '&action=history';
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b8433fbd969587b3a4e30c090a6b9530ac00a0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LastModified
Gerrit-Branch: master
Gerrit-Owner: Hydriz <ad...@alphacorp.tk>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to