From 52abfd6a64820b661af0d0687ec76826f9281b42 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 13 Apr 2014 22:07:50 +0200 Subject: [PATCH] Normalise comments in Setup.php - Changed "#" to "//" for non-block comments - Put the inline comment describing the file back in the file description Change-Id: I0aec0f4c10def58b608a8f08455fccb2317e4538 --- includes/Setup.php | 74 ++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/includes/Setup.php b/includes/Setup.php index 20c6021fd6..b155f90450 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -1,6 +1,10 @@ = $wgRCMaxAge / ( 3600 * 24 ) ) { @@ -269,7 +267,7 @@ if ( $wgLocalInterwiki ) { array_unshift( $wgLocalInterwikis, $wgLocalInterwiki ); } -# Set default shared prefix +// Set default shared prefix if ( $wgSharedPrefix === false ) { $wgSharedPrefix = $wgDBprefix; } @@ -328,31 +326,31 @@ if ( is_array( $wgExtraNamespaces ) ) { $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces; } -# These are now the same, always -# To determine the user language, use $wgLang->getCode() +// These are now the same, always +// To determine the user language, use $wgLang->getCode() $wgContLanguageCode = $wgLanguageCode; -# Easy to forget to falsify $wgShowIPinHeader for static caches. -# If file cache or squid cache is on, just disable this (DWIMD). -# Do the same for $wgDebugToolbar. +// Easy to forget to falsify $wgShowIPinHeader for static caches. +// If file cache or squid cache is on, just disable this (DWIMD). +// Do the same for $wgDebugToolbar. if ( $wgUseFileCache || $wgUseSquid ) { $wgShowIPinHeader = false; $wgDebugToolbar = false; } -# Doesn't make sense to have if disabled. +// Doesn't make sense to have if disabled. if ( !$wgEnotifMinorEdits ) { $wgHiddenPrefs[] = 'enotifminoredits'; } -# We always output HTML5 since 1.22, overriding these is no longer supported -# we set them here for extensions that depend on its value. +// We always output HTML5 since 1.22, overriding these is no longer supported +// we set them here for extensions that depend on its value. $wgHtml5 = true; $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; $wgJsMimeType = 'text/javascript'; if ( !$wgHtml5Version && $wgAllowRdfaAttributes ) { - # see http://www.w3.org/TR/rdfa-in-html/#document-conformance + // see http://www.w3.org/TR/rdfa-in-html/#document-conformance if ( $wgMimeType == 'application/xhtml+xml' ) { $wgHtml5Version = 'XHTML+RDFa 1.0'; } else { @@ -360,7 +358,7 @@ if ( !$wgHtml5Version && $wgAllowRdfaAttributes ) { } } -# Blacklisted file extensions shouldn't appear on the "allowed" list +// Blacklisted file extensions shouldn't appear on the "allowed" list $wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) ); if ( $wgArticleCountMethod === null ) { @@ -372,7 +370,7 @@ if ( $wgInvalidateCacheOnLocalSettingsChange ) { } if ( $wgNewUserLog ) { - # Add a new log type + // Add a new log type $wgLogTypes[] = 'newusers'; $wgLogNames['newusers'] = 'newuserlogpage'; $wgLogHeaders['newusers'] = 'newuserlogpagetext'; @@ -427,8 +425,8 @@ if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) { 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. +// Now that GlobalFunctions is loaded, set defaults that depend +// on it. if ( $wgTmpDirectory === false ) { wfProfileIn( $fname . '-tempDir' ); $wgTmpDirectory = wfTempDir(); @@ -469,7 +467,7 @@ if ( $wgProfileOnly ) { wfProfileOut( $fname . '-defaults2' ); wfProfileIn( $fname . '-misc1' ); -# Raise the memory limit if it's too low +// Raise the memory limit if it's too low wfMemoryLimit(); /** @@ -488,13 +486,13 @@ if ( is_null( $wgLocalTZoffset ) ) { $wgLocalTZoffset = date( 'Z' ) / 60; } -# Useful debug output +// Useful debug output if ( $wgCommandLineMode ) { $wgRequest = new FauxRequest( array() ); wfDebug( "\n\nStart command line script $self\n" ); } else { - # Can't stub this one, it sets up $_GET and $_REQUEST in its constructor + // Can't stub this one, it sets up $_GET and $_REQUEST in its constructor $wgRequest = new WebRequest; $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n"; @@ -523,12 +521,12 @@ wfDebugLog( 'caches', 'main: ' . get_class( $wgMemc ) . wfProfileOut( $fname . '-memcached' ); -# # Most of the config is out, some might want to run hooks here. +// Most of the config is out, some might want to run hooks here. wfRunHooks( 'SetupAfterCache' ); wfProfileIn( $fname . '-session' ); -# If session.auto_start is there, we can't touch session name +// If session.auto_start is there, we can't touch session name if ( !wfIniGetBool( 'session.auto_start' ) ) { session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' ); } @@ -551,7 +549,7 @@ $wgContLang->initContLang(); // Now that variant lists may be available... $wgRequest->interpolateTitle(); -$wgUser = RequestContext::getMain()->getUser(); # BackCompat +$wgUser = RequestContext::getMain()->getUser(); // BackCompat /** * @var $wgLang Language @@ -561,7 +559,7 @@ $wgLang = new StubUserLang; /** * @var OutputPage */ -$wgOut = RequestContext::getMain()->getOutput(); # BackCompat +$wgOut = RequestContext::getMain()->getOutput(); // BackCompat /** * @var $wgParser Parser @@ -581,12 +579,12 @@ $wgDeferredUpdateList = array(); wfProfileOut( $fname . '-globals' ); wfProfileIn( $fname . '-extensions' ); -# Extension setup functions for extensions other than skins -# Entries should be added to this variable during the inclusion -# of the extension file. This allows the extension to perform -# any necessary initialisation in the fully initialised environment +// Extension setup functions for extensions other than skins +// Entries should be added to this variable during the inclusion +// of the extension file. This allows the extension to perform +// any necessary initialisation in the fully initialised environment foreach ( $wgExtensionFunctions as $func ) { - # Allow closures in PHP 5.3+ + // Allow closures in PHP 5.3+ if ( is_object( $func ) && $func instanceof Closure ) { $profName = $fname . '-extensions-closure'; } elseif ( is_array( $func ) ) { -- 2.20.1