diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
commit | 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch) | |
tree | 577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/Setup.php | |
parent | cacc939b34e315b85e2d72997811eb6677996cc1 (diff) |
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/Setup.php')
-rw-r--r-- | includes/Setup.php | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/includes/Setup.php b/includes/Setup.php index 924c3c07..e87b200f 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -50,27 +50,27 @@ if ( $wgLoadScript === false ) $wgLoadScript = "$wgScriptPath/load$wgScriptExten if ( $wgArticlePath === false ) { if ( $wgUsePathInfo ) { - $wgArticlePath = "$wgScript/$1"; + $wgArticlePath = "$wgScript/$1"; } else { - $wgArticlePath = "$wgScript?title=$1"; + $wgArticlePath = "$wgScript?title=$1"; } } -if ( !empty($wgActionPaths) && !isset($wgActionPaths['view']) ) { +if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) { # 'view' is assumed the default action path everywhere in the code # but is rarely filled in $wgActionPaths $wgActionPaths['view'] = $wgArticlePath; } -if ( !empty($wgActionPaths) && !isset($wgActionPaths['view']) ) { +if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) { # 'view' is assumed the default action path everywhere in the code # but is rarely filled in $wgActionPaths - $wgActionPaths['view'] = $wgArticlePath ; + $wgActionPaths['view'] = $wgArticlePath; } if ( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins"; if ( $wgLocalStylePath === false ) $wgLocalStylePath = "$wgScriptPath/skins"; -if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins"; +if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins"; if ( $wgExtensionAssetsPath === false ) $wgExtensionAssetsPath = "$wgScriptPath/extensions"; if ( $wgLogo === false ) $wgLogo = "$wgStylePath/common/images/wiki.png"; @@ -317,19 +317,13 @@ if ( $wgUseFileCache || $wgUseSquid ) { $wgDebugToolbar = false; } -# $wgAllowRealName and $wgAllowUserSkin were removed in 1.16 -# in favor of $wgHiddenPrefs, handle b/c here -if ( !$wgAllowRealName ) { - $wgHiddenPrefs[] = 'realname'; -} - # Doesn't make sense to have if disabled. if ( !$wgEnotifMinorEdits ) { $wgHiddenPrefs[] = 'enotifminoredits'; } # $wgDisabledActions is deprecated as of 1.18 -foreach( $wgDisabledActions as $action ){ +foreach( $wgDisabledActions as $action ) { $wgActions[$action] = false; } @@ -343,7 +337,7 @@ if ( !$wgHtml5Version && $wgHtml5 && $wgAllowRdfaAttributes ) { } # Blacklisted file extensions shouldn't appear on the "allowed" list -$wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist ); +$wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) ); if ( $wgArticleCountMethod === null ) { $wgArticleCountMethod = $wgUseCommaCount ? 'comma' : 'link'; @@ -359,17 +353,18 @@ if ( $wgAjaxUploadDestCheck ) { if ( $wgNewUserLog ) { # Add a new log type - $wgLogTypes[] = 'newusers'; - $wgLogNames['newusers'] = 'newuserlogpage'; - $wgLogHeaders['newusers'] = 'newuserlogpagetext'; + $wgLogTypes[] = 'newusers'; + $wgLogNames['newusers'] = 'newuserlogpage'; + $wgLogHeaders['newusers'] = 'newuserlogpagetext'; $wgLogActionsHandlers['newusers/newusers'] = 'NewUsersLogFormatter'; $wgLogActionsHandlers['newusers/create'] = 'NewUsersLogFormatter'; $wgLogActionsHandlers['newusers/create2'] = 'NewUsersLogFormatter'; + $wgLogActionsHandlers['newusers/byemail'] = 'NewUsersLogFormatter'; $wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter'; } if ( $wgCookieSecure === 'detect' ) { - $wgCookieSecure = ( WebRequest::detectProtocol() === 'https:' ); + $wgCookieSecure = ( WebRequest::detectProtocol() === 'https' ); } // Disable MWDebug for command line mode, this prevents MWDebug from eating up @@ -396,6 +391,11 @@ if ( !defined( 'MW_COMPILED' ) ) { wfProfileOut( $fname . '-includes' ); } +if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) { + $wgSecureLogin = false; + wfWarn( 'Secure login was enabled on a server that only supports HTTP or HTTPS. Disabling secure login.' ); +} + # Now that GlobalFunctions is loaded, set defaults that depend # on it. if ( $wgTmpDirectory === false ) { |