From: Chad Horohoe Date: Tue, 11 Dec 2012 01:55:48 +0000 (-0500) Subject: Revert "Commit of various live hacks" X-Git-Tag: 1.31.0-rc.0~21337 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=551d81df41a687d2b2e49a81106efe07fc38d405;p=lhc%2Fweb%2Fwiklou.git Revert "Commit of various live hacks" This reverts commit acddbc862afceead7cd3cce1dc1cc55c265e0ca1. Change-Id: Iabf5f917938c347ca6ddc7a373c731f44f23363b --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e90a065e41..e439ac770a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -184,8 +184,7 @@ $wgLoadScript = false; * Defaults to "{$wgScriptPath}/skins". */ $wgStylePath = false; -# Broken PHP, canary mismatch -- TS -#$wgStyleSheetPath = &$wgStylePath; +$wgStyleSheetPath = &$wgStylePath; /** * The URL path of the skins directory. Should not point to an external domain. @@ -4090,11 +4089,10 @@ $wgAutoConfirmCount = 0; * user who has provided an e-mail address. */ $wgAutopromote = array( - /* test patch -- TS 'autoconfirmed' => array( '&', array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ), array( APCOND_AGE, &$wgAutoConfirmAge ), - ), */ + ), ); /** diff --git a/includes/MessageBlobStore.php b/includes/MessageBlobStore.php index 5251643754..09561bd78a 100644 --- a/includes/MessageBlobStore.php +++ b/includes/MessageBlobStore.php @@ -231,9 +231,6 @@ class MessageBlobStore { } public static function clear() { - // HACK: disable clear() on WMF servers - return; - // TODO: Give this some more thought // TODO: Is TRUNCATE better? $dbw = wfGetDB( DB_MASTER ); diff --git a/includes/cache/SquidUpdate.php b/includes/cache/SquidUpdate.php index 897397e41f..6b48fa4d14 100644 --- a/includes/cache/SquidUpdate.php +++ b/includes/cache/SquidUpdate.php @@ -202,25 +202,10 @@ class SquidUpdate { throw new MWException( "Invalid HTCP rule for URL $url\n" ); } - // Try and incremement value in APC cache - $id = apc_inc( 'squidhtcppurge' ); - if ( $id === false ) { - // If false, means it didn't work - // Chances are that means it isn't in the cache - // Start saving a cached value - $add = apc_add( 'squidhtcppurge', 1 ); - if ( $add === false ) { - wfDebugLog( 'htcp', 'Unable to set value to APC cache' ); - $id = 0; - } else { - $id = $add; - } - } - // Construct a minimal HTCP request diagram // as per RFC 2756 // Opcode 'CLR', no response desired, no auth - $htcpTransID = $id; + $htcpTransID = rand(); $htcpSpecifier = pack( 'na4na*na8n', 4, 'HEAD', strlen( $url ), $url, diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index 5e385aa4e6..36a1126ca2 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -152,11 +152,11 @@ class DatabaseMysql extends DatabaseBase { // Tell the server we're communicating with it in UTF-8. // This may engage various charset conversions. - /*if( $wgDBmysql5 ) { + if( $wgDBmysql5 ) { $this->query( 'SET NAMES utf8', __METHOD__ ); } else { $this->query( 'SET NAMES binary', __METHOD__ ); - }*/ + } // Set SQL mode, default is turning them all off, can be overridden or skipped with null if ( is_string( $wgSQLMode ) ) { $mode = $this->addQuotes( $wgSQLMode ); diff --git a/includes/job/jobs/HTMLCacheUpdateJob.php b/includes/job/jobs/HTMLCacheUpdateJob.php index 55c9f991d9..20245b3212 100644 --- a/includes/job/jobs/HTMLCacheUpdateJob.php +++ b/includes/job/jobs/HTMLCacheUpdateJob.php @@ -236,19 +236,13 @@ class HTMLCacheUpdateJob extends Job { array( 'page_id' => $batch ) + $touchedCond, __METHOD__ ); - # WM patch: throttle to avoid apache CPU exhaustion -- TS - if ( php_sapi_name() == 'cli' ) { - sleep( 1 ); - } } - # Disable this as a temporary measure per private-l post -- TS # Update squid - /* if ( $wgUseSquid ) { $u = SquidUpdate::newFromTitles( $titleArray ); $u->doUpdate(); - } */ + } # Update file cache if ( $wgUseFileCache ) { diff --git a/maintenance/tables.sql b/maintenance/tables.sql index ca301aeff3..c9a188bd60 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -1141,9 +1141,9 @@ CREATE TABLE /*_*/searchindex ( si_text mediumtext NOT NULL ) ENGINE=MyISAM; --- CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page); --- CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title); --- CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text); +CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page); +CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title); +CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text); --