Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -346,7 +346,7 @@ |
347 | 347 | |
348 | 348 | $res = $dbr->select( array( 'page', 'revision', 'text' ), |
349 | 349 | array( 'page_title', 'old_text', 'old_flags' ), |
350 | | - $smallConds, __METHOD__ ); |
| 350 | + $smallConds, __METHOD__. "($code)" ); |
351 | 351 | |
352 | 352 | for ( $row = $dbr->fetchObject( $res ); $row; $row = $dbr->fetchObject( $res ) ) { |
353 | 353 | $cache[$row->page_title] = ' ' . Revision::getRevisionText( $row ); |
— | — | @@ -400,9 +400,18 @@ |
401 | 401 | |
402 | 402 | // Also delete cached sidebar... just in case it is affected |
403 | 403 | global $parserMemc; |
404 | | - $sidebarKey = wfMemcKey( 'sidebar', $code ); |
405 | | - $parserMemc->delete( $sidebarKey ); |
| 404 | + $codes = array( $code ); |
| 405 | + if ( $code === 'en' ) { |
| 406 | + // Delete all sidebars, like for example on action=purge on the |
| 407 | + // sidebar messages |
| 408 | + $codes = array_keys( Language::getLanguageNames() ); |
| 409 | + } |
406 | 410 | |
| 411 | + foreach ( $codes as $code ) { |
| 412 | + $sidebarKey = wfMemcKey( 'sidebar', $code ); |
| 413 | + $parserMemc->delete( $sidebarKey ); |
| 414 | + } |
| 415 | + |
407 | 416 | wfRunHooks( "MessageCacheReplace", array( $title, $text ) ); |
408 | 417 | |
409 | 418 | wfProfileOut( __METHOD__ ); |