Last modified: 2013-09-16 02:38:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46241, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44241 - Expose the redirect status in mw.config
Expose the redirect status in mw.config
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.21.x
All All
: Low enhancement (vote)
: 1.22.0 release
Assigned To: Krinkle
: javascript
Depends on:
Blocks: javascript
  Show dependency treegraph
 
Reported: 2013-01-22 14:35 UTC by Danny B.
Modified: 2013-09-16 02:38 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Danny B. 2013-01-22 14:35:42 UTC
There should be some sort of "wgIsRedirect":true/false in mw.config to find out if page is (not) redirect.
Comment 1 Michael M. 2013-01-24 08:24:27 UTC
I'd prefer something like "wgRedirectTarget": false if the page is not a redirect, and the title of the target if it is. In boolean context this will evaluate to true for redirects, but additionally you have access to the target if you need it.
Comment 2 Danny B. 2013-01-24 13:30:57 UTC
(In reply to comment #1)
> I'd prefer something like "wgRedirectTarget": false if the page is not a
> redirect, and the title of the target if it is. In boolean context this will
> evaluate to true for redirects, but additionally you have access to the
> target if you need it.

Even better idea.

It would be actually a complement to wgRedirectedFrom (bug 32230). So "wgRedirectTo" sounds as intuitive opposite.
Comment 3 Bartosz Dziewoński 2013-09-15 17:20:31 UTC
wgIsRedirect variable exists now, added in I6e365f20b513ded10ede51d4b34de0736653a3dc by Timo.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links