Index: trunk/tools/mwmultiversion/wmf-config/CommonSettings.php |
— | — | @@ -11,20 +11,15 @@ |
12 | 12 | # at least sometimes, but what we're running will send a 200. |
13 | 13 | header( "Cache-control: no-cache" ); |
14 | 14 | |
15 | | - |
16 | 15 | # Try to control stuff: |
17 | 16 | #define( 'DEBUG_LOG', true ); |
18 | 17 | |
19 | | - |
20 | 18 | # useful tokens to search for: |
21 | 19 | |
22 | 20 | # :SEARCH: - search settings |
23 | 21 | # :SLAVES: - database slaves |
24 | 22 | # :PROFILING: |
25 | 23 | |
26 | | -# header("HTTP/1.0 500 Internal server error" ); |
27 | | -# die("Wikipedia and its sister projects are experiencing technical problems. Please try again later. We apologise for the inconvenience, and thank you for your patience while developers are working to resolve the issue as soon as possible."); # temp to reduce load --brion |
28 | | - |
29 | 24 | # ----------------- |
30 | 25 | |
31 | 26 | if( php_sapi_name() == 'cli' ) { |
— | — | @@ -46,6 +41,7 @@ |
47 | 42 | |
48 | 43 | #---------------------------------------------------------------------- |
49 | 44 | # Initialisation |
| 45 | + |
50 | 46 | /* |
51 | 47 | if ( defined( 'TESTWIKI' ) ) { |
52 | 48 | $IP = "/home/wikipedia/common/php-1.17"; |
— | — | @@ -53,8 +49,7 @@ |
54 | 50 | $IP = "/usr/local/apache/common/php-1.17"; |
55 | 51 | } |
56 | 52 | */ |
57 | | -//ini_set( "include_path", "$IP:$IP/includes:$IP/languages:$IP/templates:$IP/lib:$IP/extensions/wikihiero:/usr/local/lib/php:/usr/share/php" ); |
58 | | -// Modernized BV -- 2009-7-14 |
| 53 | + |
59 | 54 | set_include_path( "$IP:$IP/lib:/usr/local/lib/php:/usr/share/php" ); |
60 | 55 | |
61 | 56 | if( getenv( 'WIKIBACKUP' ) ) { |
— | — | @@ -64,15 +59,6 @@ |
65 | 60 | } |
66 | 61 | } |
67 | 62 | |
68 | | -/* |
69 | | -$cluster = @file_get_contents( '/etc/cluster' ); |
70 | | -if ( !$cluster ) { |
71 | | - # Let's be nice until we're sure things are set up properly |
72 | | - # die( "Invalid or missing /etc/cluster file on host {$_ENV['HOSTNAME']}\n" ); |
73 | | - $cluster = 'pmtpa'; |
74 | | -} |
75 | | -$cluster = trim( $cluster ); |
76 | | - */ |
77 | 63 | $cluster = 'pmtpa'; |
78 | 64 | |
79 | 65 | # Load site configuration |
— | — | @@ -85,10 +71,6 @@ |
86 | 72 | if ( $hatesSafari ) { |
87 | 73 | $wgDisableOutputCompression = true; |
88 | 74 | } |
89 | | -/* |
90 | | -if ( !$wgCommandLineMode && !defined( 'MW_NO_OUTPUT_BUFFER' ) && !$hatesSafari ) { |
91 | | - ob_start("ob_gzhandler"); |
92 | | -}*/ |
93 | 75 | |
94 | 76 | ini_set( 'memory_limit', 120 * 1024 * 1024 ); |
95 | 77 | |
— | — | @@ -111,38 +93,31 @@ |
112 | 94 | $wgDBname = $multiVersion->getDatabase(); |
113 | 95 | $wgVersionDirectory = $multiVersion->getVersion(); |
114 | 96 | |
115 | | -# Disabled, no IPv6 support, waste of a regex -- TS 20051207 |
116 | | -/* |
117 | | -$ipv6 = false; |
118 | | -if (preg_match('/^[a-z]\.ipv6\./', $server)) { |
119 | | - $ipv6 = true; |
120 | | -}*/ |
121 | | - |
122 | | -# Shutting eswiki down |
123 | | -#if ( $wgDBname == 'eswiki' && php_sapi_name() != 'cli' ) { die(); } |
124 | | - |
125 | 97 | wfProfileOut( "$fname-host" ); |
126 | 98 | |
| 99 | +# wmf-config directory |
| 100 | +$wmfConfigDir = "$IP/../wmf-config"; |
| 101 | + |
127 | 102 | # Initialise wgConf |
128 | 103 | wfProfileIn( "$fname-wgConf" ); |
129 | | -require( "$IP/../wmf-config/wgConf.php" ); |
| 104 | +require( "$wmfConfigDir/wgConf.php" ); |
130 | 105 | |
131 | 106 | function wmfLoadInitialiseSettings( $conf ) { |
132 | 107 | global $IP; |
133 | 108 | $wgConf =& $conf; # b/c alias |
134 | | - require( "$IP/../wmf-config/InitialiseSettings.php" ); |
| 109 | + require( "$wmfConfigDir/InitialiseSettings.php" ); |
135 | 110 | } |
136 | 111 | |
137 | 112 | wfProfileOut( "$fname-wgConf" ); |
138 | 113 | wfProfileIn( "$fname-confcache" ); |
139 | 114 | |
140 | 115 | # Is this database listed in $cluster.dblist? |
141 | | -if ( array_search( $wgDBname, $wgLocalDatabases ) === false ){ |
| 116 | +if ( array_search( $wgDBname, $wgLocalDatabases ) === false ){ |
142 | 117 | # No? Load missing.php |
143 | 118 | if ( $wgCommandLineMode) { |
144 | 119 | print "Database name $wgDBname is not listed in $cluster.dblist\n"; |
145 | 120 | } else { |
146 | | - require( "$IP/../wmf-config/missing.php" ); |
| 121 | + require( "$wmfConfigDir/missing.php" ); |
147 | 122 | } |
148 | 123 | exit; |
149 | 124 | } |
— | — | @@ -151,7 +126,7 @@ |
152 | 127 | |
153 | 128 | $filename = "/tmp/mw-cache-$wgVersionDirectory/conf-$wgDBname"; |
154 | 129 | $globals = false; |
155 | | -if ( @filemtime( $filename ) >= filemtime( "$IP/../wmf-config/InitialiseSettings.php" ) ) { |
| 130 | +if ( @filemtime( $filename ) >= filemtime( "$wmfConfigDir/InitialiseSettings.php" ) ) { |
156 | 131 | $cacheRecord = @file_get_contents( $filename ); |
157 | 132 | if ( $cacheRecord !== false ) { |
158 | 133 | $globals = unserialize( $cacheRecord ); |
— | — | @@ -161,7 +136,7 @@ |
162 | 137 | if ( !$globals ) { |
163 | 138 | wfProfileIn( "$fname-recache-settings" ); |
164 | 139 | # Get configuration from SiteConfiguration object |
165 | | - require( "$IP/../wmf-config/InitialiseSettings.php" ); |
| 140 | + require( "$wmfConfigDir/InitialiseSettings.php" ); |
166 | 141 | |
167 | 142 | $wikiTags = array(); |
168 | 143 | foreach ( array( 'private', 'fishbowl', 'special', 'closed', 'flaggedrevs', 'readonly', 'switchover-jun30' ) as $tag ) { |
— | — | @@ -176,7 +151,8 @@ |
177 | 152 | 'lang' => $lang, |
178 | 153 | 'docRoot' => $_SERVER['DOCUMENT_ROOT'], |
179 | 154 | 'site' => $site, |
180 | | - 'stdlogo' => "http://upload.wikimedia.org/$site/$lang/b/bc/Wiki.png" |
| 155 | + 'stdlogo' => "http://upload.wikimedia.org/$site/$lang/b/bc/Wiki.png" , |
| 156 | + 'prstdlogo' => "//upload.wikimedia.org/$site/$lang/b/bc/Wiki.png", |
181 | 157 | ), $wikiTags ); |
182 | 158 | |
183 | 159 | # Save cache |
— | — | @@ -195,18 +171,23 @@ |
196 | 172 | |
197 | 173 | extract( $globals ); |
198 | 174 | |
199 | | - |
200 | 175 | #------------------------------------------------------------------------- |
201 | 176 | # Settings common to all wikis |
202 | 177 | |
203 | 178 | # Private settings such as passwords, that shouldn't be published |
204 | 179 | # Needs to be before db.php |
205 | | -require( "$IP/../wmf-config/PrivateSettings.php" ); |
| 180 | +require( "$wmfConfigDir/PrivateSettings.php" ); |
206 | 181 | |
207 | 182 | # Cluster-dependent files for database and memcached |
208 | | -require( "$IP/../wmf-config/db.php" ); |
209 | | -require("$IP/../wmf-config/mc.php"); |
| 183 | +require( "$wmfConfigDir/db.php" ); |
| 184 | +require( "$wmfConfigDir/mc.php" ); |
210 | 185 | |
| 186 | +# Protocol settings for urls |
| 187 | +if ( !$secure && $wmgHTTPSExperiment ) { |
| 188 | + $urlprotocol = ""; |
| 189 | +} else { |
| 190 | + $urlprotocol = "http:"; |
| 191 | +} |
211 | 192 | |
212 | 193 | setlocale( LC_ALL, 'en_US.UTF-8' ); |
213 | 194 | |
— | — | @@ -215,12 +196,12 @@ |
216 | 197 | #$wgStyleSheetPath = '/w/skins-1.17'; |
217 | 198 | if ( $wgDBname == 'testwiki' ) { |
218 | 199 | // Make testing skin/JS changes easier |
219 | | - $wgExtensionAssetsPath = 'http://test.wikipedia.org/w/extensions-' . $wgVersionDirectory; |
220 | | - $wgStyleSheetPath = 'http://test.wikipedia.org/w/skins-' . $wgVersionDirectory; |
| 200 | + $wgExtensionAssetsPath = "$urlprotocol//test.wikipedia.org/w/extensions-1.17"; |
| 201 | + $wgStyleSheetPath = "$urlprotocol//test.wikipedia.org/w/skins-1.17"; |
221 | 202 | |
222 | 203 | } else { |
223 | | - $wgExtensionAssetsPath = 'http://bits.wikimedia.org/w/extensions-' . $wgVersionDirectory; |
224 | | - $wgStyleSheetPath = 'http://bits.wikimedia.org/skins-' . $wgVersionDirectory; |
| 204 | + $wgExtensionAssetsPath = "$urlprotocol//bits.wikimedia.org/w/extensions-1.17"; |
| 205 | + $wgStyleSheetPath = "$urlprotocol//bits.wikimedia.org/skins-1.17"; |
225 | 206 | } |
226 | 207 | $wgStylePath = $wgStyleSheetPath; |
227 | 208 | $wgArticlePath = "/wiki/$1"; |
— | — | @@ -232,9 +213,17 @@ |
233 | 214 | $wgRedirectScript = $wgScriptPath.'/redirect.php'; |
234 | 215 | if ( $wgDBname != 'testwiki' ) { |
235 | 216 | // Make testing JS/skin changes easy by not running load.php through bits for testwiki |
236 | | - $wgLoadScript = "http://bits.wikimedia.org/{$_SERVER['SERVER_NAME']}/load.php"; |
| 217 | + $wgLoadScript = "$urlprotocol//bits.wikimedia.org/{$_SERVER['SERVER_NAME']}/load.php"; |
237 | 218 | } |
238 | 219 | |
| 220 | +$oldLabsWikis = array( 'en_labswikimedia', 'de_labswikimedia', 'flaggedrevs_labswikimedia' ); |
| 221 | +if ( !in_array( $wgDBname, $oldLabsWikis ) ) { |
| 222 | + $wgCacheDirectory = '/tmp/mw-cache-1.17'; |
| 223 | +} else { |
| 224 | + # @TODO: remove this hack (use multiversioning proper) |
| 225 | + $wgCacheDirectory = '/tmp/mw-cache-labs'; |
| 226 | +} |
| 227 | + |
239 | 228 | # Very wrong place for NFS access - brought the site down -- domas - 2009-01-27 |
240 | 229 | |
241 | 230 | #if ( ! is_dir( $wgUploadDirectory ) && !$wgCommandLineMode ) { |
— | — | @@ -243,12 +232,12 @@ |
244 | 233 | |
245 | 234 | $wgFileStore['deleted']['directory'] = "/mnt/upload6/private/archive/$site/$lang"; |
246 | 235 | |
247 | | -if ( $cluster == 'yaseo' ) { |
248 | | - $wgSharedThumbnailScriptPath = 'http://commons.wikimedia.org/w/thumb.php'; |
| 236 | +/*if ( $cluster == 'yaseo' ) { |
| 237 | + $wgSharedThumbnailScriptPath = "$urlprotocol//commons.wikimedia.org/w/thumb.php"; |
249 | 238 | $wgUploadPath = '/upload'; |
250 | 239 | $wgUploadDirectory = "/mnt/upload/$site/$lang"; |
251 | 240 | $wgFileStore['deleted']['directory'] = "/mnt/upload/private/archive/$site/$lang"; |
252 | | -} |
| 241 | +}*/ |
253 | 242 | |
254 | 243 | # used for mysql/search settings |
255 | 244 | $tmarray = getdate(time()); |
— | — | @@ -281,7 +270,6 @@ |
282 | 271 | putenv("TZ=$oldtz"); |
283 | 272 | } |
284 | 273 | |
285 | | - |
286 | 274 | $wgShowIPinHeader = false; |
287 | 275 | $wgUseGzip = true; |
288 | 276 | $wgRCMaxAge = 30*86400; |
— | — | @@ -366,10 +354,6 @@ |
367 | 355 | $wgFileBlacklist[] = 'mht'; |
368 | 356 | # $wgFileBlacklist[] = 'pdf'; |
369 | 357 | $wgFileExtensions[] = 'xcf'; |
370 | | -# Disabling this for now -- brion - 2007-08-21 |
371 | | -#if( $wgDBname != 'commonswiki' ) { |
372 | | -# $wgFileExtensions[] = 'xls'; |
373 | | -#} |
374 | 358 | $wgFileExtensions[] = 'pdf'; |
375 | 359 | $wgFileExtensions[] = 'mid'; |
376 | 360 | #$wgFileExtensions[] = 'sxw'; # OOo writer # -- disabling these as obsolete -- brion 2008-02-05 |
— | — | @@ -392,9 +376,7 @@ |
393 | 377 | if( $wgDBname == 'foundationwiki' ) { # per cary on 2010-05-11 |
394 | 378 | $wgFileExtensions[] = 'otf'; |
395 | 379 | $wgFileExtensions[] = 'ai'; |
396 | | -} |
397 | | - |
398 | | -if ( $wgDBname == 'outreachwiki' ) { # Per Frank, bug 25106 |
| 380 | +} else if ( $wgDBname == 'outreachwiki' ) { # Per Frank, bug 25106 |
399 | 381 | $wgFileExtensions[] = 'sla'; |
400 | 382 | } |
401 | 383 | |
— | — | @@ -654,28 +636,16 @@ |
655 | 637 | $wgLogQueries = true; |
656 | 638 | $wgSqlLogFile = $wgUploadDirectory.'/sqllog'; |
657 | 639 | |
658 | | - |
659 | 640 | $wgBlockOpenProxies = false; |
660 | 641 | |
661 | 642 | $wgDebugLogGroups['UploadBlacklist'] = 'udp://10.0.5.8:8420/upload-blacklist'; |
662 | 643 | |
663 | 644 | $wgDebugLogGroups['404'] = 'udp://10.0.5.8:8420/four-oh-four'; |
664 | 645 | |
665 | | - |
666 | 646 | # Don't allow users to redirect other users' talk pages |
667 | 647 | # Disabled because interwiki redirects are turned off, so it's not needed |
668 | 648 | #include( "$IP/Filter-ext_redir.php" ); |
669 | 649 | |
670 | | -#include("outage.php"); |
671 | | -#declareOutage( "2004-05-12", "02:00", "03:00" ); |
672 | | -/* |
673 | | -$d = getdate(); |
674 | | -$hour = $d['hours']; |
675 | | -if ( $lang == "en" && $hour >= 13 && $hour < 18 ) { |
676 | | - $wgUseWatchlistCache = true; |
677 | | - $wgWLCacheTimeout = 3600; |
678 | | -} |
679 | | -*/ |
680 | 650 | ## For attaching licensing metadata to pages, and displaying an |
681 | 651 | ## appropriate copyright notice / icon. GNU Free Documentation |
682 | 652 | ## License and Creative Commons licenses are supported so far. |
— | — | @@ -683,18 +653,18 @@ |
684 | 654 | |
685 | 655 | if( $site == 'wikinews' ) { |
686 | 656 | #$wgRightsPage = "";# Set to the title of a wiki page that describes your license/copyright |
687 | | - $wgRightsUrl = 'http://creativecommons.org/licenses/by/2.5/'; |
| 657 | + $wgRightsUrl = "$urlprotocol//creativecommons.org/licenses/by/2.5/"; |
688 | 658 | $wgRightsText = 'Creative Commons Attribution 2.5'; |
689 | | - $wgRightsIcon = 'http://creativecommons.org/images/public/somerights20.png'; |
| 659 | + $wgRightsIcon = "$urlprotocol//creativecommons.org/images/public/somerights20.png"; |
690 | 660 | } elseif ( $wgDBname == 'huwikinews') { |
691 | | - $wgRightsUrl = 'http://creativecommons.org/licenses/by/3.0/'; |
| 661 | + $wgRightsUrl = "$urlprotocol//creativecommons.org/licenses/by/3.0/"; |
692 | 662 | $wgRightsText = 'Creative Commons Attribution 3.0 Unported'; |
693 | | - $wgRightsIcon = 'http://creativecommons.org/images/public/somerights20.png'; |
| 663 | + $wgRightsIcon = "$urlprotocol//creativecommons.org/images/public/somerights20.png"; |
694 | 664 | } else { |
695 | 665 | # Set 2009-06-22 -- BV |
696 | | - $wgRightsUrl = 'http://creativecommons.org/licenses/by-sa/3.0/'; |
| 666 | + $wgRightsUrl = "$urlprotocol//creativecommons.org/licenses/by-sa/3.0/"; |
697 | 667 | $wgRightsText = 'Creative Commons Attribution-Share Alike 3.0 Unported'; |
698 | | - $wgRightsIcon = 'http://creativecommons.org/images/public/somerights20.png'; |
| 668 | + $wgRightsIcon = "$urlprotocol//creativecommons.org/images/public/somerights20.png"; |
699 | 669 | } |
700 | 670 | |
701 | 671 | # FIXME: Turned off tidy for testing. --brion 2004-01-19 |
— | — | @@ -707,7 +677,7 @@ |
708 | 678 | $wgUseTidy = true; |
709 | 679 | |
710 | 680 | # Profiling, typically at 100 rate |
711 | | -#Caution: moderate profiling rates can write 1.5GB per day each to the slow query and binary logs. |
| 681 | +# Caution: moderate profiling rates can write 1.5GB per day each to the slow query and binary logs. |
712 | 682 | # If the master is low on disk space, you'll need to empty the slow query log |
713 | 683 | # PLEASE TELL JAMES OR WHOEVER IS LOOKING AFTER THE DATABASE SERVERS IF YOU TURN ON PROFILING |
714 | 684 | # :PROFILING: |
— | — | @@ -748,16 +718,12 @@ |
749 | 719 | $wgProfileSampleRate = 1; |
750 | 720 | } |
751 | 721 | |
752 | | - |
753 | 722 | wfProfileOut( "$fname-misc1" ); |
754 | 723 | wfProfileIn( "$fname-ext-include1" ); |
755 | 724 | |
756 | 725 | include($IP.'/extensions/timeline/Timeline.php'); |
757 | 726 | include($IP.'/extensions/wikihiero/wikihiero.php'); |
758 | 727 | |
759 | | -// if ( $wgDBname == 'testwiki' ) { |
760 | | - // $wgTimelineSettings->fontFile = 'unifont-5.1.20080907.ttf'; |
761 | | -// } |
762 | 728 | if ( $wgDBname == 'testwiki' || $wgDBname == 'mlwiki' ) { |
763 | 729 | // FreeSansWMF has been generated from FreeSans and FreeSerif by using this script with fontforge: |
764 | 730 | // Open("FreeSans.ttf"); |
— | — | @@ -767,7 +733,6 @@ |
768 | 734 | $wgTimelineSettings->fontFile = 'FreeSansWMF.ttf'; |
769 | 735 | } |
770 | 736 | |
771 | | - |
772 | 737 | include( $IP.'/extensions/SiteMatrix/SiteMatrix.php' ); |
773 | 738 | // Config for sitematrix |
774 | 739 | $wgSiteMatrixFile = '/apache/common/langlist'; |
— | — | @@ -777,6 +742,8 @@ |
778 | 743 | |
779 | 744 | include( $IP.'/extensions/CharInsert/CharInsert.php' ); |
780 | 745 | include( $IP.'/extensions/CheckUser/CheckUser.php' ); |
| 746 | +$wgCheckUserForceSummary = $wmgCheckUserForceSummary; |
| 747 | + |
781 | 748 | include( $IP.'/extensions/ParserFunctions/ParserFunctions.php' ); |
782 | 749 | $wgMaxIfExistCount = 500; // obs |
783 | 750 | $wgExpensiveParserFunctionLimit = 500; |
— | — | @@ -798,7 +765,7 @@ |
799 | 766 | |
800 | 767 | // Experimental side-by-side comparison extension for wikisource. enabled brion 2006-01-13 |
801 | 768 | if( $wmgUseDoubleWiki ) { |
802 | | - include( $IP.'/extensions/DoubleWiki/DoubleWiki.php' ); |
| 769 | + include( $IP.'/extensions/DoubleWiki/DoubleWiki.php' ); |
803 | 770 | } |
804 | 771 | |
805 | 772 | # Poem |
— | — | @@ -810,7 +777,7 @@ |
811 | 778 | |
812 | 779 | // Per-wiki config for Flagged Revisions |
813 | 780 | if ( $wmgUseFlaggedRevs ) { |
814 | | - include( $IP.'/../wmf-config/flaggedrevs.php'); |
| 781 | + include( "$wmfConfigDir/flaggedrevs.php" ); |
815 | 782 | } |
816 | 783 | |
817 | 784 | $wgUseAjax = true; |
— | — | @@ -819,9 +786,8 @@ |
820 | 787 | |
821 | 788 | |
822 | 789 | if ( $wmgUseProofreadPage ) { |
823 | | -//if ( $wgDBname == 'frwikisource' || $wgDBname == 'enwikisource' || $wgDBname == 'ptwikisource' ) { |
824 | 790 | include( $IP . '/extensions/ProofreadPage/ProofreadPage.php' ); |
825 | | - include( $IP . '/../wmf-config/proofreadpage.php'); |
| 791 | + include( "$wmfConfigDir/proofreadpage.php" ); |
826 | 792 | } |
827 | 793 | if( $wmgUseLST ) { |
828 | 794 | include( $IP . '/extensions/LabeledSectionTransclusion/lst.php' ); |
— | — | @@ -838,11 +804,10 @@ |
839 | 805 | $wgTitleBlacklistSources = array( |
840 | 806 | array( |
841 | 807 | 'type' => TBLSRC_URL, |
842 | | - 'src' => 'http://meta.wikimedia.org/w/index.php?title=Title_blacklist&action=raw&tb_ver=1', |
| 808 | + 'src' => "$urlprotocol//meta.wikimedia.org/w/index.php?title=Title_blacklist&action=raw&tb_ver=1", |
843 | 809 | ), |
844 | 810 | ); |
845 | 811 | |
846 | | -#if ( $site == 'wikiversity' || $wgDBname == 'ptwikibooks' || $wgDBname == 'itwikibooks' || $wgDBname == 'enwikinews' ) { |
847 | 812 | if( $wmgUseQuiz ) { |
848 | 813 | include( "$IP/extensions/Quiz/Quiz.php" ); |
849 | 814 | } |
— | — | @@ -851,17 +816,17 @@ |
852 | 817 | include( "$IP/extensions/Gadgets/Gadgets.php" ); |
853 | 818 | } |
854 | 819 | |
855 | | -// if( $wgAutomaticGroups ) { |
856 | | -// include( "$IP/extensions/AutomaticGroups/AutomaticGroups.php" ); |
857 | | -//} |
858 | | - |
859 | 820 | include( $IP.'/extensions/OggHandler/OggHandler.php' ); |
860 | 821 | $wgOggThumbLocation = '/usr/local/bin/oggThumb'; |
861 | 822 | // you can keep the filename the same and use maintenance/purgeList.php |
862 | | -$wgCortadoJarFile = 'http://upload.wikimedia.org/jars/cortado.jar'; |
| 823 | +$wgCortadoJarFile = "$urlprotocol//upload.wikimedia.org/jars/cortado.jar"; |
863 | 824 | |
864 | 825 | include( $IP.'/extensions/AssertEdit/AssertEdit.php' ); |
865 | 826 | |
| 827 | +if ( $wgDBname == 'collabwiki' ) { |
| 828 | + $wgUseTidy = false; |
| 829 | +} |
| 830 | + |
866 | 831 | if ( $wgDBname == 'foundationwiki' ) { |
867 | 832 | include( "$IP/extensions/FormPreloadPostCache/FormPreloadPostCache.php" ); |
868 | 833 | include( "$IP/extensions/SkinPerPage/SkinPerPage.php" ); |
— | — | @@ -870,7 +835,7 @@ |
871 | 836 | include( "$IP/extensions/skins/Donate/Donate.php" ); |
872 | 837 | |
873 | 838 | include( "$IP/extensions/ContributionReporting/ContributionReporting.php" ); |
874 | | - include( "$IP/../wmf-config/reporting-setup.php"); |
| 839 | + include( "$wmfConfigDir/reporting-setup.php" ); |
875 | 840 | |
876 | 841 | include( "$IP/extensions/ContactPageFundraiser/ContactPage.php" ); |
877 | 842 | $wgContactUser = 'Storiescontact'; |
— | — | @@ -942,14 +907,12 @@ |
943 | 908 | $wgAllowedPaymentMethod = array( |
944 | 909 | 'cc','pp' |
945 | 910 | ); |
946 | | - |
947 | | - |
948 | 911 | } |
949 | 912 | |
950 | 913 | if ( $wgDBname == 'mediawikiwiki' ) { |
951 | 914 | include( "$IP/extensions/ExtensionDistributor/ExtensionDistributor.php" ); |
952 | 915 | $wgExtDistTarDir = '/mnt/upload6/ext-dist'; |
953 | | - $wgExtDistTarUrl = 'http://upload.wikimedia.org/ext-dist'; |
| 916 | + $wgExtDistTarUrl = "$urlprotocol//upload.wikimedia.org/ext-dist"; |
954 | 917 | $wgExtDistWorkingCopy = '/mnt/upload6/private/ExtensionDistributor/mw-snapshot'; |
955 | 918 | $wgExtDistRemoteClient = '208.80.152.165:8430'; |
956 | 919 | |
— | — | @@ -1027,6 +990,7 @@ |
1028 | 991 | // NOTE: Must be BEFORE ArticleFeedback |
1029 | 992 | if ( $wgUseEmailCapture ) { |
1030 | 993 | include( "$IP/extensions/EmailCapture/EmailCapture.php" ); |
| 994 | + $wgEmailCaptureAutoResponse['from'] = 'improve@wikimedia.org'; |
1031 | 995 | } |
1032 | 996 | |
1033 | 997 | // Mobile redirect |
— | — | @@ -1038,24 +1002,12 @@ |
1039 | 1003 | |
1040 | 1004 | // PoolCounter |
1041 | 1005 | if ( $wmgUsePoolCounter ) { |
1042 | | - include( "$IP/../wmf-config/PoolCounterSettings.php" ); |
| 1006 | + include( "$wmfConfigDir/PoolCounterSettings.php" ); |
1043 | 1007 | } |
1044 | 1008 | |
1045 | 1009 | wfProfileOut( "$fname-ext-include1" ); |
1046 | 1010 | wfProfileIn( "$fname-misc2" ); |
1047 | 1011 | |
1048 | | -/* |
1049 | | -# Per site additional spam blacklists |
1050 | | -# -- hashar Sat Jan 6 21:27:21 UTC 2007 |
1051 | | -switch( $wgDBname ) { |
1052 | | - 'frwiki': |
1053 | | -# $wgSpamBlacklistFiles[] = 'http://fr.wikipedia.org/w/index.php?title=<INSERT_TITLE>&action=raw&sb_ver=1'; |
1054 | | - break; |
1055 | | - default: |
1056 | | - |
1057 | | -} |
1058 | | -*/ |
1059 | | - |
1060 | 1012 | # Upload spam system |
1061 | 1013 | // SHA-1 hashes of blocked files: |
1062 | 1014 | # FIXME should check file size too |
— | — | @@ -1122,6 +1074,7 @@ |
1123 | 1075 | 'name' => 'local', |
1124 | 1076 | 'directory' => $wgUploadDirectory, |
1125 | 1077 | 'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath, |
| 1078 | + 'scriptDirUrl' => $wgScriptPath, |
1126 | 1079 | 'hashLevels' => 2, |
1127 | 1080 | 'thumbScriptUrl' => $wgThumbnailScriptPath, |
1128 | 1081 | 'transformVia404' => true, |
— | — | @@ -1136,13 +1089,13 @@ |
1137 | 1090 | 'class' => 'ForeignDBViaLBRepo', |
1138 | 1091 | 'name' => 'shared', |
1139 | 1092 | 'directory' => '/mnt/upload6/wikipedia/commons', |
1140 | | - 'url' => 'http://upload.wikimedia.org/wikipedia/commons', |
| 1093 | + 'url' => "$urlprotocol//upload.wikimedia.org/wikipedia/commons", |
1141 | 1094 | 'hashLevels' => 2, |
1142 | 1095 | 'thumbScriptUrl' => false, |
1143 | 1096 | 'transformVia404' => true, |
1144 | 1097 | 'hasSharedCache' => true, |
1145 | | - 'descBaseUrl' => 'http://commons.wikimedia.org/wiki/File:', |
1146 | | - 'scriptDirUrl' => 'http://commons.wikimedia.org/w', |
| 1098 | + 'descBaseUrl' => "$urlprotocol//commons.wikimedia.org/wiki/File:", |
| 1099 | + 'scriptDirUrl' => "$urlprotocol//commons.wikimedia.org/w", |
1147 | 1100 | 'fetchDescription' => true, |
1148 | 1101 | 'wiki' => 'commonswiki', |
1149 | 1102 | 'initialCapital' => true, |
— | — | @@ -1152,23 +1105,24 @@ |
1153 | 1106 | |
1154 | 1107 | if($wgDBname == 'nostalgiawiki') { |
1155 | 1108 | # Link back to current version from the archive funhouse |
| 1109 | + # wgSiteNotice should use $urlprotocol when wikipedia domain has https enabled |
1156 | 1110 | if( ( isset( $_REQUEST['title'] ) && ( $title = $_REQUEST['title'] ) ) |
1157 | 1111 | || (isset( $_SERVER['PATH_INFO'] ) && ( $title = substr( $_SERVER['PATH_INFO'], 1 ) ) ) ) { |
1158 | 1112 | if( preg_match( '/^(.*)\\/Talk$/', $title, $matches ) ) { |
1159 | 1113 | $title = 'Talk:' . $matches[1]; |
1160 | 1114 | } |
1161 | | - $wgSiteNotice = '[http://en.wikipedia.org/wiki/' . |
| 1115 | + $wgSiteNotice = "[$urlprotocol//en.wikipedia.org/wiki/" . |
1162 | 1116 | htmlspecialchars( urlencode( $title ) ) . |
1163 | 1117 | ' See the current version of this page on Wikipedia]'; |
1164 | 1118 | } else { |
1165 | | - $wgSiteNotice = '[http://en.wikipedia.org/ See current Wikipedia]'; |
| 1119 | + $wgSiteNotice = "[$urlprotocol//en.wikipedia.org/ See current Wikipedia]"; |
1166 | 1120 | } |
1167 | 1121 | $wgDefaultUserOptions['highlightbroken'] = 0; |
1168 | 1122 | } |
1169 | 1123 | |
1170 | 1124 | $wgUseHashTable = true; |
1171 | 1125 | |
1172 | | -$wgCopyrightIcon = '<a href="http://wikimediafoundation.org/"><img src="http://bits.wikimedia.org/images/wikimedia-button.png" width="88" height="31" alt="Wikimedia Foundation"/></a>'; |
| 1126 | +$wgCopyrightIcon = '<a href="' . $urlprotocol . '//wikimediafoundation.org/"><img src="' . $urlprotocol . '//bits.wikimedia.org/images/wikimedia-button.png" width="88" height="31" alt="Wikimedia Foundation"/></a>'; |
1173 | 1127 | |
1174 | 1128 | # For Special:Cite, we only want it on wikipedia (but can't count on $site), |
1175 | 1129 | # not on these fakers. |
— | — | @@ -1199,7 +1153,7 @@ |
1200 | 1154 | |
1201 | 1155 | if( $wgUseLuceneSearch ) { |
1202 | 1156 | wfProfileIn( "$fname-lucene" ); |
1203 | | - include( $IP.'/../wmf-config/lucene.php' ); |
| 1157 | + include( "$wmfConfigDir/lucene.php" ); |
1204 | 1158 | wfProfileOut( "$fname-lucene" ); |
1205 | 1159 | } |
1206 | 1160 | |
— | — | @@ -1235,6 +1189,7 @@ |
1236 | 1190 | // Newer entries |
1237 | 1191 | if( $wgDBname == 'zhwiki' ) $wgCacheEpoch = '20060528093500'; # parser bug? |
1238 | 1192 | if( $wgDBname == 'lawikibooks' ) $wgCacheEpoch = '20060610090000'; # sidebar bug |
| 1193 | +if ( $wmgHTTPSExperiment ) $wgCacheEpoch = '20110714183000'; |
1239 | 1194 | |
1240 | 1195 | #$wgThumbnailEpoch = '20060227114700'; # various rsvg and imagemagick fixes |
1241 | 1196 | $wgThumbnailEpoch = '20051227114700'; # various rsvg and imagemagick fixes |
— | — | @@ -1264,6 +1219,12 @@ |
1265 | 1220 | } |
1266 | 1221 | $wgExtensionFunctions[] = 'wfLogXFF'; |
1267 | 1222 | |
| 1223 | +// bug 24313, turn off minordefault on enwiki |
| 1224 | +if( $wgDBname == 'enwiki' ) { |
| 1225 | + $wgHiddenPrefs[] = 'minordefault'; |
| 1226 | +} |
| 1227 | + |
| 1228 | + |
1268 | 1229 | wfProfileOut( "$fname-misc3" ); |
1269 | 1230 | wfProfileIn( "$fname-ext-include2" ); |
1270 | 1231 | |
— | — | @@ -1279,7 +1240,6 @@ |
1280 | 1241 | include( $IP.'/extensions/intersection/DynamicPageList.php' ); |
1281 | 1242 | } |
1282 | 1243 | |
1283 | | -# 2005-10-12 -ævar |
1284 | 1244 | # 2010-01-22 hashar: disabled as per 16878 |
1285 | 1245 | //include( $IP.'/extensions/CrossNamespaceLinks/SpecialCrossNamespaceLinks.php' ); |
1286 | 1246 | |
— | — | @@ -1312,22 +1272,15 @@ |
1313 | 1273 | if ( $wmgUseRSSExtension ) { |
1314 | 1274 | include( "$IP/extensions/RSS/RSS.php" ); |
1315 | 1275 | #$wgRSSProxy = 'url-downloader.wikimedia.org:8080'; |
| 1276 | + $wgRSSAllowedFeeds = $wmgRSSAllowedFeeds; |
1316 | 1277 | } |
1317 | 1278 | |
1318 | 1279 | wfProfileOut( "$fname-ext-include2" ); |
1319 | 1280 | wfProfileIn( "$fname-misc4" ); |
1320 | 1281 | |
1321 | | -# 2005-09-30: Disabled for potential XSS issue -ævar |
1322 | | -#include 'extensions/PageCSS/PageCSS.php'; |
1323 | 1282 | |
1324 | 1283 | $wgDisabledActions = array( 'credits' ); |
1325 | | -# $wgDisableHardRedirects = true; // moved to InitializeSettings.php |
1326 | 1284 | |
1327 | | -# category rss feed extension, sponsored by kennisnet |
1328 | | -#include("extensions/catfeed/catfeed.php"); |
1329 | | -# why is there, AGAIN, no explanation of safety or limitation to known places? |
1330 | | - |
1331 | | - |
1332 | 1285 | # Process group overrides |
1333 | 1286 | |
1334 | 1287 | # makesysop permission removed, https://bugzilla.wikimedia.org/show_bug.cgi?id=23081 |
— | — | @@ -1375,13 +1328,6 @@ |
1376 | 1329 | #$wgReadOnly = '5 min DB server maintenance...'; |
1377 | 1330 | #$wgReadOnly = 'Read-only during network issues'; |
1378 | 1331 | |
1379 | | -# fcache stuff -kate |
1380 | | -#$fcuse = array("metawiki"); |
1381 | | -#if (in_array($wgDBname, $fcuse) && file_exists('/mnt/fcache/fcache_is_mounted')) { |
1382 | | -# $wgUseFileCache = true; |
1383 | | -# /** Directory where the cached page will be saved */ |
1384 | | -# $wgFileCacheDirectory = "/mnt/fcache/$wgDBname/"; |
1385 | | -#} |
1386 | 1332 | |
1387 | 1333 | if ( $cluster != 'pmtpa' ) { |
1388 | 1334 | $wgHTTPTimeout = 10; |
— | — | @@ -1398,23 +1344,14 @@ |
1399 | 1345 | } |
1400 | 1346 | } |
1401 | 1347 | */ |
1402 | | -/* |
1403 | | -if ( $wgDBname == 'enwiki' ) { |
1404 | | - require( "$IP/extensions/CookieBlock/CookieBlock.php" ); |
1405 | 1348 | |
1406 | | - $wgCookieBlocks = array( |
1407 | | - # Test -- block Tim on aawiki for a day |
1408 | | - #'d0e2a4080155d22cc2340e64b9930689' => array( 37, 86400 ), |
1409 | | - ); |
1410 | | -}*/ |
1411 | | - |
1412 | 1349 | // disabling so we don't worry about xmlrpc |
1413 | 1350 | // 2006-10-21 |
1414 | 1351 | #include( $IP.'/extensions/MWBlocker/MWBlockerHook.php' ); |
1415 | 1352 | #$mwBlockerHost = 'larousse'; |
1416 | 1353 | #$mwBlockerPort = 8126; |
1417 | 1354 | ##$wgProxyList = array_flip( array_map( 'trim', file( 'udp://10.0.5.8:8420/mwblocker' ) ) ); |
1418 | | -$wgProxyList = "$IP/../wmf-config/mwblocker.log"; |
| 1355 | +$wgProxyList = "$wmfConfigDir/mwblocker.log"; |
1419 | 1356 | |
1420 | 1357 | if( getenv( 'WIKIDEBUG' ) ) { |
1421 | 1358 | $wgDebugLogFile = '/tmp/wiki.log'; |
— | — | @@ -1442,14 +1379,14 @@ |
1443 | 1380 | $wgBrowserBlackList[] = '/^Lynx/'; |
1444 | 1381 | |
1445 | 1382 | // Vandal checks |
1446 | | -require( $IP.'/../wmf-config/checkers.php' ); |
| 1383 | +require( "$wmfConfigDir/checkers.php" ); |
1447 | 1384 | |
1448 | 1385 | // Experimental ScanSet extension |
1449 | 1386 | if ( $wgDBname == 'enwikisource' ) { |
1450 | 1387 | require( $IP.'/extensions/ScanSet/ScanSet.php' ); |
1451 | 1388 | $wgScanSetSettings = array( |
1452 | 1389 | 'baseDirectory' => '/mnt/upload6/wikipedia/commons/scans', |
1453 | | - 'basePath' => 'http://upload.wikimedia.org/wikipedia/commons/scans', |
| 1390 | + 'basePath' => "$urlprotocol//upload.wikimedia.org/wikipedia/commons/scans", |
1454 | 1391 | ); |
1455 | 1392 | } |
1456 | 1393 | |
— | — | @@ -1483,7 +1420,7 @@ |
1484 | 1421 | |
1485 | 1422 | // Customize URL handling for secure.wikimedia.org HTTPS logins |
1486 | 1423 | if( $secure ) { |
1487 | | - require( "$IP/../wmf-config/secure.php" ); |
| 1424 | + require( "$wmfConfigDir/secure.php" ); |
1488 | 1425 | } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) { |
1489 | 1426 | // New HTTPS service on regular URLs |
1490 | 1427 | $wgServer = preg_replace( '/^http:/', 'https:', $wgServer ); |
— | — | @@ -1550,19 +1487,20 @@ |
1551 | 1488 | } |
1552 | 1489 | } |
1553 | 1490 | |
1554 | | - |
1555 | | - |
1556 | 1491 | require( "$IP/extensions/Oversight/HideRevision.php" ); |
1557 | | -$wgGroupPermissions['oversight']['hiderevision'] = true; |
1558 | | -$wgGroupPermissions['oversight']['oversight'] = true; |
| 1492 | +$wgGroupPermissions['oversight']['hiderevision'] = false; |
| 1493 | +//$wgGroupPermissions['oversight']['oversight'] = true; |
1559 | 1494 | |
1560 | 1495 | if ( extension_loaded( 'wikidiff2' ) ) { |
1561 | 1496 | $wgExternalDiffEngine = 'wikidiff2'; |
1562 | 1497 | } |
1563 | 1498 | |
1564 | 1499 | if( function_exists( 'dba_open' ) && file_exists( "$IP/cache/interwiki.cdb" ) ) { |
1565 | | - $wgInterwikiCache = "$IP/cache/interwiki.cdb"; |
| 1500 | + $wgInterwikiCache = "$IP/cache/interwiki.cdb"; |
1566 | 1501 | } |
| 1502 | +if( $wmgHTTPSExperiment && function_exists( 'dba_open' ) && file_exists( "$IP/cache/interwiki-pr.cdb" ) ) { |
| 1503 | + $wgInterwikiCache = "$IP/cache/interwiki-pr.cdb"; |
| 1504 | +} |
1567 | 1505 | |
1568 | 1506 | $wgDebugLogGroups["ExternalStoreDB"] = "udp://10.0.5.8:8420/external"; |
1569 | 1507 | |
— | — | @@ -1632,6 +1570,7 @@ |
1633 | 1571 | '.wikiversity.org' => 'enwikiversity', |
1634 | 1572 | '.mediawiki.org' => 'mediawikiwiki', |
1635 | 1573 | 'species.wikimedia.org' => 'specieswiki', |
| 1574 | + 'incubator.wikimedia.org' => 'incubatorwiki', |
1636 | 1575 | ); |
1637 | 1576 | # Don't autologin to self |
1638 | 1577 | if ( isset( $wgCentralAuthAutoLoginWikis[$wmgSecondLevelDomain] ) ) { |
— | — | @@ -1676,31 +1615,12 @@ |
1677 | 1616 | } |
1678 | 1617 | } |
1679 | 1618 | |
1680 | | -# Dismissable site notice demo |
1681 | | -//if ( $wgDBname == 'testwiki' ) { |
1682 | | -// require( "$IP/sitenotice.php" ); |
1683 | | -//} |
1684 | | - |
1685 | 1619 | // taking it live 2006-12-15 brion |
1686 | 1620 | if( $wmgUseDismissableSiteNotice ) { |
1687 | 1621 | require( "$IP/extensions/DismissableSiteNotice/DismissableSiteNotice.php" ); |
1688 | 1622 | } |
1689 | 1623 | $wgMajorSiteNoticeID = '2'; |
1690 | 1624 | |
1691 | | -#$wgSiteNotice = "<span class=\"ltr\">All community members are invited to give [[m:Board elections/2007/Candidates|Board Election Candidates]] their [[m:Board elections/2007/Endorsements|endorsements]].</span>"; |
1692 | | - |
1693 | | - |
1694 | | -//require( "$IP/extensions/UsernameBlacklist/UsernameBlacklist.php" ); //Removed per bug 15888 |
1695 | | - |
1696 | | -/* |
1697 | | -function wfInitDonationLinkMessage() { |
1698 | | - global $wgMessageCache; |
1699 | | - $wgMessageCache->addMessage( 'sitenotice_link', '[http://wikimediafoundation.org/wiki/Wikimedia_thanks_Virgin_Unite Virgin Unite]' ); |
1700 | | -} |
1701 | | -$wgExtensionFunctions[] = 'wfInitDonationLinkMessage'; |
1702 | | - |
1703 | | -*/ |
1704 | | - |
1705 | 1625 | $wgHooks['LoginAuthenticateAudit'][] = 'logBadPassword'; |
1706 | 1626 | $wgDebugLogGroups['badpass'] = 'udp://10.0.5.8:8420/badpass'; |
1707 | 1627 | $wgDebugLogGroups['ts_badpass'] = 'udp://10.0.5.8:8420/ts_badpass'; |
— | — | @@ -1796,16 +1716,22 @@ |
1797 | 1717 | if( $secure ) { |
1798 | 1718 | # Don't load the JS from an insecure source! |
1799 | 1719 | $wgCentralPagePath = 'https://secure.wikimedia.org/wikipedia/meta/w/index.php'; |
1800 | | - } else { |
1801 | | - $wgCentralPagePath = 'http://meta.wikimedia.org/w/index.php'; |
| 1720 | + } elseif ( $wgDBname == 'testwiki' ) { |
| 1721 | + $wgCentralPagePath = "$urlprotocol//test.wikipedia.org/w/index.php"; |
| 1722 | + } else { |
| 1723 | + $wgCentralPagePath = "$urlprotocol//meta.wikimedia.org/w/index.php"; |
1802 | 1724 | } |
1803 | 1725 | |
1804 | 1726 | $wgNoticeProject = $wmgNoticeProject; |
1805 | | - $wgCentralDBname = 'metawiki'; |
| 1727 | + |
| 1728 | + if ( $wgDBname == 'testwiki' ) { |
| 1729 | + $wgCentralDBname = 'testwiki'; |
| 1730 | + } else { |
| 1731 | + $wgCentralDBname = 'metawiki'; |
| 1732 | + } |
1806 | 1733 | |
1807 | | - $wgCentralNoticeLoader = $wmgCentralNoticeLoader; |
| 1734 | + $wgCentralNoticeLoader = $wmgCentralNoticeLoader; |
1808 | 1735 | |
1809 | | - |
1810 | 1736 | /* |
1811 | 1737 | $wgNoticeTestMode = true; |
1812 | 1738 | $wgNoticeEnabledSites = array( |
— | — | @@ -1830,26 +1756,24 @@ |
1831 | 1757 | # Wed evening -- all on! |
1832 | 1758 | $wgNoticeTimeout = 3600; |
1833 | 1759 | $wgNoticeServerTimeout = 3600; // to let the counter update |
1834 | | - $wgNoticeCounterSource = 'http://wikimediafoundation.org/wiki/Special:ContributionTotal' . |
| 1760 | + $wgNoticeCounterSource = $urlprotocol . '//wikimediafoundation.org/wiki/Special:ContributionTotal' . |
1835 | 1761 | '?action=raw' . |
1836 | 1762 | '&start=20101112000000' . // FY 10-11 |
1837 | 1763 | '&fudgefactor=660000'; // fudge for pledged donations not in CRM |
1838 | 1764 | |
1839 | | - if( $wgDBname == 'metawiki' ) { |
| 1765 | + if( $wgDBname == 'metawiki' || $wgDBname == 'testwiki' ) { |
1840 | 1766 | $wgNoticeInfrastructure = true; |
1841 | 1767 | } else { |
1842 | 1768 | $wgNoticeInfrastructure = false; |
1843 | 1769 | } |
1844 | 1770 | } |
1845 | 1771 | |
1846 | | - |
1847 | 1772 | // Load our site-specific l10n extensions |
1848 | 1773 | include "$IP/extensions/WikimediaMessages/WikimediaMessages.php"; |
1849 | 1774 | |
1850 | 1775 | if ( $wmgUseWikimediaLicenseTexts ) { |
1851 | 1776 | include "$IP/extensions/WikimediaMessages/WikimediaLicenseTexts.php"; |
1852 | 1777 | } |
1853 | | - |
1854 | 1778 | |
1855 | 1779 | function wfNoDeleteMainPage( &$title, &$user, $action, &$result ) { |
1856 | 1780 | global $wgMessageCache, $wgDBname; |
— | — | @@ -1885,7 +1809,7 @@ |
1886 | 1810 | #$wgCollectionMWServeURL = 'http://bindery.wikimedia.org/cgi-bin/mwlib.cgi'; |
1887 | 1811 | #$wgCollectionMWServeURL = 'http://bindery.wikimedia.org:8080/mw-serve/'; |
1888 | 1812 | #$wgCollectionMWServeURL = 'http://erzurumi.wikimedia.org:8080/mw-serve/'; |
1889 | | - $wgCollectionMWServeURL = 'http://pdf1.wikimedia.org:8080/mw-serve/'; |
| 1813 | + $wgCollectionMWServeURL = "http://pdf1.wikimedia.org:8080/mw-serve/"; |
1890 | 1814 | |
1891 | 1815 | // MediaWiki namespace is not a good default |
1892 | 1816 | $wgCommunityCollectionNamespace = NS_PROJECT; |
— | — | @@ -1901,47 +1825,23 @@ |
1902 | 1826 | 'odf' => 'OpenDocument Text', |
1903 | 1827 | 'zim' => 'openZIM', |
1904 | 1828 | ); |
| 1829 | + |
| 1830 | + $wgLicenseURL = "$urlprotocol//en.wikipedia.org/w/index.php?title=Wikipedia:Text_of_the_GNU_Free_Documentation_License&action=raw"; |
1905 | 1831 | |
1906 | | - $wgLicenseURL = 'http://en.wikipedia.org/w/index.php?title=Wikipedia:Text_of_the_GNU_Free_Documentation_License&action=raw'; |
1907 | | - |
1908 | 1832 | $wgCollectionPortletForLoggedInUsersOnly = $wmgCollectionPortletForLoggedInUsersOnly; |
1909 | 1833 | $wgCollectionArticleNamespaces = $wmgCollectionArticleNamespaces; |
1910 | 1834 | } |
1911 | 1835 | |
1912 | 1836 | // Testing internally |
1913 | | -include "$IP/../wmf-config/secret-projects.php"; |
| 1837 | +include "$wmfConfigDir/secret-projects.php"; |
1914 | 1838 | |
1915 | | -/* |
1916 | | -if ( $wgDBname == 'idwiki' ) { |
1917 | | - # Account creation throttle disabled for outreach event |
1918 | | - # Contact: Siska Doviana <serenity@gmail.com> |
1919 | | - if ( time() > strtotime( '2008-08-08T08:00 +7:00' ) |
1920 | | - && time() < strtotime( '2008-08-08T19:00 +7:00' ) ) |
1921 | | - { |
1922 | | - $wgAccountCreationThrottle = 300; |
1923 | | - } |
1924 | | -} |
1925 | | -*/ |
1926 | | - |
1927 | | -/* |
1928 | | -if ( $wgDBname == 'enwiki' ) { |
1929 | | - # Account creation throttle disabled for outreach event |
1930 | | - # Contact: fschulenburg@wikimedia.org |
1931 | | - if ( time() > strtotime( '2009-10-19T11:00 -7:00' ) |
1932 | | - && time() < strtotime( '2009-10-19T16:00 -7:00' ) ) |
1933 | | - { |
1934 | | - $wgAccountCreationThrottle = 300; |
1935 | | - } |
1936 | | -} |
1937 | | - */ |
1938 | | - |
1939 | 1839 | if ( $wgDBname == 'elwiki' ) { |
1940 | 1840 | # Account creation throttle disabled for editing workshop |
1941 | 1841 | # Contact: ariel@wikimedia.org (irc: apergos) |
1942 | | - if ( time() > strtotime( '2011-05-16T17:00 +3:00' ) |
1943 | | - && time() < strtotime( '2011-05-16T20:00 +3:00') ) |
| 1842 | + if ( time() > strtotime( '2011-06-16T13:00 +3:00' ) |
| 1843 | + && time() < strtotime( '2011-06-16T20:00 +3:00') ) |
1944 | 1844 | { |
1945 | | - $wgAccountCreationThrottle = 40; |
| 1845 | + $wgAccountCreationThrottle = 50; |
1946 | 1846 | } |
1947 | 1847 | } |
1948 | 1848 | |
— | — | @@ -1967,7 +1867,7 @@ |
1968 | 1868 | |
1969 | 1869 | if( $wmgUseCodeReview ) { |
1970 | 1870 | include "$IP/extensions/CodeReview/CodeReview.php"; |
1971 | | - include( $IP.'/../wmf-config/codereview.php'); |
| 1871 | + include( "$wmfConfigDir/codereview.php" ); |
1972 | 1872 | $wgSubversionProxy = 'http://codereview-proxy.wikimedia.org/index.php'; |
1973 | 1873 | |
1974 | 1874 | $wgGroupPermissions['user']['codereview-add-tag'] = false; |
— | — | @@ -1979,6 +1879,7 @@ |
1980 | 1880 | $wgGroupPermissions['user']['codereview-associate'] = false; |
1981 | 1881 | |
1982 | 1882 | $wgGroupPermissions['user']['codereview-post-comment'] = true; |
| 1883 | + $wgGroupPermissions['user']['codereview-signoff'] = true; |
1983 | 1884 | |
1984 | 1885 | $wgGroupPermissions['coder']['codereview-add-tag'] = true; |
1985 | 1886 | $wgGroupPermissions['coder']['codereview-remove-tag'] = true; |
— | — | @@ -1999,16 +1900,16 @@ |
2000 | 1901 | |
2001 | 1902 | if( $wmgUseAbuseFilter ) { |
2002 | 1903 | include "$IP/extensions/AbuseFilter/AbuseFilter.php"; |
2003 | | - include( $IP.'/../wmf-config/abusefilter.php'); |
| 1904 | + include( "$wmfConfigDir/abusefilter.php" ); |
2004 | 1905 | } |
2005 | 1906 | |
2006 | 1907 | if ($wmgUseCommunityVoice == true) { |
2007 | | - include ( "$IP/extensions/ClientSide/ClientSide.php" ); |
2008 | | - include ( "$IP/extensions/CommunityVoice/CommunityVoice.php" ); |
| 1908 | + include ( "$IP/extensions/ClientSide/ClientSide.php" ); |
| 1909 | + include ( "$IP/extensions/CommunityVoice/CommunityVoice.php" ); |
2009 | 1910 | } |
2010 | 1911 | |
2011 | 1912 | if ($wmgUsePdfHandler == true) { |
2012 | | - include ("$IP/extensions/PdfHandler/PdfHandler.php" ); |
| 1913 | + include ("$IP/extensions/PdfHandler/PdfHandler.php" ); |
2013 | 1914 | } |
2014 | 1915 | |
2015 | 1916 | if ($wmgUseUsabilityInitiative) { |
— | — | @@ -2023,7 +1924,7 @@ |
2024 | 1925 | //if ( $wgDBname == 'testwiki' ) { $wgUsabilityInitiativeResourceMode = 'raw'; } |
2025 | 1926 | // Disable experimental things |
2026 | 1927 | $wgWikiEditorFeatures['templateEditor'] = |
2027 | | - $wgWikiEditorFeatures['preview'] = |
| 1928 | + $wgWikiEditorFeatures['preview'] = |
2028 | 1929 | $wgWikiEditorFeatures['previewDialog'] = |
2029 | 1930 | $wgWikiEditorFeatures['publish'] = |
2030 | 1931 | $wgWikiEditorFeatures['templates'] = |
— | — | @@ -2046,9 +1947,6 @@ |
2047 | 1948 | } else { |
2048 | 1949 | $wgHiddenPrefs[] = 'vector-collapsiblenav'; |
2049 | 1950 | } |
2050 | | - if( $wgDBname == 'enwiki' ) { |
2051 | | - $wgHiddenPrefs[] = 'minordefault'; |
2052 | | - } |
2053 | 1951 | |
2054 | 1952 | if ($wmgUsabilityPrefSwitch) { |
2055 | 1953 | require_once( "$IP/extensions/PrefStats/PrefStats.php" ); |
— | — | @@ -2066,12 +1964,10 @@ |
2067 | 1965 | $wgPrefSwitchShowLinks = false; |
2068 | 1966 | } |
2069 | 1967 | |
2070 | | - |
2071 | 1968 | if ($wmgUsabilityEnforce) { |
2072 | 1969 | $wgEditToolbarGlobalEnable = false; |
2073 | 1970 | $wgDefaultUserOptions['usebetatoolbar'] = 1; |
2074 | 1971 | $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; |
2075 | | - |
2076 | 1972 | } |
2077 | 1973 | |
2078 | 1974 | // For Babaco... these are still experimental, won't be on by default |
— | — | @@ -2086,6 +1982,7 @@ |
2087 | 1983 | require "$IP/extensions/ClickTracking/ClickTracking.php"; |
2088 | 1984 | |
2089 | 1985 | $wgClickTrackThrottle = $wmgClickTrackThrottle; |
| 1986 | + $wgClickTrackingLog = $wmgClickTrackingLog; |
2090 | 1987 | # Disable Special:ClickTracking, not secure yet (as of r59230) |
2091 | 1988 | unset( $wgSpecialPages['ClickTracking'] ); |
2092 | 1989 | # Remove the clicktracking permission because people see it in ListGroupRights and wonder what it does |
— | — | @@ -2133,7 +2030,7 @@ |
2134 | 2031 | } |
2135 | 2032 | |
2136 | 2033 | if ( $wmgUseLiquidThreads ) { |
2137 | | - require_once( "$IP/../wmf-config/liquidthreads.php" ); |
| 2034 | + require_once( "$wmfConfigDir/liquidthreads.php" ); |
2138 | 2035 | } |
2139 | 2036 | |
2140 | 2037 | if ( $wmgUseFundraiserPortal ) { |
— | — | @@ -2143,7 +2040,7 @@ |
2144 | 2041 | global $wgScriptPath; // SSL may change this after CommonSettings |
2145 | 2042 | global $wgFundraiserPortalDirectory, $wgFundraiserPortalPath, $wgFundraiserImageUrl; |
2146 | 2043 | $wgFundraiserPortalDirectory = "/mnt/upload6/portal"; |
2147 | | - $wgFundraiserPortalPath = "http://upload.wikimedia.org/portal"; |
| 2044 | + $wgFundraiserPortalPath = "$urlprotocol//upload.wikimedia.org/portal"; |
2148 | 2045 | $wgFundraiserImageUrl = "$wgScriptPath/extensions/FundraiserPortal/images"; |
2149 | 2046 | } |
2150 | 2047 | } |
— | — | @@ -2194,8 +2091,8 @@ |
2195 | 2092 | |
2196 | 2093 | $wgArticleFeedbackTracking = array( |
2197 | 2094 | 'buckets' => array( |
2198 | | - 'track' => 10, |
2199 | | - 'ignore' => 90, |
| 2095 | + 'track' => 1.35, |
| 2096 | + 'ignore' => 98.65, |
2200 | 2097 | //'track'=>0, 'ignore' => 100 |
2201 | 2098 | ), |
2202 | 2099 | 'version' => 8, |
— | — | @@ -2220,9 +2117,10 @@ |
2221 | 2118 | |
2222 | 2119 | |
2223 | 2120 | $wgDefaultUserOptions['thumbsize'] = $wmgThumbsizeIndex; |
| 2121 | +$wgDefaultUserOptions['showhiddencats'] = $wmgShowHiddenCats; |
2224 | 2122 | |
2225 | 2123 | if ( $wgDBname == 'strategywiki' ) { |
2226 | | - require_once( "$IP/extensions/StrategyWiki/ActiveStrategy/ActiveStrategy.php" ); |
| 2124 | + require_once( "$IP/extensions/StrategyWiki/ActiveStrategy/ActiveStrategy.php" ); |
2227 | 2125 | } |
2228 | 2126 | |
2229 | 2127 | if ( $wgDBname == 'testwiki' || $wgDBname == 'foundationwiki' ) { |
— | — | @@ -2264,7 +2162,7 @@ |
2265 | 2163 | if ( $wgUseVariablePage ) { |
2266 | 2164 | include( "$IP/extensions/VariablePage/VariablePage.php"); |
2267 | 2165 | $wgVariablePagePossibilities = array( |
2268 | | - 'http://wikimediafoundation.org/wiki/WMFJA1/en' => 100, |
| 2166 | + "$urlprotocol//wikimediafoundation.org/wiki/WMFJA1/en" => 100, |
2269 | 2167 | ); |
2270 | 2168 | |
2271 | 2169 | $wgVariablePageShowSidebarLink = true; |
— | — | @@ -2278,14 +2176,14 @@ |
2279 | 2177 | // ContributionTracking for handling PayPal redirects |
2280 | 2178 | if ( $wgUseContributionTracking ) { |
2281 | 2179 | include( "$IP/extensions/ContributionTracking/ContributionTracking.php" ); |
2282 | | - include( "$IP/../wmf-config/contribution-tracking-setup.php"); |
| 2180 | + include( "$wmfConfigDir/contribution-tracking-setup.php" ); |
2283 | 2181 | $wgContributionTrackingPayPalIPN = "https://civicrm.wikimedia.org/fundcore_gateway/paypal"; |
2284 | 2182 | $wgContributionTrackingPayPalRecurringIPN = "https://civicrm.wikimedia.org/IPNListener_Recurring.php"; |
2285 | 2183 | } |
2286 | 2184 | |
2287 | 2185 | if ( $wmgUseUploadWizard ) { |
2288 | 2186 | require_once( "$IP/extensions/UploadWizard/UploadWizard.php" ); |
2289 | | - $wgUploadStashScalerBaseUrl = "http://upload.wikimedia.org/$site/$lang/thumb/temp"; |
| 2187 | + $wgUploadStashScalerBaseUrl = "$urlprotocol//upload.wikimedia.org/$site/$lang/thumb/temp"; |
2290 | 2188 | $wgUploadWizardConfig = array( |
2291 | 2189 | #'debug' => true, |
2292 | 2190 | 'disableResourceLoader' => false, |
— | — | @@ -2312,6 +2210,8 @@ |
2313 | 2211 | |
2314 | 2212 | if ( $wmgUseGoogleNewsSitemap ) { |
2315 | 2213 | include( "$IP/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php" ); |
| 2214 | + $wgGNSMfallbackCategory = $wmgGNSMfallbackCategory; |
| 2215 | + $wgGNSMcommentNamespace = $wmgGNSMcommentNamespace; |
2316 | 2216 | } |
2317 | 2217 | |
2318 | 2218 | if ( $wmgUseCLDR ) { |
— | — | @@ -2324,22 +2224,22 @@ |
2325 | 2225 | # $wgAPIModules['parse'] = 'ApiDisabled'; |
2326 | 2226 | #} |
2327 | 2227 | |
2328 | | -if ( $wgDBname == 'ptwikibooks' ) { |
2329 | | - # Account creation throttle disabled for "Logística 2011" project from |
2330 | | - # [[FCT]] / [[New University of Lisbon]] |
2331 | | - $wgAccountCreationThrottle = 100; |
2332 | | -} |
2333 | | - |
2334 | | -$wgObjectCaches['ehcache-multiwrite'] = array( |
| 2228 | +$wgObjectCaches['mysql-multiwrite'] = array( |
2335 | 2229 | 'class' => 'MultiWriteBagOStuff', |
2336 | 2230 | 'caches' => array( |
2337 | 2231 | 0 => array( |
2338 | | - 'class' => 'EhcacheBagOStuff', |
2339 | | - 'servers' => array( |
2340 | | - '10.0.6.50:8080', |
| 2232 | + 'class' => 'SqlBagOStuff', |
| 2233 | + 'server' => array( |
| 2234 | + 'host' => '10.0.6.50', # db40 |
| 2235 | + 'dbname' => 'parsercache', |
| 2236 | + 'user' => $wgDBuser, |
| 2237 | + 'password' => $wgDBpassword, |
| 2238 | + 'type' => 'mysql', |
| 2239 | + 'flags' => 0, |
2341 | 2240 | ), |
2342 | | - 'connectTimeout' => 0.5, |
2343 | | - 'timeout' => 5, |
| 2241 | + 'purgePeriod' => 0, |
| 2242 | + 'tableName' => 'pc', |
| 2243 | + 'shards' => 256, |
2344 | 2244 | ), |
2345 | 2245 | 1 => array( |
2346 | 2246 | 'factory' => 'ObjectCache::newMemcached', |
— | — | @@ -2347,10 +2247,9 @@ |
2348 | 2248 | ) |
2349 | 2249 | ); |
2350 | 2250 | |
2351 | | - |
2352 | 2251 | # Style version appendix |
2353 | 2252 | # Shouldn't be needed much in 1.17 due to ResourceLoader, but some legacy things still need it |
2354 | | -$wgStyleVersion .= '-2'; |
| 2253 | +$wgStyleVersion .= '-3'; |
2355 | 2254 | |
2356 | 2255 | // DO NOT DISABLE WITHOUT CONTACTING PHILIPPE / LEGAL! |
2357 | 2256 | // Installed by Andrew, 2011-04-26 |
— | — | @@ -2363,12 +2262,30 @@ |
2364 | 2263 | require_once( "$IP/extensions/WikimediaIncubator/WikimediaIncubator.php" ); |
2365 | 2264 | } |
2366 | 2265 | |
| 2266 | +if ( $wmgUseWikiLove ) { |
| 2267 | + require_once( "$IP/extensions/WikiLove/WikiLove.php" ); |
| 2268 | + $wgWikiLoveLogging = true; |
| 2269 | + if ( $wmgWikiLoveDefault ) { |
| 2270 | + $wgDefaultUserOptions['wikilove-enabled'] = 1; |
| 2271 | + } |
| 2272 | +} |
2367 | 2273 | |
| 2274 | +if ( $wmgUseSubPageList3 ) { |
| 2275 | + include( "$IP/extensions/SubPageList3/SubPageList3.php" ); |
| 2276 | +} |
| 2277 | + |
| 2278 | +if ( $wmgHTTPSExperiment ) { |
| 2279 | + $wgFooterIcons["poweredby"]["mediawiki"]["url"] = "//www.mediawiki.org/"; |
| 2280 | + if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) { |
| 2281 | + $wgCookieSecure = true; |
| 2282 | + } |
| 2283 | +} |
| 2284 | + |
2368 | 2285 | # THIS MUST BE AFTER ALL EXTENSIONS ARE INCLUDED |
2369 | 2286 | # |
2370 | | -# REALlY ... were not kidding here ... NO EXTENSIONS AFTER |
| 2287 | +# REALLY ... were not kidding here ... NO EXTENSIONS AFTER |
2371 | 2288 | |
2372 | | -require( "$IP/../wmf-config/ExtensionMessages.php" ); |
| 2289 | +require( "$wmfConfigDir/ExtensionMessages.php" ); |
2373 | 2290 | |
2374 | 2291 | wfProfileOut( "$fname-misc5" ); |
2375 | 2292 | wfProfileOut( $fname ); |