Index: branches/wmf-deployment/maintenance/addwiki.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | $stores = array(); |
65 | 65 | } |
66 | 66 | if ( count( $stores ) ) { |
67 | | - require_once( 'ExternalStoreDB.php' ); |
| 67 | + #require_once( 'ExternalStoreDB.php' ); |
68 | 68 | global $wgDBuser, $wgDBpassword, $wgExternalServers; |
69 | 69 | foreach ( $stores as $storeURL ) { |
70 | 70 | $m = array(); |
Index: branches/wmf-deployment/includes/specials/SpecialSearch.php |
— | — | @@ -884,7 +884,7 @@ |
885 | 885 | if ( $resultsShown > 0 ) { |
886 | 886 | if ( $totalNum > 0 ){ |
887 | 887 | $top = wfMsgExt('showingresultsheader', array( 'parseinline' ), |
888 | | - $this->offset+1, $this->offset+$resultsShown, $totalNum, $term, $resultsShown ); |
| 888 | + $this->offset+1, $this->offset+$resultsShown, $totalNum, wfEscapeWikiText($term), $resultsShown ); |
889 | 889 | } elseif ( $resultsShown >= $this->limit ) { |
890 | 890 | $top = wfShowingResults( $this->offset, $this->limit ); |
891 | 891 | } else { |
Index: branches/wmf-deployment/StartProfiler.php |
— | — | @@ -0,0 +1,51 @@ |
| 2 | +<?php |
| 3 | +# WARNING: This file is publically viewable on the web. Do not put private data here. |
| 4 | +# |
| 5 | +$rand = mt_rand(0, 0x7fffffff); |
| 6 | +$host = @$_SERVER['HTTP_HOST']; |
| 7 | + |
| 8 | +/*if ( ( !($rand % 50) && $host == 'en.wikipedia.org' ) || |
| 9 | + ( !($rand % 50) && $host == 'commons.wikimedia.org') || |
| 10 | + ( !($rand % 50) && $host == 'de.wikipedia.org') || |
| 11 | + ( !($rand % 50) && $host == 'es.wikipedia.org') || |
| 12 | + ( !($rand % 1) && $host == 'test.wikipedia.org' ) || |
| 13 | + ( $host == 'zh.wikipedia.org' ) || |
| 14 | + ( !($rand % 10) && $host == 'ja.wikipedia.org' ) |
| 15 | +) {*/ |
| 16 | +if ( @$_SERVER['REQUEST_URI'] == '/w/index.php?title=United_States&action=submit' ) { |
| 17 | + require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' ); |
| 18 | + $wgProfiler = new ProfilerSimpleUDP; |
| 19 | + $wgProfiler->setProfileID( 'bigpage' ); |
| 20 | +} elseif (@defined($_REQUEST['forceprofile'])) { |
| 21 | + require_once( dirname(__FILE__).'/includes/ProfilerSimpleText.php' ); |
| 22 | + $wgProfiler = new ProfilerSimpleText; |
| 23 | + $wgProfiler->setProfileID( 'forced' ); |
| 24 | +} elseif (@defined($_REQUEST['forcetrace'])) { |
| 25 | + require_once( dirname(__FILE__).'/includes/ProfilerSimpleTrace.php' ); |
| 26 | + $wgProfiler = new ProfilerSimpleTrace; |
| 27 | +} elseif ( strpos( @$_SERVER['REQUEST_URI'], '/w/thumb.php' ) !== false ) { |
| 28 | + require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' ); |
| 29 | + $wgProfiler = new ProfilerSimpleUDP; |
| 30 | + $wgProfiler->setProfileID( 'thumb' ); |
| 31 | +} elseif ( !( $rand % 50 ) ) { |
| 32 | + require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' ); |
| 33 | + $wgProfiler = new ProfilerSimpleUDP; |
| 34 | + if ( $host == 'en.wikipedia.org' ) { |
| 35 | + $wgProfiler->setProfileID( 'enwiki' ); |
| 36 | + } elseif ( $host == 'de.wikipedia.org' ) { |
| 37 | + $wgProfiler->setProfileID( 'dewiki' ); |
| 38 | + } else { |
| 39 | + $wgProfiler->setProfileID( 'others' ); |
| 40 | + } |
| 41 | + #$wgProfiler->setProfileID( 'all' ); |
| 42 | + #$wgProfiler->setMinimum(5 /* seconds */); |
| 43 | +} |
| 44 | +elseif ( defined( 'MW_FORCE_PROFILE' ) ) { |
| 45 | + require_once( dirname(__FILE__).'/includes/Profiler.php' ); |
| 46 | + $wgProfiler = new Profiler; |
| 47 | +} else { |
| 48 | + require_once( dirname(__FILE__).'/includes/ProfilerStub.php' ); |
| 49 | +} |
| 50 | + |
| 51 | + |
| 52 | + |
Property changes on: branches/wmf-deployment/StartProfiler.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 53 | + native |