Index: trunk/lucene-search-2/test-data/CommonSettings.php.test |
— | — | @@ -0,0 +1,2484 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +# WARNING: This file is publically viewable on the web. Do not put private data here. |
| 5 | + |
| 6 | +# Godforsaken hack to work around problems with the Squid caching changes... |
| 7 | +# |
| 8 | +# To minimize damage on fatal PHP errors, output a default no-cache header |
| 9 | +# It will be overridden in cases where we actually specify caching behavior. |
| 10 | +# |
| 11 | +# More modern PHP versions will send a 500 result code on fatal erorr, |
| 12 | +# at least sometimes, but what we're running will send a 200. |
| 13 | +header( "Cache-control: no-cache" ); |
| 14 | + |
| 15 | +# Try to control stuff: |
| 16 | +# define( 'DEBUG_LOG', true ); |
| 17 | + |
| 18 | +# useful tokens to search for: |
| 19 | + |
| 20 | +# :SEARCH: - search settings |
| 21 | + |
| 22 | +# ----------------- |
| 23 | + |
| 24 | +if ( php_sapi_name() == 'cli' ) { |
| 25 | + # Override for sanity's sake. |
| 26 | + ini_set( 'display_errors', 1 ); |
| 27 | + # error_reporting(E_ALL); |
| 28 | +} |
| 29 | +if ( isset( $_SERVER['SERVER_ADDR'] ) ) { |
| 30 | + ini_set( 'error_append_string', ' (' . $_SERVER['SERVER_ADDR'] . ')' ); |
| 31 | +} |
| 32 | + |
| 33 | +# Protection for unusual entry points |
| 34 | +if ( !function_exists( 'wfProfileIn' ) ) { |
| 35 | + require( './includes/ProfilerStub.php' ); |
| 36 | +} |
| 37 | +$fname = 'CommonSettings.php'; |
| 38 | +wfProfileIn( $fname ); |
| 39 | +wfProfileIn( "$fname-init" ); |
| 40 | + |
| 41 | +# ---------------------------------------------------------------------- |
| 42 | +# Initialisation |
| 43 | + |
| 44 | +/* |
| 45 | +if ( !class_exists( 'MWMultiVersion' ) && php_sapi_name() == 'cli' ) { |
| 46 | + global $argv; |
| 47 | + # Allow for now since everything is 1.17 and we don't want scripts to break |
| 48 | + require_once( dirname( __FILE__ ) . "/../multiversion/MWMultiVersion.php" ); |
| 49 | + array_unshift( $argv, 'rein' ); // HACK for maintenance.php stripping argv[0] |
| 50 | + MWMultiVersion::initializeForMaintenance(); |
| 51 | + array_shift( $argv ); // HACK for maintenance.php stripping argv[0] |
| 52 | +} |
| 53 | +*/ |
| 54 | + |
| 55 | +# Get the version object for this Wiki (must be set by now, along with $IP) |
| 56 | +if ( !class_exists( 'MWMultiVersion' ) ) { |
| 57 | + die( "No MWMultiVersion instance initialized! MWScript.php wrapper not used?\n" ); |
| 58 | +} |
| 59 | +$multiVersion = MWMultiVersion::getInstance(); |
| 60 | + |
| 61 | +set_include_path( "$IP:$IP/lib:/usr/local/lib/php:/usr/share/php" ); |
| 62 | + |
| 63 | +if ( getenv( 'WIKIBACKUP' ) ) { |
| 64 | + // hack while normal ext is not enabled sitewide |
| 65 | + if ( !function_exists( 'utf8_normalize' ) ) { |
| 66 | + dl( 'php_utfnormal.so' ); |
| 67 | + } |
| 68 | +} |
| 69 | + |
| 70 | +$cluster = 'pmtpa'; |
| 71 | + |
| 72 | +# Load site configuration |
| 73 | +include( "$IP/includes/DefaultSettings.php" ); |
| 74 | + |
| 75 | +# Safari bug with URLs ending in ".gz" and gzip encoding |
| 76 | +# http://bugzilla.wikimedia.org/show_bug.cgi?id=4635 |
| 77 | +$hatesSafari = isset( $_SERVER['PATH_INFO'] ) && |
| 78 | + strtolower( substr( $_SERVER['PATH_INFO'], -3 ) ) == '.gz'; |
| 79 | +if ( $hatesSafari ) { |
| 80 | + $wgDisableOutputCompression = true; |
| 81 | +} |
| 82 | + |
| 83 | +ini_set( 'memory_limit', 120 * 1024 * 1024 ); |
| 84 | + |
| 85 | +$DP = $IP; |
| 86 | + |
| 87 | +wfProfileOut( "$fname-init" ); |
| 88 | +wfProfileIn( "$fname-host" ); |
| 89 | + |
| 90 | +$secure = getenv( 'MW_SECURE_HOST' ); |
| 91 | +# This must be set *after* the DefaultSettings.php inclusion |
| 92 | +$wgDBname = $multiVersion->getDatabase(); |
| 93 | + |
| 94 | +# wmf-config directory (in common/) |
| 95 | +$wmfConfigDir = "$IP/../wmf-config"; |
| 96 | + |
| 97 | +wfProfileOut( "$fname-host" ); |
| 98 | + |
| 99 | +# Initialise wgConf |
| 100 | +wfProfileIn( "$fname-wgConf" ); |
| 101 | +require( "$wmfConfigDir/wgConf.php" ); |
| 102 | +function wmfLoadInitialiseSettings( $conf ) { |
| 103 | + global $wmfConfigDir, $wgConf; |
| 104 | + # $wgConf =& $conf; # b/c alias |
| 105 | + require( "$wmfConfigDir/InitialiseSettings.php" ); |
| 106 | +} |
| 107 | +wfProfileOut( "$fname-wgConf" ); |
| 108 | + |
| 109 | +wfProfileIn( "$fname-confcache" ); |
| 110 | + |
| 111 | +# Is this database listed in $cluster.dblist? |
| 112 | +# Note: $wgLocalDatabases set in wgConf.php. |
| 113 | +# Note: must be done before calling $multiVersion functions other than getDatabase(). |
| 114 | +if ( array_search( $wgDBname, $wgLocalDatabases ) === false ) { |
| 115 | + # No? Load missing.php |
| 116 | + if ( $wgCommandLineMode ) { |
| 117 | + print "Database name $wgDBname is not listed in $cluster.dblist\n"; |
| 118 | + } else { |
| 119 | + require( "$wmfConfigDir/missing.php" ); |
| 120 | + } |
| 121 | + exit; |
| 122 | +} |
| 123 | + |
| 124 | +# Determine domain and language and the directories for this instance |
| 125 | +list( $site, $lang ) = $wgConf->siteFromDB( $wgDBname ); |
| 126 | +$wmfVersionNumber = $multiVersion->getVersionNumber(); |
| 127 | +$wmfExtendedVersionNumber = $multiVersion->getExtendedVersionNumber(); |
| 128 | + |
| 129 | +# Try configuration cache |
| 130 | + |
| 131 | +$filename = "/tmp/mw-cache-$wmfVersionNumber/conf-$wgDBname"; |
| 132 | +$globals = false; |
| 133 | +if ( @filemtime( $filename ) >= filemtime( "$wmfConfigDir/InitialiseSettings.php" ) ) { |
| 134 | + $cacheRecord = @file_get_contents( $filename ); |
| 135 | + if ( $cacheRecord !== false ) { |
| 136 | + $globals = unserialize( $cacheRecord ); |
| 137 | + } |
| 138 | +} |
| 139 | +wfProfileOut( "$fname-confcache" ); |
| 140 | +if ( !$globals ) { |
| 141 | + wfProfileIn( "$fname-recache-settings" ); |
| 142 | + # Get configuration from SiteConfiguration object |
| 143 | + require( "$wmfConfigDir/InitialiseSettings.php" ); |
| 144 | + |
| 145 | + $wikiTags = array(); |
| 146 | + foreach ( array( 'private', 'fishbowl', 'special', 'closed', 'flaggedrevs', 'readonly', 'switchover-jun30' ) as $tag ) { |
| 147 | + $dblist = array_map( 'trim', file( "$IP/../$tag.dblist" ) ); |
| 148 | + if ( in_array( $wgDBname, $dblist ) ) { |
| 149 | + $wikiTags[] = $tag; |
| 150 | + } |
| 151 | + } |
| 152 | + |
| 153 | + $dbSuffix = ( $site === 'wikipedia' ) ? 'wiki' : $site; |
| 154 | + $globals = $wgConf->getAll( $wgDBname, $dbSuffix, |
| 155 | + array( |
| 156 | + 'lang' => $lang, |
| 157 | + 'docRoot' => $_SERVER['DOCUMENT_ROOT'], |
| 158 | + 'site' => $site, |
| 159 | + 'stdlogo' => "//upload.wikimedia.org/$site/$lang/b/bc/Wiki.png" , |
| 160 | + ), $wikiTags ); |
| 161 | + |
| 162 | + # Save cache |
| 163 | + $oldUmask = umask( 0 ); |
| 164 | + @mkdir( '/tmp/mw-cache-' . $wmfVersionNumber, 0777 ); |
| 165 | + $file = fopen( $filename, 'w' ); |
| 166 | + if ( $file ) { |
| 167 | + fwrite( $file, serialize( $globals ) ); |
| 168 | + fclose( $file ); |
| 169 | + @chmod( $file, 0666 ); |
| 170 | + } |
| 171 | + umask( $oldUmask ); |
| 172 | + wfProfileOut( "$fname-recache-settings" ); |
| 173 | +} |
| 174 | +wfProfileIn( "$fname-misc1" ); |
| 175 | + |
| 176 | +extract( $globals ); |
| 177 | + |
| 178 | +# ------------------------------------------------------------------------- |
| 179 | +# Settings common to all wikis |
| 180 | + |
| 181 | +# Private settings such as passwords, that shouldn't be published |
| 182 | +# Needs to be before db.php |
| 183 | +require( "$wmfConfigDir/PrivateSettings.php" ); |
| 184 | + |
| 185 | +# Cluster-dependent files for database and memcached |
| 186 | +require( "$wmfConfigDir/db.php" ); |
| 187 | +require( "$wmfConfigDir/mc.php" ); |
| 188 | + |
| 189 | + |
| 190 | +# Protocol settings for urls |
| 191 | +if ( !$secure && $wmgHTTPSExperiment ) { |
| 192 | + $urlprotocol = ""; |
| 193 | +} else { |
| 194 | + $urlprotocol = "http:"; |
| 195 | +} |
| 196 | + |
| 197 | + |
| 198 | +setlocale( LC_ALL, 'en_US.UTF-8' ); |
| 199 | + |
| 200 | +unset( $wgStylePath ); |
| 201 | +unset( $wgStyleSheetPath ); |
| 202 | +# $wgStyleSheetPath = '/w/skins-1.17'; |
| 203 | +if ( $wgDBname == 'testwiki' ) { |
| 204 | + // Make testing skin/JS changes easier |
| 205 | + $wgExtensionAssetsPath = "$urlprotocol//test.wikipedia.org/w/extensions-" . $wmfVersionNumber; |
| 206 | + $wgStyleSheetPath = "$urlprotocol//test.wikipedia.org/w/skins-" . $wmfVersionNumber; |
| 207 | + |
| 208 | +} else { |
| 209 | + $wgExtensionAssetsPath = "$urlprotocol//bits.wikimedia.org/w/extensions-" . $wmfVersionNumber; |
| 210 | + $wgStyleSheetPath = "$urlprotocol//bits.wikimedia.org/skins-" . $wmfVersionNumber; |
| 211 | +} |
| 212 | +$wgStylePath = $wgStyleSheetPath; |
| 213 | +$wgArticlePath = "/wiki/$1"; |
| 214 | + |
| 215 | +# 1.18 hack -aaron 9/21/11 |
| 216 | +$wgResourceBasePath = "/w/resources-$wmfVersionNumber"; |
| 217 | + |
| 218 | +$wgScriptPath = '/w'; |
| 219 | +$wgLocalStylePath = "$wgScriptPath/skins-$wmfVersionNumber"; |
| 220 | +$wgStockPath = '/images'; |
| 221 | +$wgScript = $wgScriptPath . '/index.php'; |
| 222 | +$wgRedirectScript = $wgScriptPath . '/redirect.php'; |
| 223 | +$wgInternalServer = $wgCanonicalServer; |
| 224 | +if ( $wgDBname != 'testwiki' && isset( $_SERVER['SERVER_NAME'] ) ) { |
| 225 | + // Make testing JS/skin changes easy by not running load.php through bits for testwiki |
| 226 | + $wgLoadScript = "$urlprotocol//bits.wikimedia.org/{$_SERVER['SERVER_NAME']}/load.php"; |
| 227 | +} |
| 228 | + |
| 229 | +$wgCacheDirectory = '/tmp/mw-cache-' . $wmfVersionNumber; |
| 230 | + |
| 231 | +# Very wrong place for NFS access - brought the site down -- domas - 2009-01-27 |
| 232 | + |
| 233 | +# if ( ! is_dir( $wgUploadDirectory ) && !$wgCommandLineMode ) { |
| 234 | +# @mkdir( $wgUploadDirectory, 0777 ); |
| 235 | +# } |
| 236 | + |
| 237 | +$wgFileStore['deleted']['directory'] = "/mnt/upload6/private/archive/$site/$lang"; |
| 238 | + |
| 239 | +# used for mysql/search settings |
| 240 | +$tmarray = getdate( time() ); |
| 241 | +$hour = $tmarray['hours']; |
| 242 | +$day = $tmarray['wday']; |
| 243 | + |
| 244 | +$wgEmergencyContact = 'noc@wikipedia.org'; |
| 245 | + |
| 246 | +# HTCP multicast squid purging |
| 247 | +$wgHTCPMulticastAddress = '239.128.0.112'; |
| 248 | +$wgHTCPMulticastTTL = 8; |
| 249 | + |
| 250 | +if ( defined( 'DEBUG_LOG' ) ) { |
| 251 | + if ( $wgDBname == 'aawiki' ) { |
| 252 | + $wgMemCachedDebug = true; |
| 253 | + $wgDebugLogFile = 'udp://10.0.5.8:8420/debug15'; |
| 254 | + $wgDebugDumpSql = true; |
| 255 | + } |
| 256 | +} |
| 257 | + |
| 258 | +$wgDBerrorLog = 'udp://10.0.5.8:8420/dberror'; |
| 259 | +$wgCheckDBSchema = false; |
| 260 | + |
| 261 | +if ( !isset( $wgLocaltimezone ) ) $wgLocaltimezone = 'UTC'; |
| 262 | +# Ugly hack warning! This needs smoothing out. |
| 263 | +if ( $wgLocaltimezone ) { |
| 264 | + $oldtz = getenv( 'TZ' ); |
| 265 | + putenv( "TZ=$wgLocaltimezone" ); |
| 266 | + $wgLocalTZoffset = date( 'Z' ) / 60; |
| 267 | + putenv( "TZ=$oldtz" ); |
| 268 | +} |
| 269 | + |
| 270 | +$wgShowIPinHeader = false; |
| 271 | +$wgUseGzip = true; |
| 272 | +$wgRCMaxAge = 30 * 86400; |
| 273 | + |
| 274 | +$wgUseTeX = true; |
| 275 | +$wgTexvc = "/usr/local/apache/uncommon/$wmfVersionNumber/bin/texvc"; |
| 276 | +$wgTmpDirectory = '/tmp'; |
| 277 | +$wgLegalTitleChars = "+ %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF"; |
| 278 | + |
| 279 | +$wgSQLMode = null; |
| 280 | + |
| 281 | +# TEMP HACK for bug 31187 --roan |
| 282 | +$wgResourceLoaderValidateJS = false; |
| 283 | + |
| 284 | +# EMERGENCY OPTIMIZATION OPTIONS |
| 285 | + |
| 286 | +$wgMiserMode = true; |
| 287 | +# wgMiserMode now in the configuration object |
| 288 | +# enabled to test DB load balancing -- TS 2004-06-22 |
| 289 | + |
| 290 | +# This is overridden in the Lucene section below |
| 291 | +$wgDisableTextSearch = true; |
| 292 | +$wgDisableSearchUpdate = true; |
| 293 | +$wgDisableCounters = true; |
| 294 | + |
| 295 | +# $wgSiteSupportPage = "http://wikimediafoundation.org/fundraising"; |
| 296 | +# $wgDisableUploads = false; |
| 297 | + |
| 298 | +# Is this safe?? |
| 299 | +# $wgCookieDomain = ".wikipedia.org"; |
| 300 | +# ini_set('session.name', "{$lang}wikiSession" ); |
| 301 | +session_name( $lang . 'wikiSession' ); |
| 302 | +$wgSessionsInMemcached = true; |
| 303 | + |
| 304 | +# Enable subpages in the meta space |
| 305 | +$wgNamespacesWithSubpages[4] = 1; |
| 306 | +# And namespace 101, which is probably a talk namespace of some description |
| 307 | +$wgNamespacesWithSubpages[101] = 1; |
| 308 | + |
| 309 | +/* <important notice> |
| 310 | + * |
| 311 | + * When you add a sitenotice make sure to wrap it in <span dir=ltr></span>, |
| 312 | + * otherwise it'll format badly on RTL wikis -ævar |
| 313 | + */ |
| 314 | +# Site notices |
| 315 | +# $wgSiteNotice = "All Wikimedia projects will be down for approximately 30 minutes for a server configuration change around 18:00 UTC on 11 June. We apologise for the inconvenience."; |
| 316 | +# $wgSiteNotice = "Servers will be rebooted for operating system upgrades circa 12:00 UTC."; |
| 317 | +# $wgSiteNotice = "Servers are being rebooted for operating system upgrades. May be offline for a bit."; |
| 318 | +# $wgSiteNotice = "The databases are being moved to a less crash-prone server until the new machine is debugged. We'll be offline for probably an hour or two to get a consistent and complete backup transferred."; |
| 319 | +# $wgSiteNotice = "Completing transfer of database to less crash-prone server; will be offline for a few minutes."; |
| 320 | +# $wgSiteNotice = "Database should be working, but some files are still being transferred."; |
| 321 | +# $wgSiteNotice = "The wiki will be locked starting in a few minutes"; # to |
| 322 | +# move the databases back to a faster machine. Downtime may be a few |
| 323 | +# hours, but things will be much faster after that!"; |
| 324 | +# $wgSiteNotice = "The database is offline for a while from 05:00 UTC |
| 325 | +# to make a clean copy for transfer to our new servers. Sorry for the inconvenience; |
| 326 | +# we should be back online around 06:15 UTC."; |
| 327 | +# $wgSiteNotice = "The database is read-only and using an older copy while some serious problems are fixed, sorry for the inconvenience this may cause."; |
| 328 | +# $wgSiteNotice = "<div name=\"fundraising\" id=\"fundraising\" align=\"center\">'''Wikimedia Fundraising Drive 2004'''. Help us raise $50,000. See [http://wikimediafoundation.org/wiki/fundraising our fundraising page] for details.<br /> |
| 329 | +# [http://meta.wikimedia.org/wiki/Fundraising_site_notice Information on this message] - [{{SERVER}}{{localurl:MediaWiki:Sitenotice|action=edit}} Edit this message]</div>"; |
| 330 | +# $wgSiteNotice = "-"; |
| 331 | +# $wgSiteNotice = "The site will be read only for 20 minutes for a server restart starting at the next hour time - 11:00 UTC"; |
| 332 | +# $wgSiteNotice = "The site will be read-only in 5-15 minutes for an undetermined period of time while database recovery is performed"; |
| 333 | +# $wgSiteNotice = "The site will be unavailable for about 30 minutes between 07:00 and 09:00 UTC to switch master database server."; |
| 334 | +# $wgSiteNotice = '<span dir="ltr">There is some kind of problem with the image server currently. The issue is being investigated.</span>'; # hashar |
| 335 | +# $wgSiteNotice = "There is a problem with the image storage. We are in the process of fixing it."; |
| 336 | +/* </important notice> */ |
| 337 | + |
| 338 | +# Not CLI, see http://bugs.php.net/bug.php?id=47540 |
| 339 | +if ( php_sapi_name() != 'cli' ) { |
| 340 | + ignore_user_abort( true ); |
| 341 | +} |
| 342 | + |
| 343 | +$wgUseImageResize = true; |
| 344 | +$wgUseImageMagick = true; |
| 345 | +$wgImageMagickConvertCommand = '/usr/bin/convert'; |
| 346 | +$wgSharpenParameter = '0x0.8'; # for IM>6.5, bug 24857 |
| 347 | + |
| 348 | +# Strict checking is still off for now, but added |
| 349 | +# .txt and .mht to the blacklist. |
| 350 | +# -- brion 2004-09-23 |
| 351 | +# Someone has obviously turned it on, look, the line to disable it is commented out: -- TS |
| 352 | +# $wgStrictFileExtensions = false; |
| 353 | +$wgFileBlacklist[] = 'txt'; |
| 354 | +$wgFileBlacklist[] = 'mht'; |
| 355 | +# $wgFileBlacklist[] = 'pdf'; |
| 356 | +$wgFileExtensions[] = 'xcf'; |
| 357 | +$wgFileExtensions[] = 'pdf'; |
| 358 | +$wgFileExtensions[] = 'mid'; |
| 359 | +# $wgFileExtensions[] = 'sxw'; # OOo writer # -- disabling these as obsolete -- brion 2008-02-05 |
| 360 | +# $wgFileExtensions[] = 'sxi'; # OOo presentation |
| 361 | +# $wgFileExtensions[] = 'sxc'; # OOo spreadsheet |
| 362 | +# $wgFileExtensions[] = 'sxd'; # OOo drawing |
| 363 | +$wgFileExtensions[] = 'ogg'; # Ogg audio & video |
| 364 | +$wgFileExtensions[] = 'ogv'; # Ogg audio & video |
| 365 | +$wgFileExtensions[] = 'svg'; |
| 366 | +$wgFileExtensions[] = 'djvu'; # DjVu images/documents |
| 367 | + |
| 368 | +if ( /* use PagedTiffHandler */ true ) { |
| 369 | + include( $IP . '/extensions/PagedTiffHandler/PagedTiffHandler.php' ); |
| 370 | + $wgTiffUseTiffinfo = true; |
| 371 | +} else { |
| 372 | + $wgFileExtensions[] = 'tif'; |
| 373 | + $wgFileExtensions[] = 'tiff'; |
| 374 | +} |
| 375 | + |
| 376 | +if ( $wgDBname == 'foundationwiki' ) { # per cary on 2010-05-11 |
| 377 | + $wgFileExtensions[] = 'otf'; |
| 378 | + $wgFileExtensions[] = 'ai'; |
| 379 | +} else if ( $wgDBname == 'outreachwiki' ) { # Per Frank, bug 25106 |
| 380 | + $wgFileExtensions[] = 'sla'; |
| 381 | +} |
| 382 | + |
| 383 | +if ( $wmgPrivateWikiUploads ) { |
| 384 | + # mav forced me to --midom |
| 385 | + $wgFileExtensions[] = 'ppt'; |
| 386 | + |
| 387 | + # mav forced me as well!!! -- Tim |
| 388 | + $wgFileExtensions[] = 'doc'; |
| 389 | + # adding since removed elsewhere now -- 2007-08-21 -- brion |
| 390 | + $wgFileExtensions[] = 'xls'; |
| 391 | + # delphine made me do it!!!!! --brion |
| 392 | + $wgFileExtensions[] = 'eps'; |
| 393 | + $wgFileExtensions[] = 'zip'; |
| 394 | + |
| 395 | + # OpenOffice, hell if we're going to allow doc we may as well have these too -- Tim |
| 396 | + $wgFileExtensions[] = 'odf'; |
| 397 | + $wgFileExtensions[] = 'odp'; |
| 398 | + $wgFileExtensions[] = 'ods'; |
| 399 | + $wgFileExtensions[] = 'odt'; |
| 400 | + $wgFileExtensions[] = 'odg'; // OpenOffice Graphics |
| 401 | + $wgFileExtensions[] = 'ott'; // Templates |
| 402 | + |
| 403 | + # Temporary for office work :P |
| 404 | + $wgFileExtensions[] = 'wmv'; |
| 405 | + $wgFileExtensions[] = 'dv'; |
| 406 | + $wgFileExtensions[] = 'avi'; |
| 407 | + $wgFileExtensions[] = 'mov'; |
| 408 | + $wgFileExtensions[] = 'mp3'; // for Jay for fundraising bits |
| 409 | + $wgFileExtensions[] = 'aif'; // " |
| 410 | + $wgFileExtensions[] = 'aiff'; // " |
| 411 | + |
| 412 | + # Becausee I hate having to find print drivers -- tomasz |
| 413 | + $wgFileExtensions[] = 'ppd'; |
| 414 | + |
| 415 | + # InDesign & PhotoShop, Illustrator wanted for Chapters logo work |
| 416 | + $wgFileExtensions[] = 'indd'; |
| 417 | + $wgFileExtensions[] = 'inx'; |
| 418 | + $wgFileExtensions[] = 'psd'; |
| 419 | + $wgFileExtensions[] = 'ai'; |
| 420 | + |
| 421 | + # Pete made me --Roan |
| 422 | + $wgFileExtensions[] = 'omniplan'; |
| 423 | + |
| 424 | + # Dia Diagrams files --fred. |
| 425 | + $wgFileExtensions[] = 'dia'; |
| 426 | + // To allow OpenOffice doc formats we need to not blacklist zip files |
| 427 | + $wgMimeTypeBlacklist = array_diff( |
| 428 | + $wgMimeTypeBlacklist, |
| 429 | + array( 'application/zip' ) ); |
| 430 | +} |
| 431 | + |
| 432 | +# Hack for rsvg broken by security patch |
| 433 | +$wgSVGConverters['rsvg-broken'] = '$path/rsvg-convert -w $width -h $height -o $output < $input'; |
| 434 | + |
| 435 | +$wgAllowUserJs = true; |
| 436 | +$wgAllowUserCss = true; |
| 437 | + |
| 438 | +# Squid! |
| 439 | +$wgUseSquid = true; |
| 440 | +$wgUseESI = false; |
| 441 | + |
| 442 | +# As of 2005-04-08, this is empty |
| 443 | +# Squids are purged by HTCP multicast, currently relayed to paris via udpmcast on larousse |
| 444 | +$wgSquidServers = array(); |
| 445 | + |
| 446 | +# Accept XFF from these proxies |
| 447 | +$wgSquidServersNoPurge = array( |
| 448 | + |
| 449 | + # Wikimedia servers |
| 450 | + # ------------------------------------------------ |
| 451 | + |
| 452 | + # pmtpa external |
| 453 | + # Note that all pmtpa squids must have an external address here, for the |
| 454 | + # benefit of the yaseo apaches. |
| 455 | + |
| 456 | + '208.80.152.162', # singer (secure) |
| 457 | + |
| 458 | + '208.80.152.41', # sq31 |
| 459 | + '208.80.152.42', # sq32 |
| 460 | + '208.80.152.43', # sq33 |
| 461 | + '208.80.152.44', # sq34 |
| 462 | + '208.80.152.45', # sq35 |
| 463 | + '208.80.152.46', # sq36 |
| 464 | + '208.80.152.47', # sq37 |
| 465 | + '208.80.152.48', # sq38 |
| 466 | + '208.80.152.49', # sq39 |
| 467 | + '208.80.152.50', # sq40 |
| 468 | + '208.80.152.51', # sq41 |
| 469 | + '208.80.152.52', # sq42 |
| 470 | + '208.80.152.53', # sq43 |
| 471 | + '208.80.152.54', # sq44 |
| 472 | + '208.80.152.55', # sq45 |
| 473 | + '208.80.152.56', # sq46 |
| 474 | + '208.80.152.57', # sq47 |
| 475 | + '208.80.152.58', # sq48 |
| 476 | + '208.80.152.59', # sq49 |
| 477 | + '208.80.152.60', # sq50 |
| 478 | + '208.80.152.61', # sq51 |
| 479 | + '208.80.152.62', # sq52 |
| 480 | + '208.80.152.63', # sq53 |
| 481 | + '208.80.152.64', # sq54 |
| 482 | + '208.80.152.65', # sq55 |
| 483 | + '208.80.152.66', # sq56 |
| 484 | + '208.80.152.67', # sq57 |
| 485 | + '208.80.152.68', # sq58 |
| 486 | + '208.80.152.69', # sq59 |
| 487 | + '208.80.152.70', # sq60 |
| 488 | + '208.80.152.71', # sq61 |
| 489 | + '208.80.152.72', # sq62 |
| 490 | + '208.80.152.73', # sq63 |
| 491 | + '208.80.152.74', # sq64 |
| 492 | + '208.80.152.75', # sq65 |
| 493 | + '208.80.152.76', # sq66 |
| 494 | + '208.80.152.77', # sq67 |
| 495 | + '208.80.152.78', # sq68 |
| 496 | + '208.80.152.79', # sq69 |
| 497 | + '208.80.152.80', # sq70 |
| 498 | + '208.80.152.81', # sq71 |
| 499 | + '208.80.152.82', # sq72 |
| 500 | + '208.80.152.83', # sq73 |
| 501 | + '208.80.152.84', # sq74 |
| 502 | + '208.80.152.85', # sq75 |
| 503 | + '208.80.152.86', # sq76 |
| 504 | + '208.80.152.87', # sq77 |
| 505 | + '208.80.152.88', # sq78 |
| 506 | + '208.80.152.89', # sq79 |
| 507 | + '208.80.152.90', # sq80 |
| 508 | + '208.80.152.91', # sq81 |
| 509 | + '208.80.152.92', # sq82 |
| 510 | + '208.80.152.93', # sq83 |
| 511 | + '208.80.152.94', # sq84 |
| 512 | + '208.80.152.95', # sq85 |
| 513 | + '208.80.152.96', # sq86 |
| 514 | + |
| 515 | + '208.80.154.11', # cp1001 |
| 516 | + '208.80.154.12', # cp1002 |
| 517 | + '208.80.154.13', # cp1003 |
| 518 | + '208.80.154.14', # cp1004 |
| 519 | + '208.80.154.15', # cp1005 |
| 520 | + '208.80.154.16', # cp1006 |
| 521 | + '208.80.154.17', # cp1007 |
| 522 | + '208.80.154.18', # cp1008 |
| 523 | + '208.80.154.19', # cp1009 |
| 524 | + '208.80.154.20', # cp1010 |
| 525 | + '208.80.154.21', # cp1011 |
| 526 | + '208.80.154.22', # cp1012 |
| 527 | + '208.80.154.23', # cp1013 |
| 528 | + '208.80.154.24', # cp1014 |
| 529 | + '208.80.154.25', # cp1015 |
| 530 | + '208.80.154.26', # cp1016 |
| 531 | + '208.80.154.27', # cp1017 |
| 532 | + '208.80.154.28', # cp1018 |
| 533 | + '208.80.154.29', # cp1019 |
| 534 | + '208.80.154.30', # cp1020 |
| 535 | + '208.80.154.31', # cp1021 |
| 536 | + '208.80.154.32', # cp1022 |
| 537 | + '208.80.154.33', # cp1023 |
| 538 | + '208.80.154.34', # cp1024 |
| 539 | + '208.80.154.35', # cp1025 |
| 540 | + '208.80.154.36', # cp1026 |
| 541 | + '208.80.154.37', # cp1027 |
| 542 | + '208.80.154.38', # cp1028 |
| 543 | + '208.80.154.39', # cp1029 |
| 544 | + '208.80.154.40', # cp1030 |
| 545 | + '208.80.154.41', # cp1031 |
| 546 | + '208.80.154.42', # cp1032 |
| 547 | + '208.80.154.43', # cp1033 |
| 548 | + '208.80.154.44', # cp1034 |
| 549 | + '208.80.154.45', # cp1035 |
| 550 | + '208.80.154.46', # cp1036 |
| 551 | + '208.80.154.47', # cp1037 |
| 552 | + '208.80.154.48', # cp1038 |
| 553 | + '208.80.154.49', # cp1039 |
| 554 | + '208.80.154.50', # cp1040 |
| 555 | + '208.80.154.51', # cp1041 |
| 556 | + '208.80.154.52', # cp1042 |
| 557 | + '208.80.154.53', # cp1043 |
| 558 | + '208.80.154.54', # cp1044 |
| 559 | + |
| 560 | + '208.80.152.16', # ssl1 |
| 561 | + '208.80.152.17', # ssl2 |
| 562 | + '208.80.152.18', # ssl3 |
| 563 | + '208.80.152.19', # ssl4 |
| 564 | + |
| 565 | + '208.80.154.133', # ssl1001 |
| 566 | + '208.80.154.134', # ssl1002 |
| 567 | + '208.80.154.9', # ssl1003 |
| 568 | + '208.80.154.8', # ssl1004 |
| 569 | + |
| 570 | + '91.198.174.11', # knsq1 |
| 571 | + '91.198.174.12', # knsq2 |
| 572 | + '91.198.174.13', # knsq3 |
| 573 | + '91.198.174.14', # knsq4 |
| 574 | + '91.198.174.15', # knsq5 |
| 575 | + '91.198.174.16', # knsq6 |
| 576 | + '91.198.174.17', # knsq7 |
| 577 | + '91.198.174.18', # knsq8 |
| 578 | + '91.198.174.19', # knsq9 |
| 579 | + '91.198.174.20', # knsq10 |
| 580 | + '91.198.174.21', # knsq11 |
| 581 | + '91.198.174.22', # knsq12 |
| 582 | + '91.198.174.23', # knsq13 |
| 583 | + '91.198.174.24', # knsq14 |
| 584 | + '91.198.174.25', # knsq15 |
| 585 | + '91.198.174.26', # knsq16 |
| 586 | + '91.198.174.27', # knsq17 |
| 587 | + '91.198.174.28', # knsq18 |
| 588 | + '91.198.174.29', # knsq19 |
| 589 | + '91.198.174.30', # knsq20 |
| 590 | + '91.198.174.31', # knsq21 |
| 591 | + '91.198.174.32', # knsq22 |
| 592 | + '91.198.174.33', # knsq23 |
| 593 | + '91.198.174.34', # knsq24 |
| 594 | + '91.198.174.35', # knsq25 |
| 595 | + '91.198.174.36', # knsq26 |
| 596 | + '91.198.174.37', # knsq27 |
| 597 | + '91.198.174.38', # knsq28 |
| 598 | + '91.198.174.39', # knsq29 |
| 599 | + '91.198.174.40', # knsq30 |
| 600 | + |
| 601 | + '91.198.174.41', # amssq31 |
| 602 | + '91.198.174.42', # amssq32 |
| 603 | + '91.198.174.43', # amssq33 |
| 604 | + '91.198.174.44', # amssq34 |
| 605 | + '91.198.174.45', # amssq35 |
| 606 | + '91.198.174.46', # amssq36 |
| 607 | + '91.198.174.47', # amssq37 |
| 608 | + '91.198.174.48', # amssq38 |
| 609 | + '91.198.174.49', # amssq39 |
| 610 | + '91.198.174.50', # amssq40 |
| 611 | + '91.198.174.51', # amssq41 |
| 612 | + '91.198.174.52', # amssq42 |
| 613 | + '91.198.174.53', # amssq43 |
| 614 | + '91.198.174.54', # amssq44 |
| 615 | + '91.198.174.55', # amssq45 |
| 616 | + '91.198.174.56', # amssq46 |
| 617 | + '91.198.174.57', # amssq47 |
| 618 | + '91.198.174.58', # amssq48 |
| 619 | + '91.198.174.59', # amssq49 |
| 620 | + '91.198.174.60', # amssq50 |
| 621 | + '91.198.174.61', # amssq51 |
| 622 | + '91.198.174.62', # amssq52 |
| 623 | + '91.198.174.63', # amssq53 |
| 624 | + '91.198.174.64', # amssq54 |
| 625 | + '91.198.174.65', # amssq55 |
| 626 | + '91.198.174.66', # amssq56 |
| 627 | + '91.198.174.67', # amssq57 |
| 628 | + '91.198.174.68', # amssq58 |
| 629 | + '91.198.174.69', # amssq59 |
| 630 | + '91.198.174.70', # amssq60 |
| 631 | + '91.198.174.71', # amssq61 |
| 632 | + '91.198.174.72', # amssq62 |
| 633 | + |
| 634 | + '91.198.174.102', # ssl3001 |
| 635 | + '91.198.174.103', # ssl3002 |
| 636 | + '91.198.174.104', # ssl3003 |
| 637 | + '91.198.174.105', # ssl3004 |
| 638 | + '91.198.174.106', # ssl3005 |
| 639 | + '91.198.174.107', # ssl3006 |
| 640 | +); |
| 641 | + |
| 642 | +# IP addresses that aren't proxies, regardless of what the other sources might say |
| 643 | +$wgProxyWhitelist = array( |
| 644 | + '68.124.59.186', |
| 645 | + '202.63.61.242', |
| 646 | + '62.214.230.86', |
| 647 | + '217.94.171.96', |
| 648 | + |
| 649 | + # True Internet |
| 650 | + # (Thai ISP, used by Waerth) |
| 651 | +# '203.144.143.2', |
| 652 | +# '203.144.143.3', |
| 653 | +# '203.144.143.6', |
| 654 | + |
| 655 | +); |
| 656 | + |
| 657 | +# Default: |
| 658 | +# $wgSquidMaxage = 2678400; |
| 659 | + |
| 660 | +# Purge site message: |
| 661 | +# $wgSquidMaxage = 2678400; |
| 662 | +# $wgSquidMaxage = 3600; |
| 663 | + |
| 664 | +# Special:AskSQL |
| 665 | +$wgLogQueries = true; |
| 666 | +$wgSqlLogFile = $wgUploadDirectory . '/sqllog'; |
| 667 | + |
| 668 | +$wgBlockOpenProxies = false; |
| 669 | + |
| 670 | +$wgDebugLogGroups['UploadBlacklist'] = 'udp://10.0.5.8:8420/upload-blacklist'; |
| 671 | +$wgDebugLogGroups['bug27452'] = 'udp://10.0.5.8:8420/bug27452'; |
| 672 | + |
| 673 | +$wgDebugLogGroups['404'] = 'udp://10.0.5.8:8420/four-oh-four'; |
| 674 | + |
| 675 | +# Don't allow users to redirect other users' talk pages |
| 676 | +# Disabled because interwiki redirects are turned off, so it's not needed |
| 677 | +# include( "$IP/Filter-ext_redir.php" ); |
| 678 | + |
| 679 | +# # For attaching licensing metadata to pages, and displaying an |
| 680 | +# # appropriate copyright notice / icon. GNU Free Documentation |
| 681 | +# # License and Creative Commons licenses are supported so far. |
| 682 | +$wgEnableCreativeCommonsRdf = false; |
| 683 | + |
| 684 | +if ( $site == 'wikinews' ) { |
| 685 | + # $wgRightsPage = "";# Set to the title of a wiki page that describes your license/copyright |
| 686 | + $wgRightsUrl = "$urlprotocol//creativecommons.org/licenses/by/2.5/"; |
| 687 | + $wgRightsText = 'Creative Commons Attribution 2.5'; |
| 688 | + $wgRightsIcon = "$urlprotocol//creativecommons.org/images/public/somerights20.png"; |
| 689 | +} elseif ( $wgDBname == 'huwikinews' ) { |
| 690 | + $wgRightsUrl = "$urlprotocol//creativecommons.org/licenses/by/3.0/"; |
| 691 | + $wgRightsText = 'Creative Commons Attribution 3.0 Unported'; |
| 692 | + $wgRightsIcon = "$urlprotocol//creativecommons.org/images/public/somerights20.png"; |
| 693 | +} else { |
| 694 | + # Set 2009-06-22 -- BV |
| 695 | + $wgRightsUrl = "$urlprotocol//creativecommons.org/licenses/by-sa/3.0/"; |
| 696 | + $wgRightsText = 'Creative Commons Attribution-Share Alike 3.0 Unported'; |
| 697 | + $wgRightsIcon = "$urlprotocol//creativecommons.org/images/public/somerights20.png"; |
| 698 | +} |
| 699 | + |
| 700 | +# FIXME: Turned off tidy for testing. --brion 2004-01-19 |
| 701 | +# turned it on again to see if this is the culprit --gwicke 2005-01-20 |
| 702 | +# Anthere had problems with the quarto page on meta which contained broken markup |
| 703 | +# Turned off for performance reasons experimentally -- TS 2005-04-20 |
| 704 | +# -- Didn't seem to make any difference |
| 705 | +# Turned off, to investigate cluster trouble -- AV Mon Nov 14 21:45:49 UTC 2005 |
| 706 | +# Investigated cluster trouble, tidy seems to have been unrelated to them -- TS |
| 707 | +$wgUseTidy = true; |
| 708 | + |
| 709 | +$wgUDPProfilerHost = '10.0.6.30'; # professor |
| 710 | +$wgAggregateStatsID = 'all'; |
| 711 | + |
| 712 | +// $wgProfiler is set in index.php |
| 713 | +if ( isset( $wgProfiler ) ) { |
| 714 | + $wgProfiling = true; |
| 715 | + $wgProfileToDatabase = true; |
| 716 | + $wgProfileSampleRate = 1; |
| 717 | +} |
| 718 | + |
| 719 | +wfProfileOut( "$fname-misc1" ); |
| 720 | +wfProfileIn( "$fname-ext-include1" ); |
| 721 | + |
| 722 | +include( $IP . '/extensions/timeline/Timeline.php' ); |
| 723 | +include( $IP . '/extensions/wikihiero/wikihiero.php' ); |
| 724 | + |
| 725 | +if ( $wgDBname == 'testwiki' || $wgDBname == 'mlwiki' ) { |
| 726 | + // FreeSansWMF has been generated from FreeSans and FreeSerif by using this script with fontforge: |
| 727 | + // Open("FreeSans.ttf"); |
| 728 | + // MergeFonts("FreeSerif.ttf"); |
| 729 | + // SetFontNames("FreeSans-WMF", "FreeSans WMF", "FreeSans WMF Regular", "Regular", ""); |
| 730 | + // Generate("FreeSansWMF.ttf", "", 4 ); |
| 731 | + $wgTimelineSettings->fontFile = 'FreeSansWMF.ttf'; |
| 732 | +} |
| 733 | + |
| 734 | +include( $IP . '/extensions/SiteMatrix/SiteMatrix.php' ); |
| 735 | +// Config for sitematrix |
| 736 | +$wgSiteMatrixFile = '/apache/common/langlist'; |
| 737 | +$wgSiteMatrixClosedSites = "$IP/../closed.dblist"; |
| 738 | +$wgSiteMatrixPrivateSites = "$IP/../private.dblist"; |
| 739 | +$wgSiteMatrixFishbowlSites = "$IP/../fishbowl.dblist"; |
| 740 | + |
| 741 | +include( $IP . '/extensions/CharInsert/CharInsert.php' ); |
| 742 | +include( $IP . '/extensions/CheckUser/CheckUser.php' ); |
| 743 | +$wgCheckUserForceSummary = $wmgCheckUserForceSummary; |
| 744 | + |
| 745 | +include( $IP . '/extensions/ParserFunctions/ParserFunctions.php' ); |
| 746 | +$wgMaxIfExistCount = 500; // obs |
| 747 | +$wgExpensiveParserFunctionLimit = 500; |
| 748 | + |
| 749 | +// <ref> and <references> tags -ævar, 2005-12-23 |
| 750 | +require( $IP . '/extensions/Cite/Cite.php' ); |
| 751 | + |
| 752 | +// psuedobotinterface -ævar, 2005-12-25 |
| 753 | +// require( $IP.'/extensions/Filepath/SpecialFilepath.php' ); // obsolete 2008-02-12 |
| 754 | + |
| 755 | +# Inputbox extension for searching or creating articles |
| 756 | +include( $IP . '/extensions/InputBox/InputBox.php' ); |
| 757 | + |
| 758 | +include( $IP . '/extensions/ExpandTemplates/ExpandTemplates.php' ); |
| 759 | +// include( $IP.'/extensions/PicturePopup/PicturePopup.php' ); // extension deleted in december 2007... |
| 760 | + |
| 761 | +include( $IP . '/extensions/ImageMap/ImageMap.php' ); |
| 762 | +include( $IP . '/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php' ); |
| 763 | + |
| 764 | +// Experimental side-by-side comparison extension for wikisource. enabled brion 2006-01-13 |
| 765 | +if ( $wmgUseDoubleWiki ) { |
| 766 | + include( $IP . '/extensions/DoubleWiki/DoubleWiki.php' ); |
| 767 | +} |
| 768 | + |
| 769 | +# Poem |
| 770 | +include( $IP . '/extensions/Poem/Poem.php' ); |
| 771 | + |
| 772 | +if ( $wgDBname == 'testwiki' ) { |
| 773 | + include( $IP . '/extensions/UnicodeConverter/UnicodeConverter.php' ); |
| 774 | +} |
| 775 | + |
| 776 | +// Per-wiki config for Flagged Revisions |
| 777 | +if ( $wmgUseFlaggedRevs ) { |
| 778 | + include( "$wmfConfigDir/flaggedrevs.php" ); |
| 779 | +} |
| 780 | + |
| 781 | +$wgUseAjax = true; |
| 782 | +$wgCategoryTreeDynamicTag = true; |
| 783 | +require( $IP . '/extensions/CategoryTree/CategoryTree.php' ); |
| 784 | +$wgCategoryTreeDisableCache = false; |
| 785 | + |
| 786 | +if ( $wmgUseProofreadPage ) { |
| 787 | + include( $IP . '/extensions/ProofreadPage/ProofreadPage.php' ); |
| 788 | + include( "$wmfConfigDir/proofreadpage.php" ); |
| 789 | +} |
| 790 | +if ( $wmgUseLST ) { |
| 791 | + include( $IP . '/extensions/LabeledSectionTransclusion/lst.php' ); |
| 792 | +} |
| 793 | + |
| 794 | +if ( $wmgUseSpamBlacklist ) { |
| 795 | + include( $IP . '/extensions/SpamBlacklist/SpamBlacklist.php' ); |
| 796 | +} |
| 797 | + |
| 798 | +include( $IP . '/extensions/UploadBlacklist/UploadBlacklist.php' ); |
| 799 | +# disabled by Domas. reenabling without consulting will end up on wrath and torture |
| 800 | +# if ( $wgDBname !== 'kwwiktionary' ) { |
| 801 | + include( $IP . '/extensions/TitleBlacklist/TitleBlacklist.php' ); |
| 802 | +# } |
| 803 | + |
| 804 | +$wgTitleBlacklistSources = array( |
| 805 | + array( |
| 806 | + 'type' => TBLSRC_URL, |
| 807 | + 'src' => "$urlprotocol//meta.wikimedia.org/w/index.php?title=Title_blacklist&action=raw&tb_ver=1", |
| 808 | + ), |
| 809 | +); |
| 810 | + |
| 811 | +if ( $wmgUseQuiz ) { |
| 812 | + include( "$IP/extensions/Quiz/Quiz.php" ); |
| 813 | +} |
| 814 | + |
| 815 | +if ( $wmgUseGadgets ) { |
| 816 | + include( "$IP/extensions/Gadgets/Gadgets.php" ); |
| 817 | +} |
| 818 | + |
| 819 | +include( $IP . '/extensions/OggHandler/OggHandler.php' ); |
| 820 | +$wgOggThumbLocation = '/usr/bin/oggThumb'; |
| 821 | +// you can keep the filename the same and use maintenance/purgeList.php |
| 822 | +$wgCortadoJarFile = "$urlprotocol//upload.wikimedia.org/jars/cortado.jar"; |
| 823 | + |
| 824 | +include( $IP . '/extensions/AssertEdit/AssertEdit.php' ); |
| 825 | + |
| 826 | +if ( $wgDBname == 'collabwiki' ) { |
| 827 | + $wgUseTidy = false; |
| 828 | +} |
| 829 | + |
| 830 | +if ( $wgUseContactPageFundraiser ) { |
| 831 | + include( "$IP/extensions/ContactPageFundraiser/ContactPage.php" ); |
| 832 | + $wgContactUser = 'Storiescontact'; |
| 833 | +} |
| 834 | + |
| 835 | +if ( $wgDBname == 'foundationwiki' ) { |
| 836 | + include( "$IP/extensions/FormPreloadPostCache/FormPreloadPostCache.php" ); |
| 837 | + include( "$IP/extensions/SkinPerPage/SkinPerPage.php" ); |
| 838 | + include( "$IP/extensions/skins/Schulenburg/Schulenburg.php" ); |
| 839 | + include( "$IP/extensions/skins/Tomas/Tomas.php" ); |
| 840 | + include( "$IP/extensions/skins/Donate/Donate.php" ); |
| 841 | + |
| 842 | + $wgUseTidy = false; |
| 843 | + |
| 844 | + $wgAllowedTemplates = array( |
| 845 | + 'enwiki_00', 'enwiki_01', 'enwiki_02', 'enwiki_03', |
| 846 | + 'enwiki_04', 'enwiki_05', 'donate', '2009_Notice1', |
| 847 | + '2009_Notice1_b', '2009_EM1Notice', '2009_EM1Notice_b', '2009_Notice11', |
| 848 | + '2009_Notice10', '2009_Notice14', '2009_Notice15', '2009_Notice17', |
| 849 | + '2009_Notice17_g', '2009_Notice18', '2009_Notice18_g', '2009_Notice21_g', |
| 850 | + '2009_Notice22', '2009_Notice22_g', '2009_Notice30', '2009_Notice31', |
| 851 | + '2009_Notice32', '2009_Notice33', '2009_Notice34', '2009_Notice30_g', |
| 852 | + '2009_Notice30_EML', 'Notice30_EML', '2009_Notice35', '2009_Notice36', |
| 853 | + '2009_Notice36_g', '2009_Notice37', '2009_Notice38', '2009_Notice39', |
| 854 | + '2009_Notice40', '2009_Notice30_bold', '2009_Yandex1', '2009_Notice41', |
| 855 | + '2009_Notice42', '2009_Notice43', '2009_Notice44', '2009_Notice45', |
| 856 | + '2009_Notice47', '2009_Notice46', '2009_Notice48', '2009_Craig_Appeal1', |
| 857 | + '2009_Jimmy_Appeal1', '2009_Jimmy_Appeal3', '2009_Jimmy_Appeal4', '2009_Jimmy_Appeal5', |
| 858 | + '2009_Jimmy_Appeal7', '2009_Jimmy_Appeal8', '2009_Jimmy_Appeal9', '2009_Notice49', |
| 859 | + '2009_Notice51', '2009_ThankYou1', '2009_ThankYou2', '2010_testing1', |
| 860 | + '2010_testing1B', '2010_testing2', '2010_testing2B', '2010_testing3', |
| 861 | + '2010_testing3B', '2010_testing4', '2010_testing4B', '2010_testing5', |
| 862 | + '2010_testing5_anon', '2010_testing6', '2010_testing6_anon', '2010_testing7', |
| 863 | + '2010_testing7_anon', '2010_testing8', '2010_testing8_anon', '2010_testing9', |
| 864 | + '2010_testing9_anon', '2010_testing10', '2010_testing10_anon', '2010_testing11', |
| 865 | + '2010_testing11_anon', '2010_testing12', '2010_testing12_anon', '2010_testing13', |
| 866 | + '2010_testing13_anon', '2010_testing14', '2010_testing14_anon', '2010_testing15', |
| 867 | + '2010_testing15_anon', '2010_testing16', '2010_testing17', '2010_testing18', |
| 868 | + '2010_testing15_anon', '2010_testing16', '2010_testing17', '2010_testing18', |
| 869 | + '2010_testing19', '2010_testing20', '2010_testing21', '2010_testing22', |
| 870 | + '2010_testing23', '2010_testing24', '2010_testing25', '2010_testing26', |
| 871 | + '2010_testing23', '2010_testing24', '2010_testing25', '2010_testing26', |
| 872 | + '2010_testing23', '2010_testing24', '2010_testing25', '2010_testing26', |
| 873 | + '2010_testing27', '2010_testing28', '2010_testing29', '2010_testing30', |
| 874 | + '2010_testing31', '2010_testing32', '2010_testing33', '2010_testing34', |
| 875 | + '2010_testing35', '2010_testing36', '2010_testing37', '2010_testing38', |
| 876 | + '2010_testing39', '2010_testing40', '2010_testing41', '2010_testing42', |
| 877 | + '2010_testing43', '2010_testing44', '2010_testing44_twostep', '2010_testing45', |
| 878 | + '2010_testing46', '2010_testing47', '2010_testing48', '2010_testing49', |
| 879 | + '2010_testing50', '2010_testing51', '2010_testing52', '2010_testing53', |
| 880 | + '2010_testing54', '2010_testing55', '2010_fr_testing1', '2010_fr_testing5', |
| 881 | + '2010_fr_testing3', '2010_fr_testing4', '2010_de_testing1', '2010_de_testing2', |
| 882 | + '2010_de_testing3', '2010_de_testing4', '2010_en_testing1', ',2010_en_testing2', |
| 883 | + '2010_en_testing3', '2010_en_testing4', '2010_en_testing5', '2010_en_testing6', |
| 884 | + '2010_en_testing7', '2010_en_testing8', '2010_en_testing9', '2010_en_testing10', |
| 885 | + '2010_en_testing11', '2010_en_testing12', '2010_en_testing13', '2010_en_testing14', |
| 886 | + '2010_en_testing15', '2010_en_testing16', '2010_en_testing17', '2010_en_testing18', |
| 887 | + '2010_en_testing19', '2010_en_testing20', '2010_en_testing21', '2010_en_testing22', |
| 888 | + '2010_en_testing23', '2010_en_testing24', '2010_en_testing25', '2010_en_testing26', |
| 889 | + '2010_en_testing27', '2010_en_testing28', '2010_en_testing29', '2010_en_testing30', |
| 890 | + '2010_en_testing31', '2010_en_testing32', '2010_en_testing33', '2010_en_testing34', |
| 891 | + '2010_en_testing35', '2010_en_testing36', '2010_en_testing37', '2010_en_testing38', |
| 892 | + '2010_en_testing39', '2010_en_testing40', |
| 893 | + ); |
| 894 | + |
| 895 | + $wgAllowedSupport = array( |
| 896 | + 'Support', 'Support2', 'ChangeWorld', 'FiveFacts', |
| 897 | + 'Craig_Appeal', 'Appeal', 'Appeal2', 'Global_Support', |
| 898 | + '2010_Landing_1', '2010_Landing_2', '2010_Landing_3', '2010_Landing_4', |
| 899 | + '2010_Landing_5', '2010_Landing_6', '2010_Landing_7', '2010_Landing_8', |
| 900 | + '2010_Landing_9', 'cc1', 'cc2', 'cc3', 'cc4', 'cc5', 'cc6', 'cc7', 'cc8', 'cc9', |
| 901 | + 'cc10', 'cc11', 'cc12', 'cc13', 'cc14', 'cc15', 'Appeal3', 'Appeal4', 'Appeal5', |
| 902 | + 'Appeal6', 'Appeal7', 'Appeal8', 'Appeal9', 'Appeal10', 'Appeal11', 'Appeal12', |
| 903 | + 'Appeal13', 'Appeal14', 'Appeal16', 'Appeal18', 'Appeal20', 'cc15', |
| 904 | + ); |
| 905 | + |
| 906 | + $wgAllowedPaymentMethod = array( |
| 907 | + 'cc', 'pp' |
| 908 | + ); |
| 909 | +} |
| 910 | + |
| 911 | +if ( $wmgUseContributionReporting ) { |
| 912 | + include( "$IP/extensions/ContributionReporting/ContributionReporting.php" ); |
| 913 | + include( "$wmfConfigDir/reporting-setup.php" ); |
| 914 | + // Fully enables ContributionReporting on office wiki while it is disabled |
| 915 | + // everywhere else. ~Arthur 2011-12-01 |
| 916 | + /* |
| 917 | + if ( $wgDBname == 'officewiki' || $wgDBname == 'testwiki' ) { |
| 918 | + $wgSpecialPages['ContributionHistory'] = 'ContributionHistory'; |
| 919 | + $wgSpecialPages['ContributionTotal'] = 'ContributionTotal'; |
| 920 | + $wgSpecialPages['ContributionStatistics'] = 'SpecialContributionStatistics'; |
| 921 | + $wgSpecialPages['FundraiserStatistics'] = 'SpecialFundraiserStatistics'; |
| 922 | + $wgSpecialPages['ContributionTrackingStatistics'] = 'SpecialContributionTrackingStatistics'; |
| 923 | + $wgSpecialPages['DailyTotal'] = 'SpecialDailyTotal'; |
| 924 | + $wgSpecialPages['YearlyTotal'] = 'SpecialYearlyTotal'; |
| 925 | + } |
| 926 | + */ |
| 927 | +} |
| 928 | + |
| 929 | +if ( $wgDBname == 'donatewiki' ) { |
| 930 | + $wgUseTidy = false; |
| 931 | +} |
| 932 | + |
| 933 | +if ( $wmgPFEnableStringFunctions ) { |
| 934 | + $wgPFEnableStringFunctions = true; |
| 935 | +} |
| 936 | + |
| 937 | +if ( $wgDBname == 'mediawikiwiki' ) { |
| 938 | + include( "$IP/extensions/ExtensionDistributor/ExtensionDistributor.php" ); |
| 939 | + $wgExtDistTarDir = '/mnt/upload6/ext-dist'; |
| 940 | + $wgExtDistTarUrl = "$urlprotocol//upload.wikimedia.org/ext-dist"; |
| 941 | + $wgExtDistWorkingCopy = '/mnt/upload6/private/ExtensionDistributor/mw-snapshot'; |
| 942 | + $wgExtDistRemoteClient = '208.80.152.165:8430'; |
| 943 | + |
| 944 | + $wgExtDistBranches = array( |
| 945 | + 'trunk' => array( |
| 946 | + 'tarLabel' => 'trunk', |
| 947 | + 'msgName' => 'extdist-current-version', |
| 948 | + ), |
| 949 | + /** |
| 950 | + * If you add a branch here, you must also check it out into the working copy directory. |
| 951 | + * If you add it here without doing that, the extension will break. |
| 952 | + */ |
| 953 | + 'branches/REL1_18' => array( |
| 954 | + 'tarLabel' => 'MW1.18', |
| 955 | + 'name' => '1.18.x', |
| 956 | + ), |
| 957 | + 'branches/REL1_17' => array( |
| 958 | + 'tarLabel' => 'MW1.17', |
| 959 | + 'name' => '1.17.x', |
| 960 | + ), |
| 961 | + 'branches/REL1_16' => array( |
| 962 | + 'tarLabel' => 'MW1.16', |
| 963 | + 'name' => '1.16.x', |
| 964 | + ), |
| 965 | + 'branches/REL1_15' => array( |
| 966 | + 'tarLabel' => 'MW1.15', |
| 967 | + 'name' => '1.15.x', |
| 968 | + ), |
| 969 | + 'branches/REL1_14' => array( |
| 970 | + 'tarLabel' => 'MW1.14', |
| 971 | + 'name' => '1.14.x', |
| 972 | + ), |
| 973 | + 'branches/REL1_13' => array( |
| 974 | + 'tarLabel' => 'MW1.13', |
| 975 | + 'name' => '1.13.x', |
| 976 | + ), |
| 977 | + 'branches/REL1_12' => array( |
| 978 | + 'tarLabel' => 'MW1.12', |
| 979 | + 'name' => '1.12.x', |
| 980 | + ), |
| 981 | + 'branches/REL1_11' => array( |
| 982 | + 'tarLabel' => 'MW1.11', |
| 983 | + 'name' => '1.11.x', |
| 984 | + ), |
| 985 | + /** |
| 986 | + * If you delete a branch, you must also delete it from the working copy |
| 987 | + */ |
| 988 | + 'branches/REL1_10' => array( |
| 989 | + 'tarLabel' => 'MW1.10', |
| 990 | + 'name' => '1.10.x', |
| 991 | + ), |
| 992 | + ); |
| 993 | +} |
| 994 | + |
| 995 | +include( $IP . '/extensions/GlobalBlocking/GlobalBlocking.php' ); |
| 996 | +$wgGlobalBlockingDatabase = 'centralauth'; |
| 997 | +$wgApplyGlobalBlocks = $wmgApplyGlobalBlocks; |
| 998 | + |
| 999 | +include( $IP . '/extensions/TrustedXFF/TrustedXFF.php' ); |
| 1000 | +$wgTrustedXffFile = "$IP/cache/trusted-xff.cdb"; |
| 1001 | + |
| 1002 | +if ( $wmgContactPageConf ) { |
| 1003 | + include( $IP . '/extensions/ContactPage/ContactPage.php' ); |
| 1004 | + extract( $wmgContactPageConf ); |
| 1005 | +} |
| 1006 | + |
| 1007 | +include( $IP . '/extensions/SecurePoll/SecurePoll.php' ); |
| 1008 | + |
| 1009 | +$wgHooks['SecurePoll_JumpUrl'][] = 'wmfSecurePollJumpUrl'; |
| 1010 | + |
| 1011 | +function wmfSecurePollJumpUrl( $page, &$url ) { |
| 1012 | + global $site, $lang; |
| 1013 | + |
| 1014 | + $url = wfAppendQuery( $url, array( 'site' => $site, 'lang' => $lang ) ); |
| 1015 | + return true; |
| 1016 | +} |
| 1017 | + |
| 1018 | +// Email capture |
| 1019 | +// NOTE: Must be BEFORE ArticleFeedback |
| 1020 | +if ( $wgUseEmailCapture ) { |
| 1021 | + include( "$IP/extensions/EmailCapture/EmailCapture.php" ); |
| 1022 | + $wgEmailCaptureAutoResponse['from'] = 'improve@wikimedia.org'; |
| 1023 | +} |
| 1024 | + |
| 1025 | +// PoolCounter |
| 1026 | +if ( $wmgUsePoolCounter ) { |
| 1027 | + include( "$wmfConfigDir/PoolCounterSettings.php" ); |
| 1028 | +} |
| 1029 | + |
| 1030 | +wfProfileOut( "$fname-ext-include1" ); |
| 1031 | +wfProfileIn( "$fname-misc2" ); |
| 1032 | + |
| 1033 | +# Upload spam system |
| 1034 | +// SHA-1 hashes of blocked files: |
| 1035 | +# FIXME should check file size too |
| 1036 | +$ubUploadBlacklist = array( |
| 1037 | + // Goatse: |
| 1038 | + 'aebbf277146e497c036937d3c3d6d0cac49a37a8', // 20050901082002!Patoo.jpg |
| 1039 | + // Spam: |
| 1040 | + '7740dab676725bcf6ea58b03b231aa4ec6c7ff34', // Austriaflaggemodern.jpg |
| 1041 | + '1f1c44af6ee4f6e4b6cb48b892e625fa52238bd1', // Nostalgieplattenspielerei.jpg |
| 1042 | + 'e6eb4549756b88e2c69171ffbd278be51c3e2bfe', // Patioboy.jpg |
| 1043 | + 'eeb9b16edb9b5e9c58f47a558589e7eb970f32c0', // Shoessss.jpg, 73464736474847367.jpg |
| 1044 | + '14e4858e63b008a7e087f2b90d3f57c021ab0f78', // Vacuumbigmell.jpg |
| 1045 | + 'f989e303ef505c4706db42d5cdad67841042e2b9', // 998_pre_1.jpg |
| 1046 | + // Ass pus: |
| 1047 | + '27979159b13b819d1bf62e1071a0c2a54b373ed5', // Squish.png |
| 1048 | + '7176aeddf3d7d8aada785721773ffeb7ee7b292e', // 20050905221505!Linguistics_stub.png * |
| 1049 | + '27979159b13b819d1bf62e1071a0c2a54b373ed5', // 20050905235133!Leaf.png |
| 1050 | + 'bb3acc61413ef813453a4b0c0198e30b2cd8fcf9', // Kitty100.jpg |
| 1051 | + '855e55c4925644aeaef262ef25dd00815761c076', // Wikipedia-logo-100px |
| 1052 | + '203bc24e5291e543779201734c49cfd88fcb2445', // Wikipodia-logo.png |
| 1053 | + '14d2a0c0f3081815d04493f72ab5970c51422bc7', // Bung.jpg |
| 1054 | + '3c610bc87d0ba49467c6f2d3cfba4b3321f6b351', // Blue_morpho_butterfly_300x271.png |
| 1055 | + '7176aeddf3d7d8aada785721773ffeb7ee7b292e', // 20050905235450!Blue_morpho_butterfly_300x271.png |
| 1056 | + '7a7f9d7ef52ed8967cb6b0171ef8d45e2a0c68b9', // Leaf.png |
| 1057 | + '1ecfaf883c4130e1827290ad063158d0037631e6', // Wikimedia-button1.png |
| 1058 | + '1c73d6596685175a8af6b08508468252c4dff8e2', // Windbuchencom.jpg |
| 1059 | + '203bc24e5291e543779201734c49cfd88fcb2445', // Leaf.png |
| 1060 | + '95d825bcf01ca3e553f4175dd7238ff12ba1d153', // 20050915055251!New_Orleans_Survivor_Flyover.jpg |
| 1061 | + 'bbd292d917d7fa7dec9a524de77ca39bd8cdf738', // 20050915060435!New_Orleans_Survivor_Flyover.jpg |
| 1062 | + |
| 1063 | + // Some singnet guy |
| 1064 | + 'bed74eef04f5b54884dc650679e5688c7c1f74cb', // Peniscut.jpg |
| 1065 | + ); |
| 1066 | + |
| 1067 | + |
| 1068 | +if ( file_exists( '/usr/bin/ploticus' ) ) { |
| 1069 | + $wgTimelineSettings->ploticusCommand = '/usr/bin/ploticus'; |
| 1070 | +} else { |
| 1071 | + // Back-compat for Fedora boxes |
| 1072 | + $wgTimelineSettings->ploticusCommand = '/usr/local/bin/pl'; |
| 1073 | +} |
| 1074 | +$wgTimelineSettings->epochTimestamp = '20110206135500'; // fixed font setting |
| 1075 | +putenv( "GDFONTPATH=/usr/local/apache/common/fonts" ); |
| 1076 | + |
| 1077 | +$wgAllowRealName = false; |
| 1078 | +$wgSysopRangeBans = true; |
| 1079 | +$wgSysopUserBans = true; |
| 1080 | + |
| 1081 | + |
| 1082 | +### # To declare an outage: |
| 1083 | +# include("outage.php"); |
| 1084 | +# declareOutage( "2005-01-03", "04:00", "08:00" ); |
| 1085 | + |
| 1086 | +# Log IP addresses in the recentchanges table |
| 1087 | +$wgPutIPinRC = true; |
| 1088 | + |
| 1089 | +$wgUploadSizeWarning = false; |
| 1090 | + |
| 1091 | +# Default address gets rejected by some mail hosts |
| 1092 | +$wgPasswordSender = 'wiki@wikimedia.org'; |
| 1093 | + |
| 1094 | +$wgLocalFileRepo = array( |
| 1095 | + 'class' => 'LocalRepo', |
| 1096 | + 'name' => 'local', |
| 1097 | + 'directory' => $wgUploadDirectory, |
| 1098 | + 'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath, |
| 1099 | + 'scriptDirUrl' => $wgScriptPath, |
| 1100 | + 'hashLevels' => 2, |
| 1101 | + 'thumbScriptUrl' => $wgThumbnailScriptPath, |
| 1102 | + 'transformVia404' => true, |
| 1103 | + 'initialCapital' => $wgCapitalLinks, |
| 1104 | + 'deletedDir' => "/mnt/upload6/private/archive/$site/$lang", |
| 1105 | + 'deletedHashLevels' => 3, |
| 1106 | + 'thumbDir' => str_replace( '/mnt/upload6', '/mnt/thumbs', "$wgUploadDirectory/thumb" ), |
| 1107 | +); |
| 1108 | +# New commons settings |
| 1109 | +if ( $wgDBname != 'commonswiki' ) { |
| 1110 | + $wgForeignFileRepos[] = array( |
| 1111 | + 'class' => 'ForeignDBViaLBRepo', |
| 1112 | + 'name' => 'shared', |
| 1113 | + 'directory' => '/mnt/upload6/wikipedia/commons', |
| 1114 | + 'url' => "$urlprotocol//upload.wikimedia.org/wikipedia/commons", |
| 1115 | + 'hashLevels' => 2, |
| 1116 | + 'thumbScriptUrl' => false, |
| 1117 | + 'transformVia404' => true, |
| 1118 | + 'hasSharedCache' => true, |
| 1119 | + 'descBaseUrl' => "$urlprotocol//commons.wikimedia.org/wiki/File:", |
| 1120 | + 'scriptDirUrl' => "$urlprotocol//commons.wikimedia.org/w", |
| 1121 | + 'fetchDescription' => true, |
| 1122 | + 'wiki' => 'commonswiki', |
| 1123 | + 'initialCapital' => true, |
| 1124 | + 'thumbDir' => '/mnt/thumbs/wikipedia/commons/thumb', |
| 1125 | + ); |
| 1126 | + $wgDefaultUserOptions['watchcreations'] = 1; |
| 1127 | +} |
| 1128 | + |
| 1129 | +if ( $wgDBname == 'nostalgiawiki' ) { |
| 1130 | + # Link back to current version from the archive funhouse |
| 1131 | + # wgSiteNotice should use $urlprotocol when wikipedia domain has https enabled |
| 1132 | + if ( ( isset( $_REQUEST['title'] ) && ( $title = $_REQUEST['title'] ) ) |
| 1133 | + || ( isset( $_SERVER['PATH_INFO'] ) && ( $title = substr( $_SERVER['PATH_INFO'], 1 ) ) ) ) { |
| 1134 | + if ( preg_match( '/^(.*)\\/Talk$/', $title, $matches ) ) { |
| 1135 | + $title = 'Talk:' . $matches[1]; |
| 1136 | + } |
| 1137 | + $wgSiteNotice = "[http://en.wikipedia.org/wiki/" . |
| 1138 | + htmlspecialchars( urlencode( $title ) ) . |
| 1139 | + ' See the current version of this page on Wikipedia]'; |
| 1140 | + } else { |
| 1141 | + $wgSiteNotice = "[http://en.wikipedia.org/ See current Wikipedia]"; |
| 1142 | + } |
| 1143 | + $wgDefaultUserOptions['highlightbroken'] = 0; |
| 1144 | +} |
| 1145 | + |
| 1146 | +$wgUseHashTable = true; |
| 1147 | + |
| 1148 | +$wgCopyrightIcon = '<a href="' . $urlprotocol . '//wikimediafoundation.org/"><img src="' . $urlprotocol . '//bits.wikimedia.org/images/wikimedia-button.png" width="88" height="31" alt="Wikimedia Foundation"/></a>'; |
| 1149 | + |
| 1150 | +# For Special:Cite, we only want it on wikipedia (but can't count on $site), |
| 1151 | +# not on these fakers. |
| 1152 | +$wgLanguageCodeReal = $wgLanguageCode; |
| 1153 | +# Fake it up |
| 1154 | +if ( $wgLanguageCode == 'commons' || |
| 1155 | + $wgLanguageCode == 'meta' || |
| 1156 | + $wgLanguageCode == 'sources' || |
| 1157 | + $wgLanguageCode == 'species' || |
| 1158 | + $wgLanguageCode == 'foundation' || |
| 1159 | + $wgLanguageCode == 'nostalgia' || |
| 1160 | + $wgLanguageCode == 'mediawiki' |
| 1161 | + ) { |
| 1162 | + $wgLanguageCode = 'en'; |
| 1163 | +} |
| 1164 | + |
| 1165 | +# :SEARCH: |
| 1166 | +$wgUseLuceneSearch = true; |
| 1167 | + |
| 1168 | +# Proposed emergency optimisation -- TS |
| 1169 | +/* |
| 1170 | +if ( time() < 1234195258 ) { |
| 1171 | + $wgUseLuceneSearch = false; |
| 1172 | +}*/ |
| 1173 | + |
| 1174 | +wfProfileOut( "$fname-misc2" ); |
| 1175 | + |
| 1176 | + |
| 1177 | +if ( $wgUseLuceneSearch ) { |
| 1178 | + wfProfileIn( "$fname-lucene" ); |
| 1179 | + include( "$wmfConfigDir/lucene.php" ); |
| 1180 | + wfProfileOut( "$fname-lucene" ); |
| 1181 | +} |
| 1182 | + |
| 1183 | +// Case-insensitive title prefix search extension |
| 1184 | +// Load this _after_ Lucene so Lucene's prefix search can be used |
| 1185 | +// when available (for OpenSearch suggestions and AJAX search mode) |
| 1186 | +// But note we still need TitleKey for "go" exact matches and similar. |
| 1187 | +if ( $wmgUseTitleKey ) { |
| 1188 | + include "$IP/extensions/TitleKey/TitleKey.php"; |
| 1189 | +} |
| 1190 | + |
| 1191 | +wfProfileIn( "$fname-misc3" ); |
| 1192 | + |
| 1193 | +$wgUseDumbLinkUpdate = false; |
| 1194 | +$wgAntiLockFlags = ALF_NO_LINK_LOCK | ALF_NO_BLOCK_LOCK; |
| 1195 | +# had been using |
| 1196 | +# $wgUseDumbLinkUpdate = true; |
| 1197 | +# $wgAntiLockFlags = ALF_PRELOAD_LINKS | ALF_PRELOAD_EXISTENCE; |
| 1198 | + |
| 1199 | +# $wgSquidFastPurge = true; |
| 1200 | +# Deferred update still broken |
| 1201 | +$wgMaxSquidPurgeTitles = 500; |
| 1202 | + |
| 1203 | +$wgInvalidateCacheOnLocalSettingsChange = false; |
| 1204 | + |
| 1205 | +// General Cache Epoch: |
| 1206 | +$wgCacheEpoch = '20060419151500'; # broken thumbnails due to power failure |
| 1207 | + |
| 1208 | +// Entries olders than the general wgCacheEpoch |
| 1209 | +# if( $lang == 'sr' ) $wgCacheEpoch = '20060311075933'; # watch/unwatch title corruption |
| 1210 | +# if( $wgDBname == 'frwikiquote' ) $wgCacheEpoch = '20060331191924'; # cleaned... |
| 1211 | + |
| 1212 | +// Newer entries |
| 1213 | +if ( $wgDBname == 'zhwiki' ) $wgCacheEpoch = '20060528093500'; # parser bug? |
| 1214 | +if ( $wgDBname == 'lawikibooks' ) $wgCacheEpoch = '20060610090000'; # sidebar bug |
| 1215 | +if ( $wmgHTTPSExperiment ) $wgCacheEpoch = '20110718202400'; |
| 1216 | + |
| 1217 | +# $wgThumbnailEpoch = '20060227114700'; # various rsvg and imagemagick fixes |
| 1218 | +$wgThumbnailEpoch = '20051227114700'; # various rsvg and imagemagick fixes |
| 1219 | + |
| 1220 | +# OAI repository for update server |
| 1221 | +include( $IP . '/extensions/OAI/OAIRepo.php' ); |
| 1222 | +$oaiAgentRegex = '/experimental/'; |
| 1223 | +$oaiAuth = true; # broken... squid? php config? wtf |
| 1224 | +$oaiAudit = true; |
| 1225 | +$oaiAuditDatabase = 'oai'; |
| 1226 | +$wgDebugLogGroups['oai'] = 'udp://10.0.5.8:8420/oai'; |
| 1227 | +$oaiChunkSize = 40; |
| 1228 | + |
| 1229 | +$wgEnableUserEmail = true; |
| 1230 | + |
| 1231 | +# XFF log for vandal tracking |
| 1232 | +function wfLogXFF() { |
| 1233 | + if ( ( @$_SERVER['REQUEST_METHOD'] ) == 'POST' ) { |
| 1234 | + $uri = ( $_SERVER['HTTPS'] ? 'https://' : 'http://' ) . |
| 1235 | + $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
| 1236 | + wfErrorLog( |
| 1237 | + gmdate( 'r' ) . "\t" . |
| 1238 | + "$uri\t" . |
| 1239 | + "{$_SERVER['HTTP_X_FORWARDED_FOR']}, {$_SERVER['REMOTE_ADDR']}\t" . |
| 1240 | + ( $_REQUEST['wpSave'] ? 'save' : '' ) . "\n", |
| 1241 | + 'udp://10.0.5.8:8420/xff' ); |
| 1242 | + } |
| 1243 | +} |
| 1244 | +$wgExtensionFunctions[] = 'wfLogXFF'; |
| 1245 | + |
| 1246 | +// bug 24313, turn off minordefault on enwiki |
| 1247 | +if ( $wgDBname == 'enwiki' ) { |
| 1248 | + $wgHiddenPrefs[] = 'minordefault'; |
| 1249 | +} |
| 1250 | + |
| 1251 | + |
| 1252 | +wfProfileOut( "$fname-misc3" ); |
| 1253 | +wfProfileIn( "$fname-ext-include2" ); |
| 1254 | + |
| 1255 | +# Experimental category intersection plugin. |
| 1256 | +# Enabling on an exerimental basis for Wikinews only, |
| 1257 | +# 2005-03-30 brion |
| 1258 | +# if( $site == 'wikinews' || $site == 'wikiquote' || |
| 1259 | +# $wgDBname == 'metawiki' || |
| 1260 | +# $wgDBname == 'enwiktionary' || $wgDBname == 'dewiktionary' || |
| 1261 | +# $site == 'wikibooks' || |
| 1262 | +# $wgDBname == 'srwiki' ) { |
| 1263 | +if ( $wmgUseDPL ) { |
| 1264 | + include( $IP . '/extensions/intersection/DynamicPageList.php' ); |
| 1265 | +} |
| 1266 | + |
| 1267 | +# 2010-01-22 hashar: disabled as per 16878 |
| 1268 | +// include( $IP.'/extensions/CrossNamespaceLinks/SpecialCrossNamespaceLinks.php' ); |
| 1269 | + |
| 1270 | +# if ( $wgDBname == 'frwiki' || $wgDBname == 'testwiki' || $wgDBname == 'dewiki' ) { |
| 1271 | +# include( $IP.'/BoardVoteInit.php' ); |
| 1272 | +# } |
| 1273 | + |
| 1274 | +include( $IP . '/extensions/Renameuser/SpecialRenameuser.php' ); |
| 1275 | + |
| 1276 | +# if( $wgDBname == 'metawiki' || $wgDBname == 'mediawikiwiki' || $wgDBname == 'chrwiki' || $wgDBname == 'pdcwiki' ) { |
| 1277 | +if ( $wmgUseSpecialNuke ) { |
| 1278 | + // TODO: Update path |
| 1279 | + include( $IP . '/extensions/Nuke/SpecialNuke.php' ); |
| 1280 | +} |
| 1281 | + |
| 1282 | +include( "$IP/extensions/AntiBot/AntiBot.php" ); |
| 1283 | +$wgAntiBotPayloads = array( |
| 1284 | + 'default' => array( 'log', 'fail' ), |
| 1285 | +); |
| 1286 | + |
| 1287 | +include( "$IP/extensions/TorBlock/TorBlock.php" ); |
| 1288 | +$wgTorLoadNodes = false; |
| 1289 | +$wgTorIPs = array( '91.198.174.232', '208.80.152.2', '208.80.152.134' ); |
| 1290 | +$wgTorAutoConfirmAge = 90 * 86400; |
| 1291 | +$wgTorAutoConfirmCount = 100; |
| 1292 | +$wgTorDisableAdminBlocks = false; |
| 1293 | +$wgTorTagChanges = false; |
| 1294 | +$wgGroupPermissions['user']['torunblocked'] = false; |
| 1295 | + |
| 1296 | +if ( $wmgUseRSSExtension ) { |
| 1297 | + include( "$IP/extensions/RSS/RSS.php" ); |
| 1298 | + # $wgRSSProxy = 'url-downloader.wikimedia.org:8080'; |
| 1299 | + $wgRSSAllowedFeeds = $wmgRSSAllowedFeeds; |
| 1300 | +} |
| 1301 | + |
| 1302 | +wfProfileOut( "$fname-ext-include2" ); |
| 1303 | +wfProfileIn( "$fname-misc4" ); |
| 1304 | + |
| 1305 | + |
| 1306 | +$wgDisabledActions = array( 'credits' ); |
| 1307 | + |
| 1308 | +# Process group overrides |
| 1309 | + |
| 1310 | +# makesysop permission removed, https://bugzilla.wikimedia.org/show_bug.cgi?id=23081 |
| 1311 | +# $wgGroupPermissions['steward' ]['makesysop' ] = true; |
| 1312 | +# $wgGroupPermissions['bureaucrat']['makesysop' ] = true; |
| 1313 | + |
| 1314 | +$wgGroupPermissions['steward' ]['userrights'] = true; |
| 1315 | +$wgGroupPermissions['bureaucrat']['userrights'] = false; |
| 1316 | + |
| 1317 | +$wgGroupPermissions['sysop']['bigdelete'] = false; // quick hack |
| 1318 | + |
| 1319 | +foreach ( $groupOverrides2 as $group => $permissions ) { |
| 1320 | + if ( !array_key_exists( $group, $wgGroupPermissions ) ) { |
| 1321 | + $wgGroupPermissions[$group] = array(); |
| 1322 | + } |
| 1323 | + $wgGroupPermissions[$group] = $permissions + $wgGroupPermissions[$group]; |
| 1324 | +} |
| 1325 | +foreach ( $groupOverrides as $group => $permissions ) { |
| 1326 | + if ( !array_key_exists( $group, $wgGroupPermissions ) ) { |
| 1327 | + $wgGroupPermissions[$group] = array(); |
| 1328 | + } |
| 1329 | + $wgGroupPermissions[$group] = $permissions + $wgGroupPermissions[$group]; |
| 1330 | +} |
| 1331 | + |
| 1332 | +$wgGroupPermissions['confirmed'] = $wgGroupPermissions['autoconfirmed']; |
| 1333 | +$wgGroupPermissions['confirmed']['skipcaptcha'] = true; |
| 1334 | + |
| 1335 | +$wgAutopromote = array( |
| 1336 | + 'autoconfirmed' => array( '&', |
| 1337 | + array( APCOND_EDITCOUNT, $wgAutoConfirmCount ), |
| 1338 | + array( APCOND_AGE, $wgAutoConfirmAge ), |
| 1339 | + ), |
| 1340 | +); |
| 1341 | + |
| 1342 | +if ( is_array( $wmgAutopromoteExtraGroups ) ) { |
| 1343 | + $wgAutopromote += $wmgAutopromoteExtraGroups; |
| 1344 | +} |
| 1345 | + |
| 1346 | +if ( is_array( $wmgExtraImplicitGroups ) ) { |
| 1347 | + $wgImplicitGroups = array_merge( $wgImplicitGroups, $wmgExtraImplicitGroups ); |
| 1348 | +} |
| 1349 | + |
| 1350 | +$wgLegacySchemaConversion = true; |
| 1351 | + |
| 1352 | +# $wgReadOnly = '5 min DB server maintenance...'; |
| 1353 | +# $wgReadOnly = 'Read-only during network issues'; |
| 1354 | + |
| 1355 | + |
| 1356 | +if ( $cluster != 'pmtpa' ) { |
| 1357 | + $wgHTTPTimeout = 10; |
| 1358 | +} |
| 1359 | + |
| 1360 | +/* |
| 1361 | +if( //isset( $_POST['action'] ) && |
| 1362 | + isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && |
| 1363 | + strpos( $_SERVER['HTTP_X_FORWARDED_FOR'], '208.63.189.57' ) !== false ) { |
| 1364 | + $wgDebugLogFile = "udp://10.0.5.8:8420/broken-editors"; |
| 1365 | + $wgDebugDumpSql = true; |
| 1366 | + foreach( $wgDBservers as $key => $x ) { |
| 1367 | + $wgDBservers[$key]['flags'] |= DBO_DEBUG; |
| 1368 | + } |
| 1369 | +} |
| 1370 | +*/ |
| 1371 | + |
| 1372 | +// disabling so we don't worry about xmlrpc |
| 1373 | +// 2006-10-21 |
| 1374 | +# include( $IP.'/extensions/MWBlocker/MWBlockerHook.php' ); |
| 1375 | +# $mwBlockerHost = 'larousse'; |
| 1376 | +# $mwBlockerPort = 8126; |
| 1377 | +## $wgProxyList = array_flip( array_map( 'trim', file( 'udp://10.0.5.8:8420/mwblocker' ) ) ); |
| 1378 | +$wgProxyList = "$wmfConfigDir/mwblocker.log"; |
| 1379 | + |
| 1380 | +if ( getenv( 'WIKIDEBUG' ) ) { |
| 1381 | + $wgDebugLogFile = '/tmp/wiki.log'; |
| 1382 | + $wgDebugDumpSql = true; |
| 1383 | + $wgDebugLogGroups = array(); |
| 1384 | + foreach ( $wgDBservers as $key => $val ) { |
| 1385 | + $wgDBserver[$key]['flags'] |= 1;// DBO_DEBUG; |
| 1386 | + } |
| 1387 | + foreach ( $wgExternalServers as $key => $val ) { |
| 1388 | + foreach ( $val as $x => $y ) { |
| 1389 | + $wgExternalServers[$key][$x]['flags'] |= 1;// DBO_DEBUG; |
| 1390 | + } |
| 1391 | + } |
| 1392 | +} |
| 1393 | + |
| 1394 | +wfProfileOut( "$fname-misc4" ); |
| 1395 | +wfProfileIn( "$fname-misc5" ); |
| 1396 | + |
| 1397 | +// $wgDisableSearchContext = true; |
| 1398 | +// Turn off search text extracts for random visitors, put it on |
| 1399 | +// for editors. --brion 2005-11-09 |
| 1400 | +// Turning it back on -- brion 2008-03-12 |
| 1401 | +// $wgDisableSearchContext = !isset($_COOKIE["{$wgDBname}_session"]); |
| 1402 | + |
| 1403 | +$wgBrowserBlackList[] = '/^Lynx/'; |
| 1404 | + |
| 1405 | +// Vandal checks |
| 1406 | +require( "$wmfConfigDir/checkers.php" ); |
| 1407 | + |
| 1408 | +// Experimental ScanSet extension |
| 1409 | +if ( $wgDBname == 'enwikisource' ) { |
| 1410 | + require( $IP . '/extensions/ScanSet/ScanSet.php' ); |
| 1411 | + $wgScanSetSettings = array( |
| 1412 | + 'baseDirectory' => '/mnt/upload6/wikipedia/commons/scans', |
| 1413 | + 'basePath' => "$urlprotocol//upload.wikimedia.org/wikipedia/commons/scans", |
| 1414 | + ); |
| 1415 | +} |
| 1416 | + |
| 1417 | +// 2005-11-27 Special:Cite for Wikipedia -Ævar |
| 1418 | +// FIXME: This should really be done with $wmgUseSpecialCite in InitialiseSettings.php |
| 1419 | +if ( ( $site == 'wikipedia' && $wgLanguageCodeReal == $wgLanguageCode ) |
| 1420 | + || $site == 'wikisource' |
| 1421 | + || ( $site == 'wikiversity' && $wgLanguageCode == 'en' ) |
| 1422 | + || ( $site == 'wikibooks' && $wgLanguageCode == 'it' ) |
| 1423 | + || ( $site == 'wiktionary' && $wgLanguageCode == 'it' ) ) |
| 1424 | + require( $IP . '/extensions/Cite/SpecialCite.php' ); |
| 1425 | + |
| 1426 | +// Added throttle for account creations on zh due to mass registration attack 2005-12-16 |
| 1427 | +// might be useful elesewhere. --brion |
| 1428 | +// disabled temporarily due to tugela bug -- Tim |
| 1429 | + |
| 1430 | +if ( false /*$lang == 'zh' || $lang == 'en'*/ ) { |
| 1431 | + require( "$IP/extensions/UserThrottle/UserThrottle.php" ); |
| 1432 | + $wgGlobalAccountCreationThrottle = array( |
| 1433 | +/* |
| 1434 | + 'min_interval' => 30, // Hard minimum time between creations (default 5) |
| 1435 | + 'soft_time' => 300, // Timeout for rolling count |
| 1436 | + 'soft_limit' => 5, // 5 registrations in five minutes (default 10) |
| 1437 | +*/ |
| 1438 | + 'min_interval' => 0, // Hard minimum time between creations (default 5) |
| 1439 | + 'soft_time' => 60, // Timeout for rolling count (default 5 minutes) |
| 1440 | + 'soft_limit' => 2, // 2 registrations in one minutes (default 10) |
| 1441 | + ); |
| 1442 | +} |
| 1443 | + |
| 1444 | + |
| 1445 | +// Customize URL handling for secure.wikimedia.org HTTPS logins |
| 1446 | +if ( $secure ) { |
| 1447 | + require( "$wmfConfigDir/secure.php" ); |
| 1448 | +} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) { |
| 1449 | + // New HTTPS service on regular URLs |
| 1450 | + $wgInternalServer = $wgServer; // Keep this as HTTP for IRC notifications (bug 29925) |
| 1451 | + $wgServer = preg_replace( '/^http:/', 'https:', $wgServer ); |
| 1452 | +} else { |
| 1453 | + # For non-SSL hosts... |
| 1454 | + if ( $wgDBname != 'testwiki' ) { |
| 1455 | +# $wgStyleSheetPath = 'http://upload.wikimedia.org/skins'; |
| 1456 | + } |
| 1457 | +} |
| 1458 | + |
| 1459 | +if ( isset( $_REQUEST['captchabypass'] ) && $_REQUEST['captchabypass'] == $wmgCaptchaPassword ) { |
| 1460 | + $wmgEnableCaptcha = false; |
| 1461 | +} |
| 1462 | + |
| 1463 | +if ( $wmgEnableCaptcha ) { |
| 1464 | + require( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" ); |
| 1465 | + require( "$IP/extensions/ConfirmEdit/FancyCaptcha.php" ); |
| 1466 | + $wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true; |
| 1467 | +# $wgCaptchaTriggers['edit'] = true; |
| 1468 | + $wgCaptchaSecret = $wmgCaptchaSecret; |
| 1469 | + $wgCaptchaDirectory = '/mnt/upload6/private/captcha'; |
| 1470 | + $wgCaptchaDirectoryLevels = 3; |
| 1471 | + $wgCaptchaStorageClass = 'CaptchaCacheStore'; |
| 1472 | + $wgCaptchaClass = 'FancyCaptcha'; |
| 1473 | + $wgCaptchaWhitelist = '#^(https?:)?//([.a-z0-9-]+\\.)?((wikimedia|wikipedia|wiktionary|wikiquote|wikibooks|wikisource|wikispecies|mediawiki|wikimediafoundation|wikinews|wikiversity)\.org|dnsstuff\.com|completewhois\.com|wikimedia\.de|toolserver\.org)(/|$)#i'; |
| 1474 | + $wgCaptchaWhitelistIP = array( '91.198.174.0/24' ); # toolserver (bug 23982) |
| 1475 | + $wgDebugLogGroups["captcha"] = "udp://10.0.5.8:8420/captcha"; |
| 1476 | + /** |
| 1477 | + * Possibly a broken spambot, or a spambot being tested before a real run. |
| 1478 | + * Hitting lots of wikis in late June 2006 |
| 1479 | + */ |
| 1480 | + $wgCaptchaRegexes[] = '/\b\d{22,28}\b/'; |
| 1481 | + /** |
| 1482 | + * Somebody's been repeatedly hitting some user talk pages and other arts |
| 1483 | + * with this; February 2007 |
| 1484 | + */ |
| 1485 | + $wgCaptchaRegexes[] = '/\{\{indefblockeduser\}\}/'; |
| 1486 | + // copyvio bot on be.wikipedia |
| 1487 | + if ( $lang == 'be' ) { |
| 1488 | + $wgCaptchaRegexes[] = '/\[\[Катэгорыя:Архітэктура\]\]/'; |
| 1489 | + } |
| 1490 | + if ( $wgDBname == 'testwiki' ) { |
| 1491 | + $wgCaptchaTriggers['create'] = true; |
| 1492 | + } |
| 1493 | + // Mystery proxy bot |
| 1494 | + // http://en.wikipedia.org/w/index.php?title=Killamanjaro&diff=prev&oldid=168037317 |
| 1495 | + $wgCaptchaRegexes[] = '/^[a-z0-9]{5,}$/m'; |
| 1496 | + |
| 1497 | + // 'XRumer' spambot |
| 1498 | + // adds non-real links |
| 1499 | + // http://meta.wikimedia.org/wiki/User:Cometstyles/XRumer |
| 1500 | + // http://meta.wikimedia.org/wiki/User:Jorunn/tracks |
| 1501 | + // (added 2008-05-08 -- brion) |
| 1502 | + $wgCaptchaRegexes[] = '/<a +href/i'; |
| 1503 | + |
| 1504 | + // https://bugzilla.wikimedia.org/show_bug.cgi?id=14544 |
| 1505 | + // 2008-07-05 |
| 1506 | + $wgCaptchaRegexes[] = '/\b(?i:anontalk\.com)\b/'; |
| 1507 | + |
| 1508 | + // For emergencies |
| 1509 | + if ( $wmgEmergencyCaptcha ) { |
| 1510 | + $wgCaptchaTriggers['edit'] = true; |
| 1511 | + $wgCaptchaTriggers['create'] = true; |
| 1512 | + } |
| 1513 | +} |
| 1514 | + |
| 1515 | +require( "$IP/extensions/Oversight/HideRevision.php" ); |
| 1516 | +$wgGroupPermissions['oversight']['hiderevision'] = false; |
| 1517 | +// $wgGroupPermissions['oversight']['oversight'] = true; |
| 1518 | + |
| 1519 | +if ( extension_loaded( 'wikidiff2' ) ) { |
| 1520 | + $wgExternalDiffEngine = 'wikidiff2'; |
| 1521 | +} |
| 1522 | + |
| 1523 | +if ( function_exists( 'dba_open' ) && file_exists( "$IP/cache/interwiki.cdb" ) ) { |
| 1524 | + $wgInterwikiCache = "$IP/cache/interwiki.cdb"; |
| 1525 | +} |
| 1526 | +if ( $wmgHTTPSExperiment && function_exists( 'dba_open' ) && file_exists( "$IP/cache/interwiki-pr.cdb" ) ) { |
| 1527 | + $wgInterwikiCache = "$IP/cache/interwiki-pr.cdb"; |
| 1528 | +} |
| 1529 | + |
| 1530 | +$wgDebugLogGroups["ExternalStoreDB"] = "udp://10.0.5.8:8420/external"; |
| 1531 | + |
| 1532 | +# if( $wgDBname == 'frwikiquote' || |
| 1533 | +if ( $wgDBname == 'sep11wiki' ) { |
| 1534 | + $wgSiteNotice = @file_get_contents( $wgReadOnlyFile ); |
| 1535 | +} |
| 1536 | + |
| 1537 | +// Enable enotif for user talk if it's on for watchlist. |
| 1538 | +if ( $wgEnotifWatchlist ) { |
| 1539 | + $wgEnotifUserTalk = true; |
| 1540 | +} else { |
| 1541 | + $wgShowUpdatedMarker = false; // not working right ? |
| 1542 | + |
| 1543 | + // Trial by Roan, Mark B and Mark H, Nov 8 2011 |
| 1544 | + // Set $wgEnotifUserTalk to true everywhere, but keep $wgShowUpdatedMarker disabled where it was disabled previously |
| 1545 | + $wgEnotifUserTalk = true; |
| 1546 | +} |
| 1547 | + |
| 1548 | +# testing enotif via job queue, river 2007-05-10 |
| 1549 | +# turning this off since it's currently so lagged it's horrible -- brion 2009-01-20 |
| 1550 | +# turning back on while investigating other probs |
| 1551 | +$wgEnotifUseJobQ = true; |
| 1552 | + |
| 1553 | +// Quick hack for Makesysop vs enwiki |
| 1554 | +// (Slightly slower hack now [TS]) |
| 1555 | +if ( isset( $sectionLoads ) ) { |
| 1556 | + $wgAlternateMaster = array( 'DEFAULT' => $dbHostsByName[key( $sectionLoads['DEFAULT'] )] ); |
| 1557 | + foreach ( $sectionsByDB as $db => $section ) { |
| 1558 | + $wgAlternateMaster[$db] = $dbHostsByName[key( $sectionLoads[$section] )]; |
| 1559 | + } |
| 1560 | +} |
| 1561 | + |
| 1562 | +$wgDebugLogGroups["query"] = "udp://10.0.5.8:8420/botquery"; |
| 1563 | + |
| 1564 | +// Username spoofing / mixed-script / similarity check detection |
| 1565 | +include $IP . '/extensions/AntiSpoof/AntiSpoof.php'; |
| 1566 | +// $wgAntiSpoofAccounts = false; // log only for now |
| 1567 | +$wgDebugLogGroups['antispoof'] = 'udp://10.0.5.8:8420/antispoof'; |
| 1568 | + |
| 1569 | +// For transwiki import |
| 1570 | +ini_set( 'user_agent', 'Wikimedia internal server fetcher (noc@wikimedia.org' ); |
| 1571 | + |
| 1572 | +// CentralAuth |
| 1573 | +if ( $wmgUseCentralAuth ) { |
| 1574 | + include "$IP/extensions/CentralAuth/CentralAuth.php"; |
| 1575 | + $wgCentralAuthDryRun = false; |
| 1576 | + # unset( $wgGroupPermissions['*']['centralauth-merge'] ); |
| 1577 | + # $wgGroupPermissions['sysop']['centralauth-merge'] = true; |
| 1578 | + $wgCentralAuthCookies = true; |
| 1579 | + |
| 1580 | + # Broken -- TS |
| 1581 | + $wgCentralAuthUDPAddress = $wgRC2UDPAddress; |
| 1582 | + $wgCentralAuthNew2UDPPrefix = "#central\t"; |
| 1583 | + |
| 1584 | + # Determine second-level domain |
| 1585 | + if ( preg_match( '/^\w+\.\w+\./', strrev( $wgServer ), $m ) ) { |
| 1586 | + $wmgSecondLevelDomain = strrev( $m[0] ); |
| 1587 | + } else { |
| 1588 | + $wmgSecondLevelDomain = false; |
| 1589 | + } |
| 1590 | + $wgCentralAuthAutoLoginWikis = array( |
| 1591 | + '.wikipedia.org' => 'enwiki', |
| 1592 | + 'meta.wikimedia.org' => 'metawiki', |
| 1593 | + '.wiktionary.org' => 'enwiktionary', |
| 1594 | + '.wikibooks.org' => 'enwikibooks', |
| 1595 | + '.wikiquote.org' => 'enwikiquote', |
| 1596 | + '.wikisource.org' => 'enwikisource', |
| 1597 | + 'commons.wikimedia.org' => 'commonswiki', |
| 1598 | + '.wikinews.org' => 'enwikinews', |
| 1599 | + '.wikiversity.org' => 'enwikiversity', |
| 1600 | + '.mediawiki.org' => 'mediawikiwiki', |
| 1601 | + 'species.wikimedia.org' => 'specieswiki', |
| 1602 | + 'incubator.wikimedia.org' => 'incubatorwiki', |
| 1603 | + ); |
| 1604 | + # Don't autologin to self |
| 1605 | + if ( isset( $wgCentralAuthAutoLoginWikis[$wmgSecondLevelDomain] ) ) { |
| 1606 | + unset( $wgCentralAuthAutoLoginWikis[$wmgSecondLevelDomain] ); |
| 1607 | + $wgCentralAuthCookieDomain = $wmgSecondLevelDomain; |
| 1608 | + } elseif ( $wgDBname == 'commonswiki' ) { |
| 1609 | + unset( $wgCentralAuthAutoLoginWikis['commons.wikimedia.org'] ); |
| 1610 | + $wgCentralAuthCookieDomain = 'commons.wikimedia.org'; |
| 1611 | + } elseif ( $wgDBname == 'metawiki' ) { |
| 1612 | + unset( $wgCentralAuthAutoLoginWikis['meta.wikimedia.org'] ); |
| 1613 | + $wgCentralAuthCookieDomain = 'meta.wikimedia.org'; |
| 1614 | + } else { |
| 1615 | + # Don't set 2nd-level cookies for *.wikimedia.org, insecure |
| 1616 | + $wgCentralAuthCookieDomain = ''; |
| 1617 | + } |
| 1618 | + $wgCentralAuthLoginIcon = $wmgCentralAuthLoginIcon; |
| 1619 | + $wgCentralAuthAutoNew = true; |
| 1620 | + |
| 1621 | + $wgHooks['CentralAuthWikiList'][] = 'wmfCentralAuthWikiList'; |
| 1622 | + function wmfCentralAuthWikiList( &$list ) { |
| 1623 | + global $wgLocalDatabases, $IP; |
| 1624 | + $privateWikis = array_map( 'trim', file( "$IP/../private.dblist" ) ); |
| 1625 | + $fishbowlWikis = array_map( 'trim', file( "$IP/../fishbowl.dblist" ) ); |
| 1626 | + $closedWikis = array_map( 'trim', file( "$IP/../closed.dblist" ) ); |
| 1627 | + $list = array_diff( $wgLocalDatabases, |
| 1628 | + $privateWikis, $fishbowlWikis, $closedWikis ); |
| 1629 | + return true; |
| 1630 | + } |
| 1631 | + |
| 1632 | + // Let's give it another try |
| 1633 | + $wgCentralAuthCreateOnView = true; |
| 1634 | + |
| 1635 | + // Enable global sessions for secure.wikimedia.org |
| 1636 | + if ( $secure ) { |
| 1637 | + $wgCentralAuthCookies = true; |
| 1638 | + $wgCentralAuthCookieDomain = 'secure.wikimedia.org'; |
| 1639 | + |
| 1640 | + $wgCentralAuthCookiePrefix = 'centralauth_'; |
| 1641 | + |
| 1642 | + // Don't log in to the insecure URLs |
| 1643 | + $wgCentralAuthAutoLoginWikis = array(); |
| 1644 | + } |
| 1645 | +} |
| 1646 | + |
| 1647 | +// taking it live 2006-12-15 brion |
| 1648 | +if ( $wmgUseDismissableSiteNotice ) { |
| 1649 | + require( "$IP/extensions/DismissableSiteNotice/DismissableSiteNotice.php" ); |
| 1650 | +} |
| 1651 | +$wgMajorSiteNoticeID = '2'; |
| 1652 | + |
| 1653 | +$wgHooks['LoginAuthenticateAudit'][] = 'logBadPassword'; |
| 1654 | +$wgDebugLogGroups['badpass'] = 'udp://10.0.5.8:8420/badpass'; |
| 1655 | +$wgDebugLogGroups['ts_badpass'] = 'udp://10.0.5.8:8420/ts_badpass'; |
| 1656 | +$wgHooks['PrefsEmailAudit'][] = 'logPrefsEmail'; |
| 1657 | +$wgHooks['PrefsPasswordAudit'][] = 'logPrefsPassword'; |
| 1658 | + |
| 1659 | +function logBadPassword( $user, $pass, $retval ) { |
| 1660 | + $headers = apache_request_headers(); |
| 1661 | + |
| 1662 | + if ( $user->isAllowed( 'delete' ) && $retval != LoginForm::SUCCESS ) { |
| 1663 | + switch( $retval ) { |
| 1664 | + case LoginForm::WRONG_PASS: |
| 1665 | + case LoginForm::EMPTY_PASS: |
| 1666 | + $bit = 'Bad login attempt'; |
| 1667 | + break; |
| 1668 | + case LoginForm::RESET_PASS: |
| 1669 | + $bit = 'Login with temporary password'; |
| 1670 | + break; |
| 1671 | + default: |
| 1672 | + $bit = '???'; |
| 1673 | + } |
| 1674 | + |
| 1675 | + wfDebugLog( 'badpass', "$bit for sysop '" . |
| 1676 | + $user->getName() . "' from " . wfGetIP() . |
| 1677 | + # " - " . serialize( apache_request_headers() ) |
| 1678 | + " - " . @$headers['X-Forwarded-For'] . |
| 1679 | + ' - ' . @$headers['User-Agent'] . |
| 1680 | + '' |
| 1681 | + ); |
| 1682 | + } |
| 1683 | + |
| 1684 | + # Looking for broken bot on toolserver -river 2007-10-13 |
| 1685 | + if ( $retval != LoginForm::SUCCESS |
| 1686 | + && @strpos( @$headers['X-Forwarded-For'], "91.198.174.201" ) !== false ) |
| 1687 | + { |
| 1688 | + wfDebugLog( 'ts_badpass', "bad login for '" . $user->getName() . "' - " |
| 1689 | + . @$headers['User-Agent'] ); |
| 1690 | + } |
| 1691 | + |
| 1692 | + return true; |
| 1693 | +} |
| 1694 | + |
| 1695 | +function logPrefsEmail( $user, $old, $new ) { |
| 1696 | + if ( $user->isAllowed( 'delete' ) ) { |
| 1697 | + $headers = apache_request_headers(); |
| 1698 | + wfDebugLog( 'badpass', "Email changed in prefs for sysop '" . |
| 1699 | + $user->getName() . |
| 1700 | + "' from '$old' to '$new'" . |
| 1701 | + " - " . wfGetIP() . |
| 1702 | + # " - " . serialize( apache_request_headers() ) |
| 1703 | + " - " . @$headers['X-Forwarded-For'] . |
| 1704 | + ' - ' . @$headers['User-Agent'] . |
| 1705 | + '' ); |
| 1706 | + } |
| 1707 | + return true; |
| 1708 | +} |
| 1709 | + |
| 1710 | +function logPrefsPassword( $user, $pass, $status ) { |
| 1711 | + if ( $user->isAllowed( 'delete' ) ) { |
| 1712 | + $headers = apache_request_headers(); |
| 1713 | + wfDebugLog( 'badpass', "Password change in prefs for sysop '" . |
| 1714 | + $user->getName() . |
| 1715 | + "': $status" . |
| 1716 | + " - " . wfGetIP() . |
| 1717 | + # " - " . serialize( apache_request_headers() ) |
| 1718 | + " - " . @$headers['X-Forwarded-For'] . |
| 1719 | + ' - ' . @$headers['User-Agent'] . |
| 1720 | + '' ); |
| 1721 | + } |
| 1722 | + return true; |
| 1723 | +} |
| 1724 | + |
| 1725 | +if ( file_exists( '/etc/wikimedia-image-scaler' ) ) { |
| 1726 | + $wgMaxShellMemory = 300000; // temp was 200M |
| 1727 | +} |
| 1728 | +$wgMaxShellTime = 50; // so it times out before PHP and curl and squid |
| 1729 | +$wgImageMagickTempDir = '/a/magick-tmp'; |
| 1730 | + |
| 1731 | +// Re-enable GIF scaling --catrope 2010-01-04 |
| 1732 | +// Disabled again, apparently thumbnailed GIFs above the limits have only one frame, |
| 1733 | +// should be unthumbnailed instead -- Andrew 2010-01-13 |
| 1734 | +// Retrying with wgMaxAnimatedGifArea back at a sensible value. Andrew 2010-04-06 |
| 1735 | +// if ( $wgDBname != 'testwiki' ) { |
| 1736 | +// $wgMediaHandlers['image/gif'] = 'BitmapHandler_ClientOnly'; |
| 1737 | +// } |
| 1738 | + |
| 1739 | + |
| 1740 | +// Banner notice system |
| 1741 | +if ( $wmgUseCentralNotice ) { |
| 1742 | + include "$IP/extensions/CentralNotice/CentralNotice.php"; |
| 1743 | + |
| 1744 | + // new settings for secure server support |
| 1745 | + if ( $secure ) { |
| 1746 | + # Don't load the JS from an insecure source! |
| 1747 | + $wgCentralPagePath = 'https://secure.wikimedia.org/wikipedia/meta/w/index.php'; |
| 1748 | + } elseif ( $wgDBname == 'testwiki' ) { |
| 1749 | + $wgCentralPagePath = "$urlprotocol//test.wikipedia.org/w/index.php"; |
| 1750 | + } else { |
| 1751 | + $wgCentralPagePath = "$urlprotocol//meta.wikimedia.org/w/index.php"; |
| 1752 | + } |
| 1753 | + |
| 1754 | + $wgNoticeProject = $wmgNoticeProject; |
| 1755 | + |
| 1756 | + if ( $wgDBname == 'testwiki' ) { |
| 1757 | + $wgCentralDBname = 'testwiki'; |
| 1758 | + } else { |
| 1759 | + $wgCentralDBname = 'metawiki'; |
| 1760 | + } |
| 1761 | + |
| 1762 | + if( $wgDBname == 'testwiki' || $wgDBname == 'enwiki' ) { |
| 1763 | + $wgNoticeBanner_Harvard2011['enable'] = true; |
| 1764 | + $wgNoticeBanner_Harvard2011['salt'] = "42"; |
| 1765 | + } |
| 1766 | + |
| 1767 | + |
| 1768 | + $wgCentralNoticeLoader = $wmgCentralNoticeLoader; |
| 1769 | + |
| 1770 | + /* |
| 1771 | + $wgNoticeTestMode = true; |
| 1772 | + $wgNoticeEnabledSites = array( |
| 1773 | + 'test.wikipedia', |
| 1774 | + 'en.wikipedia', // sigh |
| 1775 | + 'en.*', |
| 1776 | + 'meta.*', |
| 1777 | + 'commons.*', |
| 1778 | + # Wednesday |
| 1779 | + 'af.*', |
| 1780 | + 'ca.*', |
| 1781 | + 'de.*', |
| 1782 | + 'fr.*', |
| 1783 | + 'ja.*', |
| 1784 | + 'ru.*', |
| 1785 | + 'sv.*', |
| 1786 | + 'zh.*', |
| 1787 | + 'zh-yue.*', |
| 1788 | + ); |
| 1789 | + */ |
| 1790 | + |
| 1791 | + # Wed evening -- all on! |
| 1792 | + $wgNoticeTimeout = 3600; |
| 1793 | + $wgNoticeServerTimeout = 3600; // to let the counter update |
| 1794 | + $wgNoticeCounterSource = $urlprotocol . '//wikimediafoundation.org/wiki/Special:ContributionTotal' . |
| 1795 | + '?action=raw' . |
| 1796 | + '&start=20101112000000' . // FY 10-11 |
| 1797 | + '&fudgefactor=660000'; // fudge for pledged donations not in CRM |
| 1798 | + |
| 1799 | + if ( $wgDBname == 'metawiki' || $wgDBname == 'testwiki' ) { |
| 1800 | + $wgNoticeInfrastructure = true; |
| 1801 | + } else { |
| 1802 | + $wgNoticeInfrastructure = false; |
| 1803 | + } |
| 1804 | + |
| 1805 | + // Set fundraising banners to use HTTPS on foundatoin wiki |
| 1806 | + $wgNoticeFundraisingUrl = 'https://wikimediafoundation.org/wiki/Special:LandingCheck'; |
| 1807 | +} |
| 1808 | + |
| 1809 | +// Set CentralNotice banner hide cookie; Needs to be enabled for all wikis that display banners ~awjr 2011-11-07 |
| 1810 | +if ( $wmgSetNoticeHideBannersExpiration && $wmgUseCentralNotice ) { |
| 1811 | + $wgNoticeHideBannersExpiration = 1327971600; // expire fundraising cookie on January 31, 2012 |
| 1812 | +} |
| 1813 | + |
| 1814 | +// Load our site-specific l10n extensions |
| 1815 | +include "$IP/extensions/WikimediaMessages/WikimediaMessages.php"; |
| 1816 | + |
| 1817 | +if ( $wmgUseWikimediaLicenseTexts ) { |
| 1818 | + include "$IP/extensions/WikimediaMessages/WikimediaLicenseTexts.php"; |
| 1819 | +} |
| 1820 | + |
| 1821 | +function wfNoDeleteMainPage( &$title, &$user, $action, &$result ) { |
| 1822 | + global $wgMessageCache; |
| 1823 | + if ( $action !== 'delete' && $action !== 'move' ) { |
| 1824 | + return true; |
| 1825 | + } |
| 1826 | + $main = Title::newMainPage(); |
| 1827 | + $mainText = $main->getPrefixedDBkey(); |
| 1828 | + if ( $mainText === $title->getPrefixedDBkey() ) { |
| 1829 | + $result = array( 'cant-delete-main-page' ); |
| 1830 | + return false; |
| 1831 | + } |
| 1832 | + return true; |
| 1833 | +} |
| 1834 | + |
| 1835 | +if ( $wgDBname == 'enwiki' ) { |
| 1836 | + // Please don't interferew with our hundreds of wikis ability to manage themselves. |
| 1837 | + // Only use this shitty hack for enwiki. Thanks. |
| 1838 | + // -- brion 2008-04-10 |
| 1839 | + $wgHooks['getUserPermissionsErrorsExpensive'][] = 'wfNoDeleteMainPage'; |
| 1840 | +} |
| 1841 | + |
| 1842 | +// Quickie extension that addsa bogus field to edit form and whinges if it's filled out |
| 1843 | +// Might or might not do anything useful :D |
| 1844 | +// Enabling just to log to udp://10.0.5.8:8420/spam |
| 1845 | +include "$IP/extensions/SimpleAntiSpam/SimpleAntiSpam.php"; |
| 1846 | + |
| 1847 | +if ( $wmgUseCollection ) { |
| 1848 | + // PediaPress / PDF generation |
| 1849 | + include "$IP/extensions/Collection/Collection.php"; |
| 1850 | + # $wgPDFServer = 'http://bindery.wikimedia.org/cgi-bin/pdfserver.py'; |
| 1851 | + # $wgCollectionMWServeURL = 'http://bindery.wikimedia.org/cgi-bin/mwlib.cgi'; |
| 1852 | + # $wgCollectionMWServeURL = 'http://bindery.wikimedia.org:8080/mw-serve/'; |
| 1853 | + # $wgCollectionMWServeURL = 'http://erzurumi.wikimedia.org:8080/mw-serve/'; |
| 1854 | + $wgCollectionMWServeURL = "http://pdf1.wikimedia.org:8080/mw-serve/"; |
| 1855 | + |
| 1856 | + // MediaWiki namespace is not a good default |
| 1857 | + $wgCommunityCollectionNamespace = NS_PROJECT; |
| 1858 | + |
| 1859 | + // Allow collecting Help pages |
| 1860 | + $wgCollectionArticleNamespaces[] = NS_HELP; |
| 1861 | + |
| 1862 | + // Sidebar cache doesn't play nice with this |
| 1863 | + $wgEnableSidebarCache = false; |
| 1864 | + |
| 1865 | + $wgCollectionFormats = array( |
| 1866 | + 'rl' => 'PDF', |
| 1867 | + 'odf' => 'OpenDocument Text', |
| 1868 | + 'zim' => 'openZIM', |
| 1869 | + ); |
| 1870 | + |
| 1871 | + # GFDL is long gone, we use CC-BY-SA 3.0 nowaday. See bug 32513 |
| 1872 | + //$wgLicenseURL = "http://en.wikipedia.org/w/index.php?title=Wikipedia:Text_of_the_GNU_Free_Documentation_License&action=raw"; |
| 1873 | + $wgLicenseURL = "http://creativecommons.org/licenses/by-sa/3.0/"; |
| 1874 | + |
| 1875 | + $wgCollectionPortletForLoggedInUsersOnly = $wmgCollectionPortletForLoggedInUsersOnly; |
| 1876 | + $wgCollectionArticleNamespaces = $wmgCollectionArticleNamespaces; |
| 1877 | + |
| 1878 | + if ( $wmgCollectionHierarchyDelimiter ) { |
| 1879 | + $wgCollectionHierarchyDelimiter = $wmgCollectionHierarchyDelimiter; |
| 1880 | + } |
| 1881 | +} |
| 1882 | + |
| 1883 | +// Testing internally |
| 1884 | +include "$wmfConfigDir/secret-projects.php"; |
| 1885 | + |
| 1886 | +if ( $wgDBname == 'elwiki' ) { |
| 1887 | + # Account creation throttle disabled for editing workshop |
| 1888 | + # Contact: ariel@wikimedia.org (irc: apergos) |
| 1889 | + if ( time() > strtotime( '2011-06-16T13:00 +3:00' ) |
| 1890 | + && time() < strtotime( '2011-06-16T20:00 +3:00' ) ) |
| 1891 | + { |
| 1892 | + $wgAccountCreationThrottle = 50; |
| 1893 | + } |
| 1894 | +} |
| 1895 | + |
| 1896 | +# Account creation throttle raised for an event in Serbia, requested by dungodung |
| 1897 | +/*function efRaiseThrottleForSerbia() { |
| 1898 | + global $wgAccountCreationThrottle; |
| 1899 | + if ( time() < strtotime( '2011-11-12T20:00 +0:00' ) && |
| 1900 | + in_array( wfGetIP(), array( '147.91.1.41', '147.91.1.42', '147.91.1.43', '147.91.1.44', '147.91.1.45' ) ) ) |
| 1901 | + { |
| 1902 | + $wgAccountCreationThrottle = 300; |
| 1903 | + } |
| 1904 | +} |
| 1905 | +if ( $wgDBname == 'srwiki' ) |
| 1906 | + $wgExtensionFunctions[] = 'efRaiseThrottleForSerbia'; |
| 1907 | + */ |
| 1908 | + |
| 1909 | +if ( $wmgUseNewUserMessage ) { |
| 1910 | + include "$IP/extensions/NewUserMessage/NewUserMessage.php"; |
| 1911 | + $wgNewUserSuppressRC = $wmgNewUserSuppressRC; |
| 1912 | + $wgNewUserMinorEdit = $wmgNewUserMinorEdit; |
| 1913 | + $wgNewUserMessageOnAutoCreate = $wmgNewUserMessageOnAutoCreate; |
| 1914 | +} |
| 1915 | + |
| 1916 | +if ( $wmgUseCodeReview ) { |
| 1917 | + include "$IP/extensions/CodeReview/CodeReview.php"; |
| 1918 | + include( "$wmfConfigDir/codereview.php" ); |
| 1919 | + $wgSubversionProxy = 'http://codereview-proxy.wikimedia.org/index.php'; |
| 1920 | + |
| 1921 | + $wgGroupPermissions['user']['codereview-add-tag'] = false; |
| 1922 | + $wgGroupPermissions['user']['codereview-remove-tag'] = false; |
| 1923 | + $wgGroupPermissions['user']['codereview-post-comment'] = false; |
| 1924 | + $wgGroupPermissions['user']['codereview-set-status'] = false; |
| 1925 | + $wgGroupPermissions['user']['codereview-link-user'] = false; |
| 1926 | + $wgGroupPermissions['user']['codereview-signoff'] = false; |
| 1927 | + $wgGroupPermissions['user']['codereview-associate'] = false; |
| 1928 | + |
| 1929 | + $wgGroupPermissions['user']['codereview-post-comment'] = true; |
| 1930 | + $wgGroupPermissions['user']['codereview-signoff'] = true; |
| 1931 | + |
| 1932 | + $wgGroupPermissions['coder']['codereview-add-tag'] = true; |
| 1933 | + $wgGroupPermissions['coder']['codereview-remove-tag'] = true; |
| 1934 | + $wgGroupPermissions['coder']['codereview-set-status'] = true; |
| 1935 | + $wgGroupPermissions['coder']['codereview-link-user'] = true; |
| 1936 | + $wgGroupPermissions['coder']['codereview-signoff'] = true; |
| 1937 | + $wgGroupPermissions['coder']['codereview-associate'] = true; |
| 1938 | + |
| 1939 | + $wgGroupPermissions['svnadmins']['repoadmin'] = true; // Default is stewards, but this has nothing to do with them |
| 1940 | + |
| 1941 | + $wgCodeReviewENotif = true; // let's experiment with this |
| 1942 | + $wgCodeReviewSharedSecret = $wmgCodeReviewSharedSecret; |
| 1943 | + $wgCodeReviewCommentWatcherEmail = 'mediawiki-codereview@lists.wikimedia.org'; |
| 1944 | + $wgCodeReviewRepoStatsCacheTime = 60 * 60; // 1 hour, default is 6 |
| 1945 | + |
| 1946 | + $wgCodeReviewMaxDiffPaths = 30; |
| 1947 | +} |
| 1948 | + |
| 1949 | +if ( $wmgUseAbuseFilter ) { |
| 1950 | + include "$IP/extensions/AbuseFilter/AbuseFilter.php"; |
| 1951 | + include( "$wmfConfigDir/abusefilter.php" ); |
| 1952 | +} |
| 1953 | + |
| 1954 | +if ( $wmgUseCommunityVoice == true ) { |
| 1955 | + include ( "$IP/extensions/ClientSide/ClientSide.php" ); |
| 1956 | + include ( "$IP/extensions/CommunityVoice/CommunityVoice.php" ); |
| 1957 | +} |
| 1958 | + |
| 1959 | +if ( $wmgUsePdfHandler == true ) { |
| 1960 | + include ( "$IP/extensions/PdfHandler/PdfHandler.php" ); |
| 1961 | +} |
| 1962 | + |
| 1963 | +if ( $wmgUseUsabilityInitiative ) { |
| 1964 | + |
| 1965 | + $wgNavigableTOCCollapseEnable = true; |
| 1966 | + $wgNavigableTOCResizable = true; |
| 1967 | + require( "$IP/extensions/Vector/Vector.php" ); |
| 1968 | + |
| 1969 | + require( "$IP/extensions/WikiEditor/WikiEditor.php" ); |
| 1970 | + |
| 1971 | + // Uncomment this line for debugging only |
| 1972 | + // if ( $wgDBname == 'testwiki' ) { $wgUsabilityInitiativeResourceMode = 'raw'; } |
| 1973 | + // Disable experimental things |
| 1974 | + $wgWikiEditorFeatures['templateEditor'] = |
| 1975 | + $wgWikiEditorFeatures['preview'] = |
| 1976 | + $wgWikiEditorFeatures['previewDialog'] = |
| 1977 | + $wgWikiEditorFeatures['publish'] = |
| 1978 | + $wgWikiEditorFeatures['templates'] = |
| 1979 | + $wgVectorFeatures['collapsiblenav'] = |
| 1980 | + $wgWikiEditorFeatures['highlight'] = array( 'global' => false, 'user' => true ); // Hidden from prefs view |
| 1981 | + $wgVectorFeatures['simplesearch'] = array( 'global' => true, 'user' => false ); |
| 1982 | + $wgVectorFeatures['expandablesearch'] = array( 'global' => false, 'user' => false ); |
| 1983 | + $wgVectorUseSimpleSearch = true; |
| 1984 | + // Enable EditWarning by default |
| 1985 | + $wgDefaultUserOptions['useeditwarning'] = 1; |
| 1986 | + $wgHiddenPrefs[] = 'usenavigabletoc'; |
| 1987 | + $wgHiddenPrefs[] = 'wikieditor-templates'; |
| 1988 | + $wgHiddenPrefs[] = 'wikieditor-template-editor'; |
| 1989 | + $wgHiddenPrefs[] = 'wikieditor-preview'; |
| 1990 | + $wgHiddenPrefs[] = 'wikieditor-previewDialog'; |
| 1991 | + $wgHiddenPrefs[] = 'wikieditor-publish'; |
| 1992 | + $wgHiddenPrefs[] = 'wikieditor-highlight'; |
| 1993 | + if ( $wmgUseCollapsibleNav ) { |
| 1994 | + $wgDefaultUserOptions['vector-collapsiblenav'] = 1; |
| 1995 | + } else { |
| 1996 | + $wgHiddenPrefs[] = 'vector-collapsiblenav'; |
| 1997 | + } |
| 1998 | + |
| 1999 | + if ( $wmgUsabilityPrefSwitch ) { |
| 2000 | + require_once( "$IP/extensions/PrefStats/PrefStats.php" ); |
| 2001 | + |
| 2002 | + $wgPrefStatsTrackPrefs = array( |
| 2003 | + 'skin' => $wgDefaultSkin != 'vector' ? 'vector' : 'monobook', |
| 2004 | + 'usebetatoolbar' => $wmgUsabilityEnforce ? 0 : 1, |
| 2005 | + 'useeditwarning' => 0, |
| 2006 | + 'usenavigabletoc' => 1, |
| 2007 | + 'usebetatoolbar-cgd' => $wmgUsabilityEnforce ? 0 : 1, |
| 2008 | + ); |
| 2009 | + |
| 2010 | + require_once( "$IP/extensions/PrefSwitch/PrefSwitch.php" ); |
| 2011 | + $wgPrefSwitchGlobalOptOut = true; |
| 2012 | + $wgPrefSwitchShowLinks = false; |
| 2013 | + } |
| 2014 | + |
| 2015 | + if ( $wmgUsabilityEnforce ) { |
| 2016 | + $wgEditToolbarGlobalEnable = false; |
| 2017 | + $wgDefaultUserOptions['usebetatoolbar'] = 1; |
| 2018 | + $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; |
| 2019 | + } |
| 2020 | + |
| 2021 | + // For Babaco... these are still experimental, won't be on by default |
| 2022 | + $wgNavigableTOCUserEnable = true; |
| 2023 | + $wgEditToolbarCGDUserEnable = true; |
| 2024 | + |
| 2025 | + if ( $wmgUserDailyContribs ) { |
| 2026 | + require "$IP/extensions/UserDailyContribs/UserDailyContribs.php"; |
| 2027 | + } |
| 2028 | + |
| 2029 | + if ( $wmgClickTracking ) { |
| 2030 | + require "$IP/extensions/ClickTracking/ClickTracking.php"; |
| 2031 | + |
| 2032 | + $wgClickTrackThrottle = $wmgClickTrackThrottle; |
| 2033 | + $wgClickTrackingLog = 'udp://208.80.152.184:8421/' . $wgDBname; // 208.80.152.184 = emery |
| 2034 | + $wgClickTrackingDatabase = false; |
| 2035 | + # Disable Special:ClickTracking, not secure yet (as of r59230) |
| 2036 | + unset( $wgSpecialPages['ClickTracking'] ); |
| 2037 | + # Remove the clicktracking permission because people see it in ListGroupRights and wonder what it does |
| 2038 | + unset( $wgGroupPermissions['sysop']['clicktrack'] ); |
| 2039 | + } |
| 2040 | + |
| 2041 | + if ( $wmgVectorEditSectionLinks ) { |
| 2042 | + $wgVectorFeatures['sectioneditlinks'] = array( 'global' => false, 'user' => true ); |
| 2043 | + $wgVectorSectionEditLinksBucketTest = true; |
| 2044 | + $wgVectorSectionEditLinksLotteryOdds = 1; |
| 2045 | + $wgVectorSectionEditLinksExperiment = 2; |
| 2046 | + } |
| 2047 | +} |
| 2048 | + |
| 2049 | +if ( $wmgClickTracking && $wmgCustomUserSignup ) { |
| 2050 | + include "$IP/extensions/CustomUserSignup/CustomUserSignup.php"; |
| 2051 | +} |
| 2052 | + |
| 2053 | +if ( !$wmgEnableVector ) { |
| 2054 | + $wgSkipSkins[] = 'vector'; |
| 2055 | +} |
| 2056 | + |
| 2057 | +if ( $wmgUseReaderFeedback ) { |
| 2058 | + require_once( "$IP/extensions/ReaderFeedback/ReaderFeedback.php" ); |
| 2059 | + $wgFeedbackStylePath = "$wgExtensionAssetsPath/ReaderFeedback"; |
| 2060 | + $wgFeedbackNamespaces = $wmgFeedbackNamespaces; |
| 2061 | + if ( $wmgFeedbackTags ) { |
| 2062 | + $wgFeedbackTags = $wmgFeedbackTags; |
| 2063 | + } |
| 2064 | + $wgFeedbackSizeThreshhold = $wmgFeedbackSizeThreshhold; |
| 2065 | +} |
| 2066 | + |
| 2067 | +if ( $wmgUseLocalisationUpdate ) { |
| 2068 | + require_once( "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php" ); |
| 2069 | + $wgLocalisationUpdateDirectory = dirname( $IP ) . "/php-$wmfExtendedVersionNumber/cache/l10n"; |
| 2070 | +} |
| 2071 | + |
| 2072 | +if ( $wmgEnableLandingCheck ) { |
| 2073 | + require_once( "$IP/extensions/LandingCheck/LandingCheck.php" ); |
| 2074 | + |
| 2075 | + $wgPriorityCountries = array( 'FR', 'DE', 'GB', 'CH', 'SY', 'IR', 'CU' ); |
| 2076 | + // $wgLandingCheckPriorityURLBase = "//wikimediafoundation.org/wiki/Special:LandingCheck"; |
| 2077 | + // $wgLandingCheckNormalURLBase = "//donate.wikimedia.org/wiki/Special:LandingCheck"; |
| 2078 | +} |
| 2079 | + |
| 2080 | +if ( $wmgEnableFundraiserLandingPage ) { |
| 2081 | + require_once( "$IP/extensions/FundraiserLandingPage/FundraiserLandingPage.php" ); |
| 2082 | +} |
| 2083 | + |
| 2084 | +if ( $wmgUseLiquidThreads ) { |
| 2085 | + require_once( "$wmfConfigDir/liquidthreads.php" ); |
| 2086 | +} |
| 2087 | + |
| 2088 | +if ( $wmgUseFundraiserPortal ) { |
| 2089 | + require "$IP/extensions/FundraiserPortal/FundraiserPortal.php"; |
| 2090 | + $wgExtensionFunctions[] = 'setupFundraiserPortal'; |
| 2091 | + function setupFundraiserPortal() { |
| 2092 | + global $urlprotocol; |
| 2093 | + global $wgScriptPath; // SSL may change this after CommonSettings |
| 2094 | + global $wgFundraiserPortalDirectory, $wgFundraiserPortalPath, $wgFundraiserImageUrl; |
| 2095 | + $wgFundraiserPortalDirectory = "/mnt/upload6/portal"; |
| 2096 | + $wgFundraiserPortalPath = "$urlprotocol//upload.wikimedia.org/portal"; |
| 2097 | + $wgFundraiserImageUrl = "$wgScriptPath/extensions/FundraiserPortal/images"; |
| 2098 | + } |
| 2099 | +} |
| 2100 | + |
| 2101 | +if ( $wmgDonationInterface ) { |
| 2102 | + // Regular DonationInterface should not be enabled on the WMF cluster. |
| 2103 | + // So, only load i18n files for DonationInterface -awjrichards 1 November 2011 |
| 2104 | + require_once( "$IP/extensions/DonationInterface/donationinterface_langonly.php" ); |
| 2105 | +} |
| 2106 | + |
| 2107 | +if ( $wmgUseGlobalUsage ) { |
| 2108 | + require_once( "$IP/extensions/GlobalUsage/GlobalUsage.php" ); |
| 2109 | + $wgGlobalUsageDatabase = 'commonswiki'; |
| 2110 | +} |
| 2111 | + |
| 2112 | +if ( $wmgUseAPIRequestLog ) { |
| 2113 | + $wgAPIRequestLog = "udp://locke.wikimedia.org:9000/$wgDBname"; |
| 2114 | +} |
| 2115 | + |
| 2116 | +if ( $wmgUseLivePreview ) { |
| 2117 | + $wgDefaultUserOptions['uselivepreview'] = 1; |
| 2118 | +} |
| 2119 | + |
| 2120 | +if ( $wmgUseArticleFeedback ) { |
| 2121 | + require_once( "$IP/extensions/ArticleFeedback/ArticleFeedback.php" ); |
| 2122 | + $wgArticleFeedbackCategories = $wmgArticleFeedbackCategories; |
| 2123 | + $wgArticleFeedbackBlacklistCategories = $wmgArticleFeedbackBlacklistCategories; |
| 2124 | + $wgArticleFeedbackLotteryOdds = $wmgArticleFeedbackLotteryOdds; |
| 2125 | + $wgArticleFeedbackTrackingVersion = 1; |
| 2126 | + |
| 2127 | + $wgArticleFeedbackTracking = array( |
| 2128 | + 'buckets' => array( |
| 2129 | + 'track' => 0.27, |
| 2130 | + 'ignore' => 99.73, |
| 2131 | + // 'track'=>0, 'ignore' => 100 |
| 2132 | + ), |
| 2133 | + 'version' => 8, |
| 2134 | + 'expires' => 30, |
| 2135 | + 'tracked' => false |
| 2136 | + ); |
| 2137 | + $wgArticleFeedbackOptions = array( |
| 2138 | + 'buckets' => array( |
| 2139 | + 'show' => 100, |
| 2140 | + 'hide' => 0, |
| 2141 | + ), |
| 2142 | + 'version' => 8, |
| 2143 | + 'expires' => 30, |
| 2144 | + 'tracked' => false |
| 2145 | + ); |
| 2146 | + $wgArticleFeedbackDashboard = $wmgArticleFeedbackDashboard; |
| 2147 | + $wgArticleFeedbackNamespaces = $wmgArticleFeedbackNamespaces === false ? $wgContentNamespaces : $wmgArticleFeedbackNamespaces; |
| 2148 | + |
| 2149 | + if ( $wmgArticleFeedbackRatingTypes !== false ) { |
| 2150 | + $wgArticleFeedbackRatingTypes = $wmgArticleFeedbackRatingTypes; |
| 2151 | + } |
| 2152 | +} |
| 2153 | + |
| 2154 | +if ( $wmgUseArticleFeedbackv5 ) { |
| 2155 | + require_once( "$IP/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php" ); |
| 2156 | + $wgArticleFeedbackv5Categories = $wmgArticleFeedbackv5Categories; |
| 2157 | + $wgArticleFeedbackv5BlacklistCategories = $wmgArticleFeedbackv5BlacklistCategories; |
| 2158 | + |
| 2159 | + $wgArticleFeedbackv5DisplayBuckets['version'] = 1; |
| 2160 | +} |
| 2161 | + |
| 2162 | +# if ( $wgDBname == 'testwiki' ) { |
| 2163 | +# $wgDebugLogFile = '/tmp/debuglog_tmp.txt'; |
| 2164 | +# } |
| 2165 | + |
| 2166 | + |
| 2167 | +$wgDefaultUserOptions['thumbsize'] = $wmgThumbsizeIndex; |
| 2168 | +$wgDefaultUserOptions['showhiddencats'] = $wmgShowHiddenCats; |
| 2169 | + |
| 2170 | +if ( $wgDBname == 'strategywiki' ) { |
| 2171 | + require_once( "$IP/extensions/StrategyWiki/ActiveStrategy/ActiveStrategy.php" ); |
| 2172 | +} |
| 2173 | + |
| 2174 | +if ( $wgDBname == 'testwiki' || $wgDBname == 'foundationwiki' ) { |
| 2175 | + require_once( "$IP/extensions/CommunityHiring/CommunityHiring.php" ); |
| 2176 | + $wgCommunityHiringDatabase = 'officewiki'; |
| 2177 | +} elseif ( $wgDBname == 'officewiki' ) { |
| 2178 | + require_once( "$IP/extensions/CommunityApplications/CommunityApplications.php" ); |
| 2179 | +} |
| 2180 | + |
| 2181 | +# # Hack to block emails from some idiot user who likes 'The Joker' --Andrew 2009-05-28 |
| 2182 | +$wgHooks['EmailUser'][] = 'wmfBlockJokerEmails'; |
| 2183 | +$wgDebugLogGroups['block_joker_mail'] = 'udp://10.0.5.8:8420/jokermail'; |
| 2184 | + |
| 2185 | +function wmfBlockJokerEmails( &$to, &$from, &$subject, &$text ) { |
| 2186 | + $blockedAddresses = array( 'the4joker@gmail.com', 'testaccount@werdn.us', 'randomdude5555@gmail.com', 'siyang.li@yahoo.com', 'johnnywiki@gmail.com', 'wikifreedomfighter@googlemail.com' ); |
| 2187 | + if ( in_array( $from->address, $blockedAddresses ) ) { |
| 2188 | + wfDebugLog( 'block_joker_mail', "Blocked attempted email from " . $from->toString() . |
| 2189 | + " to " . $to->address . " with subject " . $subject . "\n" ); |
| 2190 | + return false; |
| 2191 | + } |
| 2192 | + return true; |
| 2193 | +} |
| 2194 | + |
| 2195 | +# $wgEnableUploads = false; |
| 2196 | +# $wgUploadMaintenance = true; // temp disable delete/restore of images |
| 2197 | +# $wgSiteNotice = "Image uploads, deletes and restores are temporarily disabled while we upgrade our servers. We expect to enable them again shortly."; |
| 2198 | +# if( $wgDBname == 'enwiki' ) { |
| 2199 | +# $wgExtensionFunctions[] = 'logWtf'; |
| 2200 | +# function logWtf() { |
| 2201 | +# wfDebugLog( 'wtf', $_SERVER['REQUEST_URI'] ); |
| 2202 | +# } |
| 2203 | +# } |
| 2204 | + |
| 2205 | +# $wgReadOnly = "Emergency database maintenance, will be back to full shortly."; |
| 2206 | +# $wgSiteNotice = "<div style='text-align: center; background: #f8f4f0; border: solid 1px #988; font-size: 90%; padding: 4px'>Software updates are being applied to Wikimedia sites; there may be some brief interruption as the servers update.</div>"; |
| 2207 | +# $wgSiteNotice = "<div style='text-align: center; background: #f8f4f0; border: solid 1px #988; font-size: 90%; padding: 4px'>Software updates are being applied to Wikimedia sites; we're shaking out a few remaining issues.</div>"; |
| 2208 | + |
| 2209 | +// Variable destinations for Donate link in sidebar. Currently only for test wiki |
| 2210 | +if ( $wgUseVariablePage ) { |
| 2211 | + include( "$IP/extensions/VariablePage/VariablePage.php" ); |
| 2212 | + $wgVariablePagePossibilities = array( |
| 2213 | + "$urlprotocol//wikimediafoundation.org/wiki/WMFJA1/en" => 100, |
| 2214 | + ); |
| 2215 | + |
| 2216 | + $wgVariablePageShowSidebarLink = true; |
| 2217 | + $wgVariablePageSidebarLinkQuery = array( |
| 2218 | + 'utm_source' => 'donate', |
| 2219 | + 'utm_medium' => 'sidebar', |
| 2220 | + 'utm_campaign' => 'spontaneous_donation' |
| 2221 | + ); |
| 2222 | +} |
| 2223 | + |
| 2224 | +// ContributionTracking for handling PayPal redirects |
| 2225 | +if ( $wgUseContributionTracking ) { |
| 2226 | + include( "$IP/extensions/ContributionTracking/ContributionTracking.php" ); |
| 2227 | + include( "$wmfConfigDir/contribution-tracking-setup.php" ); |
| 2228 | + $wgContributionTrackingPayPalIPN = "https://civicrm.wikimedia.org/fundcore_gateway/paypal"; |
| 2229 | + $wgContributionTrackingPayPalRecurringIPN = "https://civicrm.wikimedia.org/IPNListener_Recurring.php"; |
| 2230 | +} |
| 2231 | + |
| 2232 | +if ( $wmgUseUploadWizard ) { |
| 2233 | + require_once( "$IP/extensions/UploadWizard/UploadWizard.php" ); |
| 2234 | + # Do not change $wgUploadStashScalerBaseUrl to a protocol-relative URL. This is how UploadStash fetches previews from our scaler, behind |
| 2235 | + # the scenes, that it then streams to the client securely (much like img_auth.php). -- neilk, 2011-09-12 |
| 2236 | + $wgUploadStashScalerBaseUrl = "$urlprotocol//upload.wikimedia.org/$site/$lang/thumb/temp"; |
| 2237 | + $wgUploadWizardConfig = array( |
| 2238 | + # 'debug' => true, |
| 2239 | + 'disableResourceLoader' => false, |
| 2240 | + 'autoCategory' => 'Uploaded with UploadWizard', |
| 2241 | + // If Special:UploadWizard again experiences unexplained slowness loading JavaScript (spinner on intial load spinning forever) |
| 2242 | + // set fallbackToAltUploadForm to true. |
| 2243 | + 'altUploadForm' => 'Special:Upload', # Set by demon, 2011-05-10 per neilk |
| 2244 | + |
| 2245 | + ); |
| 2246 | + if ( $wgDBname == 'testwiki' ) { |
| 2247 | + $wgUploadWizardConfig['feedbackPage'] = 'Prototype_upload_wizard_feedback'; |
| 2248 | + $wgUploadWizardConfig['altUploadForm'] = 'Special:Upload'; |
| 2249 | + $wgUploadWizardConfig["missingCategoriesWikiText"] = '<p><span class="errorbox"><b>Hey, no categories?</b></span></p>'; |
| 2250 | + unset( $wgUploadWizardConfig['fallbackToAltUploadForm'] ); |
| 2251 | + } else if ( $wgDBname == 'commonswiki' ) { |
| 2252 | + $wgUploadWizardConfig['feedbackPage'] = 'Commons:Upload_Wizard_feedback'; # Set by neilk, 2011-11-01, per erik |
| 2253 | + $wgUploadWizardConfig['altUploadForm'] = 'Commons:Upload'; |
| 2254 | + $wgUploadWizardConfig["missingCategoriesWikiText"] = "{{subst:unc}}"; |
| 2255 | + $wgUploadWizardConfig['blacklistIssuesPage'] = 'Commons:Upload_Wizard_blacklist_issues'; # Set by neilk, 2011-11-01, per erik |
| 2256 | + } |
| 2257 | +} |
| 2258 | + |
| 2259 | +if ( $wmgUseVisualEditor ) { |
| 2260 | + require_once( "$IP/extensions/VisualEditor/VisualEditor.php" ); |
| 2261 | +} |
| 2262 | + |
| 2263 | + |
| 2264 | + |
| 2265 | +if ( $wmgUseNarayam ) { |
| 2266 | + require_once( "$IP/extensions/Narayam/Narayam.php" ); |
| 2267 | + $wgNarayamEnabledByDefault = $wmgNarayamEnabledByDefault; |
| 2268 | + $wgNarayamUseBetaMapping = $wmgNarayamUseBetaMapping; |
| 2269 | +} |
| 2270 | + |
| 2271 | +if ( $wmgUseWebFonts ) { |
| 2272 | + require_once( "$IP/extensions/WebFonts/WebFonts.php" ); |
| 2273 | +} |
| 2274 | + |
| 2275 | +if ( $wmgUseGoogleNewsSitemap ) { |
| 2276 | + include( "$IP/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php" ); |
| 2277 | + $wgGNSMfallbackCategory = $wmgGNSMfallbackCategory; |
| 2278 | + $wgGNSMcommentNamespace = $wmgGNSMcommentNamespace; |
| 2279 | +} |
| 2280 | + |
| 2281 | +if ( $wmgUseCLDR ) { |
| 2282 | + require_once( "$IP/extensions/cldr/cldr.php" ); |
| 2283 | +} |
| 2284 | + |
| 2285 | +# Disable action=parse due to bug 25238 -- TS |
| 2286 | +# ImageAnnotator disabled, reenabling parse on Commons --catrope |
| 2287 | +# if ( $wgDBname == 'commonswiki' ) { |
| 2288 | +# $wgAPIModules['parse'] = 'ApiDisabled'; |
| 2289 | +# } |
| 2290 | + |
| 2291 | +$wgObjectCaches['mysql-multiwrite'] = array( |
| 2292 | + 'class' => 'MultiWriteBagOStuff', |
| 2293 | + 'caches' => array( |
| 2294 | + 0 => array( |
| 2295 | + 'factory' => 'ObjectCache::newMemcached', |
| 2296 | + ), |
| 2297 | + 1 => array( |
| 2298 | + 'class' => 'SqlBagOStuff', |
| 2299 | + 'server' => array( |
| 2300 | + 'host' => '10.0.6.50', # db40 |
| 2301 | + 'dbname' => 'parsercache', |
| 2302 | + 'user' => $wgDBuser, |
| 2303 | + 'password' => $wgDBpassword, |
| 2304 | + 'type' => 'mysql', |
| 2305 | + 'flags' => 0, |
| 2306 | + ), |
| 2307 | + 'purgePeriod' => 0, |
| 2308 | + 'tableName' => 'pc', |
| 2309 | + 'shards' => 256, |
| 2310 | + ), |
| 2311 | + ) |
| 2312 | +); |
| 2313 | + |
| 2314 | +# Style version appendix |
| 2315 | +# Shouldn't be needed much in 1.17 due to ResourceLoader, but some legacy things still need it |
| 2316 | +$wgStyleVersion .= '-4'; |
| 2317 | + |
| 2318 | +// DO NOT DISABLE WITHOUT CONTACTING PHILIPPE / LEGAL! |
| 2319 | +// Installed by Andrew, 2011-04-26 |
| 2320 | +if ( $wmgUseDisableAccount ) { |
| 2321 | + require_once( "$IP/extensions/DisableAccount/DisableAccount.php" ); |
| 2322 | + $wgGroupPermissions['bureaucrat']['disableaccount'] = true; |
| 2323 | +} |
| 2324 | + |
| 2325 | +if ( $wmgUseIncubator ) { |
| 2326 | + require_once( "$IP/extensions/WikimediaIncubator/WikimediaIncubator.php" ); |
| 2327 | + $wmincClosedWikis = "$IP/../closed.dblist"; |
| 2328 | +} |
| 2329 | + |
| 2330 | +if ( $wmgUseWikiLove ) { |
| 2331 | + require_once( "$IP/extensions/WikiLove/WikiLove.php" ); |
| 2332 | + $wgWikiLoveLogging = true; |
| 2333 | + if ( $wmgWikiLoveDefault ) { |
| 2334 | + $wgDefaultUserOptions['wikilove-enabled'] = 1; |
| 2335 | + } |
| 2336 | +} |
| 2337 | + |
| 2338 | +if ( $wmgUseEditPageTracking ) { |
| 2339 | + require_once( "$IP/extensions/EditPageTracking/EditPageTracking.php" ); |
| 2340 | + $wgEditPageTrackingRegistrationCutoff = '20110725221004'; |
| 2341 | +} |
| 2342 | + |
| 2343 | +if ( $wmgUseMarkAsHelpful ) { |
| 2344 | + require_once( "$IP/extensions/MarkAsHelpful/MarkAsHelpful.php" ); |
| 2345 | + $wgMarkAsHelpfulType = array( 'mbresponse' ); |
| 2346 | +} |
| 2347 | + |
| 2348 | +if ( $wmgUseMoodBar ) { |
| 2349 | + require_once( "$IP/extensions/MoodBar/MoodBar.php" ); |
| 2350 | + $wgMoodBarCutoffTime = '20110725221004'; |
| 2351 | + $wgMoodBarConfig['privacyUrl'] = "$urlprotocol//wikimediafoundation.org/wiki/Feedback_policy"; |
| 2352 | + |
| 2353 | + if ( $wgDBname == 'enwiki' ) { |
| 2354 | + $wgMoodBarConfig['infoUrl'] = "$urlprotocol//en.wikipedia.org/wiki/Wikipedia:New_editor_feedback"; |
| 2355 | + } elseif ( $wgDBname == 'nlwiki' ) { |
| 2356 | + $wgMoodBarConfig['infoUrl'] = "$urlprotocol//nl.wikipedia.org/wiki/Help:Feedback"; |
| 2357 | + } |
| 2358 | +} |
| 2359 | +$wgAvailableRights[] = 'moodbar-admin'; // To allow global groups to include this right -AG |
| 2360 | + |
| 2361 | +if ( $wmgMobileFrontend ) { |
| 2362 | + require_once( "$IP/extensions/MobileFrontend/MobileFrontend.php" ); |
| 2363 | + if ( $wmgMobileFrontendLogo ) { |
| 2364 | + $wgMobileFrontendLogo = $wmgMobileFrontendLogo; |
| 2365 | + } |
| 2366 | + if ( $wmgMFRemovableClasses ) { |
| 2367 | + $wgMFRemovableClasses = $wmgMFRemovableClasses; |
| 2368 | + } |
| 2369 | +} |
| 2370 | + |
| 2371 | +if ( $wmgZeroRatedMobileAccess ) { |
| 2372 | + require_once( "$IP/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.php" ); |
| 2373 | +} |
| 2374 | + |
| 2375 | +if ( $wmgUseSubPageList3 ) { |
| 2376 | + include( "$IP/extensions/SubPageList3/SubPageList3.php" ); |
| 2377 | +} |
| 2378 | + |
| 2379 | +if ( $wmgHTTPSExperiment ) { |
| 2380 | + $wgFooterIcons["poweredby"]["mediawiki"]["url"] = "//www.mediawiki.org/"; |
| 2381 | + if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) { |
| 2382 | + $wgCookieSecure = true; |
| 2383 | + $_SERVER['HTTPS'] = 'on'; // Fake this so MW goes into HTTPS mode |
| 2384 | + } |
| 2385 | + $wgVaryOnXFPForAPI = $wgVaryOnXFP = true; |
| 2386 | +} |
| 2387 | +if ( $wmgUseMath && version_compare( $wmfVersionNumber, '1.18' ) >= 0 ) { |
| 2388 | + require_once( "$IP/extensions/Math/Math.php" ); // Math move out from core in MW 1.18 |
| 2389 | + $wgTexvc = "/usr/local/apache/uncommon/$wmfVersionNumber/bin/texvc"; // override default |
| 2390 | + if ( $wgDBname === 'hewiki' ) { |
| 2391 | + $wgDefaultUserOptions['math'] = 0; |
| 2392 | + } |
| 2393 | +} |
| 2394 | + |
| 2395 | +if ( $wmgUseBabel ) { |
| 2396 | + require_once( "$IP/extensions/Babel/Babel.php" ); |
| 2397 | + $wgBabelCategoryNames = $wmgBabelCategoryNames; |
| 2398 | + $wgBabelMainCategory = $wmgBabelMainCategory; |
| 2399 | + $wgBabelDefaultLevel = $wmgBabelDefaultLevel; |
| 2400 | + $wgBabelUseUserLanguage = $wmgBabelUseUserLanguage; |
| 2401 | +} |
| 2402 | + |
| 2403 | +# Italian Wikipedia anti-lockdown |
| 2404 | +if ( $wgDBname === 'itwiki' ) { |
| 2405 | + require( "$wmfConfigDir/killscripts.php" ); |
| 2406 | +} |
| 2407 | + |
| 2408 | +if ( $wmgUseTranslate ) { |
| 2409 | + require_once( "$IP/extensions/Translate/Translate.php" ); |
| 2410 | + |
| 2411 | + $wgGroupPermissions['*']['translate'] = true; |
| 2412 | + $wgGroupPermissions['translationadmin']['pagetranslation'] = true; |
| 2413 | + $wgGroupPermissions['user']['translate-messagereview'] = true; |
| 2414 | + $wgGroupPermissions['user']['translate-groupreview'] = true; |
| 2415 | + |
| 2416 | + $wgTranslateDocumentationLanguageCode = 'qqq'; |
| 2417 | + $wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages |
| 2418 | + |
| 2419 | + $wgTranslateTranslationServices = array(); |
| 2420 | + |
| 2421 | + $wgTranslateTasks = array( |
| 2422 | + 'view' => 'ViewMessagesTask', |
| 2423 | + 'untranslated' => 'ViewUntranslatedTask', |
| 2424 | + 'acceptqueue' => 'AcceptQueueMessagesTask', |
| 2425 | + 'reviewall' => 'ReviewAllMessagesTask', |
| 2426 | + 'export-as-po' => 'ExportasPoMessagesTask', |
| 2427 | + ); |
| 2428 | + |
| 2429 | + $wgTranslateWorkflowStates = $wmgTranslateWorkflowStates; |
| 2430 | + |
| 2431 | + $wgEnablePageTranslation = true; |
| 2432 | + |
| 2433 | + $wgTranslateBlacklist = array( |
| 2434 | + '*' => array( 'en' => 'English is the source language.', ), |
| 2435 | + ); |
| 2436 | + |
| 2437 | + $wgTranslateEC = array(); |
| 2438 | + |
| 2439 | + unset( $wgSpecialPages['FirstSteps'] ); |
| 2440 | + unset( $wgSpecialPages['ManageMessageGroups'] ); |
| 2441 | + unset( $wgSpecialPages['ImportTranslations'] ); |
| 2442 | + unset( $wgSpecialPages['TranslationStats'] ); |
| 2443 | + |
| 2444 | + $wgAddGroups['bureaucrat'][] = 'translationadmin'; |
| 2445 | +} |
| 2446 | + |
| 2447 | +if ( $wmgUseContest ) { |
| 2448 | + require_once( "$IP/extensions/Contest/Contest.php" ); |
| 2449 | + |
| 2450 | + $egContestSettings['mailSender'] = 'codingchallenge@wikimedia.org'; |
| 2451 | + $egContestSettings['mailSenderName'] = 'Wikimedia Coding Challenge Team'; |
| 2452 | + $egContestSettings['contestDeletionEnabled'] = false; |
| 2453 | + |
| 2454 | + $wgGroupPermissions['sysop' ]['contestjudge'] = false; |
| 2455 | + $wgGroupPermissions['sysop' ]['contestadmin'] = false; |
| 2456 | + |
| 2457 | + $wgGroupPermissions['*' ]['contestparticipant'] = true; |
| 2458 | +} |
| 2459 | + |
| 2460 | +if ( $wmgUseVipsTest ) { |
| 2461 | + include( "$IP/extensions/VipsScaler/VipsScaler.php" ); |
| 2462 | + include( "$IP/extensions/VipsScaler/VipsTest.php" ); |
| 2463 | + $wgVipsThumbnailerHost = '10.2.1.21'; |
| 2464 | +} |
| 2465 | + |
| 2466 | +if ( $wmgUseApiSandbox ) { |
| 2467 | + require_once( "$IP/extensions/ApiSandbox/ApiSandbox.php" ); |
| 2468 | +} |
| 2469 | + |
| 2470 | +if ( $wmgUseShortUrl ) { |
| 2471 | + require_once( "$IP/extensions/ShortUrl/ShortUrl.php" ); |
| 2472 | + $wgShortUrlPrefix = $wmgShortUrlPrefix; |
| 2473 | +} |
| 2474 | + |
| 2475 | +# Debugging hack for bug 31576. Enabling this triggers logging to /home/wikipedia/logs/{bug31576,bug31576bt,bug31576jq}.log |
| 2476 | +$wgEnableBug31576Debugging = false; |
| 2477 | + |
| 2478 | +# THIS MUST BE AFTER ALL EXTENSIONS ARE INCLUDED |
| 2479 | +# |
| 2480 | +# REALLY ... we're not kidding here ... NO EXTENSIONS AFTER |
| 2481 | + |
| 2482 | +require( "$wmfConfigDir/ExtensionMessages-$wmfExtendedVersionNumber.php" ); |
| 2483 | + |
| 2484 | +wfProfileOut( "$fname-misc5" ); |
| 2485 | +wfProfileOut( $fname ); |