$wgForeignFileRepos[] = array(
'class' => 'ForeignAPIRepo',
'name' => 'wikimediacommons',
- 'apibase' => WebRequest::detectProtocol() === 'https' ?
- 'https://commons.wikimedia.org/w/api.php' :
- 'http://commons.wikimedia.org/w/api.php',
+ 'apibase' => 'https://commons.wikimedia.org/w/api.php',
'hashLevels' => 2,
'fetchDescription' => true,
'descriptionCacheExpiry' => 43200,
$wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) );
if ( $wgInvalidateCacheOnLocalSettingsChange ) {
- // @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged - No GlobalFunction here yet.
- $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
- // @codingStandardsIgnoreEnd
+ MediaWiki\suppressWarnings();
+ $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', filemtime( "$IP/LocalSettings.php" ) ) );
+ MediaWiki\restoreWarnings();
}
if ( $wgNewUserLog ) {
* explicitly set. Inspired by phpMyAdmin's treatment of the problem.
*/
if ( is_null( $wgLocaltimezone ) ) {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$wgLocaltimezone = date_default_timezone_get();
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
}
date_default_timezone_set( $wgLocaltimezone );