Jdlrobson has uploaded a new change for review.

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


Change subject: Ensure namespace is passed when history code loaded
......................................................................

Ensure namespace is passed when history code loaded

Note you can still lazy load from search via a talk page so
URL should be rewritten correctly

Also ensure that the page doesn't get re-rendered with a talk
icon after talk page is edited.

Bug: 55594
Change-Id: Ib140dcff8bc6252abb3a7106554c86d50ff68b2b
---
M javascripts/common/Page.js
M javascripts/common/history-alpha.js
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/72/90072/1

diff --git a/javascripts/common/Page.js b/javascripts/common/Page.js
index 8b36ae3..aeec58a 100644
--- a/javascripts/common/Page.js
+++ b/javascripts/common/Page.js
@@ -42,6 +42,8 @@
                render: function( options ) {
                        var pageTitle = options.title, self = this,
                                $el = this.$el, _super = self._super;
+                       // prevent talk icon being re-rendered after an edit to 
a talk page
+                       options.isTalkPage = self.isTalkPage();
 
                        // FIXME: this is horrible, because it makes preRender 
run _during_ render...
                        if ( !options.sections ) {
diff --git a/javascripts/common/history-alpha.js 
b/javascripts/common/history-alpha.js
index 9676c88..fb87b7d 100644
--- a/javascripts/common/history-alpha.js
+++ b/javascripts/common/history-alpha.js
@@ -23,7 +23,8 @@
 
        // do not run more than once
        function init() {
-               var title = mw.config.get( 'wgTitle' ),
+               // use wgPageName to ensure we keep the namespace prefix
+               var title = mw.config.get( 'wgPageName' ),
                        currentUrl = mw.util.wikiGetlink( title, M.query );
                // initial history state does not contain title
                // run before binding to avoid nasty surprises

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib140dcff8bc6252abb3a7106554c86d50ff68b2b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to