http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97505

Revision: 97505
Author:   reedy
Date:     2011-09-19 15:31:11 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
1.18wmf1 Merge r83867, r93686, r93807, r93971, r93972 (some manually do to 
location changes)

Modified Paths:
--------------
    branches/wmf/1.18wmf1/includes/DefaultSettings.php
    branches/wmf/1.18wmf1/includes/cache/HTMLCacheUpdate.php
    branches/wmf/1.18wmf1/includes/cache/SquidUpdate.php
    branches/wmf/1.18wmf1/includes/db/DatabaseMysql.php

Modified: branches/wmf/1.18wmf1/includes/DefaultSettings.php
===================================================================
--- branches/wmf/1.18wmf1/includes/DefaultSettings.php  2011-09-19 15:18:17 UTC 
(rev 97504)
+++ branches/wmf/1.18wmf1/includes/DefaultSettings.php  2011-09-19 15:31:11 UTC 
(rev 97505)
@@ -158,7 +158,8 @@
  * The URL path of the skins directory. Defaults to "{$wgScriptPath}/skins"
  */
 $wgStylePath   = false;
-$wgStyleSheetPath = &$wgStylePath;
+# Broken PHP, canary mismatch -- TS
+#$wgStyleSheetPath = &$wgStylePath;
 
 /**
  * The URL path of the skins directory. Should not point to an external domain.
@@ -3563,10 +3564,11 @@
  * user who has provided an e-mail address.
  */
 $wgAutopromote = array(
+       /* test patch -- TS
        'autoconfirmed' => array( '&',
                array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ),
                array( APCOND_AGE, &$wgAutoConfirmAge ),
-       ),
+       ),*/
 );
 
 /**

Modified: branches/wmf/1.18wmf1/includes/cache/HTMLCacheUpdate.php
===================================================================
--- branches/wmf/1.18wmf1/includes/cache/HTMLCacheUpdate.php    2011-09-19 
15:18:17 UTC (rev 97504)
+++ branches/wmf/1.18wmf1/includes/cache/HTMLCacheUpdate.php    2011-09-19 
15:31:11 UTC (rev 97505)
@@ -182,6 +182,10 @@
                                array( 'page_id IN (' . $dbw->makeList( $batch 
) . ')' ),
                                __METHOD__
                        );
+                       # WM patch: throttle to avoid apache CPU exhaustion -- 
TS
+                       if ( php_sapi_name() == 'cli' ) {
+                               sleep( 1 );
+                       }
                }
 
                # Update squid

Modified: branches/wmf/1.18wmf1/includes/cache/SquidUpdate.php
===================================================================
--- branches/wmf/1.18wmf1/includes/cache/SquidUpdate.php        2011-09-19 
15:18:17 UTC (rev 97504)
+++ branches/wmf/1.18wmf1/includes/cache/SquidUpdate.php        2011-09-19 
15:31:11 UTC (rev 97505)
@@ -174,10 +174,24 @@
                                }
                                $url = SquidUpdate::expand( $url );
 
+                               // 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 = rand();
+                               $htcpTransID = $id;
 
                                $htcpSpecifier = pack( 'na4na*na8n',
                                        4, 'HEAD', strlen( $url ), $url,

Modified: branches/wmf/1.18wmf1/includes/db/DatabaseMysql.php
===================================================================
--- branches/wmf/1.18wmf1/includes/db/DatabaseMysql.php 2011-09-19 15:18:17 UTC 
(rev 97504)
+++ branches/wmf/1.18wmf1/includes/db/DatabaseMysql.php 2011-09-19 15:31:11 UTC 
(rev 97505)
@@ -110,6 +110,7 @@
                }
 
                if ( $success ) {
+                       /*
                        $version = $this->getServerVersion();
                        if ( version_compare( $version, '4.1' ) >= 0 ) {
                                // Tell the server we're communicating with it 
in UTF-8.
@@ -127,6 +128,7 @@
                                        $this->query( "SET sql_mode = $mode", 
__METHOD__ );
                                }
                        }
+                        */
 
                        // Turn off strict mode if it is on
                } else {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to