mw.ViewPageTarget.init: Don't depend on mediawiki.user

Follows-up 5036099. We don't have that dependency.

Change-Id: I2bdf397a0e575f3f0fb82b905c92c34278b39037
This commit is contained in:
Timo Tijhof 2013-08-01 03:43:16 +02:00
parent ac6c4da3a7
commit 9e89c019f1

View file

@ -365,7 +365,7 @@
// Allow disabling for anonymous users separately from changing the
// default preference (bug 50000)
!( conf.disableForAnons && mw.user.isAnon() ) &&
!( conf.disableForAnons && mw.config.get( 'wgUserName' ) === null ) &&
// Disable on redirect pages until redirects are editable (bug 47328)
// Property wgIsRedirect is relatively new in core, many cached pages
@ -381,7 +381,7 @@
// with static caching (e.g. wgUseFileCache or reverse-proxy) ignore user.options for
// anons as it is likely outdated.
(
mw.user.isAnon() ?
mw.config.get( 'wgUserName' ) === null ?
( conf.defaultUserOptions.enable && !conf.defaultUserOptions.betatempdisable ) :
(
mw.user.options.get( 'visualeditor-enable', conf.defaultUserOptions.enable ) &&