Revert "Commit of various live hacks"
authorCatrope <roan.kattouw@gmail.com>
Mon, 30 Apr 2012 20:57:56 +0000 (20:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 30 Apr 2012 20:57:56 +0000 (20:57 +0000)
Was meant for 1.20wmf2

This reverts commit 062773733d6c97a5b05098712ffc64fc7fc491f7

includes/DefaultSettings.php
includes/MessageBlobStore.php
includes/cache/HTMLCacheUpdate.php
includes/cache/SquidUpdate.php
includes/db/DatabaseMysql.php
maintenance/tables.sql

index bfac389..9801e04 100644 (file)
@@ -157,8 +157,7 @@ $wgLoadScript = false;
  * The URL path of the skins directory. Will default to "{$wgScriptPath}/skins" in Setup.php
  */
 $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.
@@ -3734,11 +3733,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 ),
-       ), */
+       ),
 );
 
 /**
index 255e9a7..be6b27c 100644 (file)
@@ -228,9 +228,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 );
index 029f67a..11e2ae7 100644 (file)
@@ -191,19 +191,13 @@ class HTMLCacheUpdate implements DeferrableUpdate {
                                array( 'page_id' => $batch ),
                                __METHOD__
                        );
-                       # WM patch: throttle to avoid apache CPU exhaustion -- TS
-                       if ( php_sapi_name() == 'cli' ) {
-                               sleep( 1 );
-                       }
                }
 
                # Update squid
-               # Disable this as a temporary measure per private-l post -- TS
-               /*
                if ( $wgUseSquid ) {
                        $u = SquidUpdate::newFromTitles( $titleArray );
                        $u->doUpdate();
-               } */
+               }
 
                # Update file cache
                if  ( $wgUseFileCache ) {
index b343b0a..e560e0e 100644 (file)
@@ -185,25 +185,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,
index e7c7368..c334c38 100644 (file)
@@ -143,12 +143,12 @@ class DatabaseMysql extends DatabaseBase {
                if ( $success ) {
                        // Tell the server we're communicating with it in UTF-8.
                        // This may engage various charset conversions.
-                       /*global $wgDBmysql5;
+                       global $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
                        global $wgSQLMode;
                        if ( is_string( $wgSQLMode ) ) {
index 34eba56..a848bf5 100644 (file)
@@ -1121,9 +1121,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);
 
 
 --