Skip to content

Attempt to fix wrong header on redirected page#16

Open
hexmode wants to merge 1 commit intoenterprisemediawiki:masterfrom
hexmode:redirect-bug
Open

Attempt to fix wrong header on redirected page#16
hexmode wants to merge 1 commit intoenterprisemediawiki:masterfrom
hexmode:redirect-bug

Conversation

@hexmode
Copy link
Copy Markdown

@hexmode hexmode commented Jul 19, 2018

fixes #15

@jamesmontalvo3
Copy link
Copy Markdown
Contributor

Attempt to fix? Or does fix?

@hexmode
Copy link
Copy Markdown
Author

hexmode commented Jul 20, 2018

I haven't tested this because I don't have a place to. I was hoping that Rich could test it.

@jamesmontalvo3
Copy link
Copy Markdown
Contributor

Copy. @revansx ?

@jamesmontalvo3
Copy link
Copy Markdown
Contributor

@hexmode @revansx what's happening with this PR?

@MrMebelMan
Copy link
Copy Markdown

MrMebelMan commented Nov 23, 2018

This PR seems valid. Mediawiki says to not use $wgTitle, unless absolutely needed.
"$wgTitle can refer to any title at a given point, since you can't anticipate what an extension might have done with it. A good example is in SpecialPages, where you can easily call the getTitle() method, which returns a localized version of the special page's title, rather than hoping $wgTitle refers to the special page in question. In short: Do not use it. Ever."

@MrMebelMan
Copy link
Copy Markdown

I've just tested it and it works fine. But you should also call getSkin() before getTitle() in case you're using a skin that is extending the BaseTemplate class (like the popular Vector skin).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong header on redirected page

3 participants