r104178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104177‎ | r104178 | r104179 >
Date:16:20, 24 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/extensions (modified) (history)
  • /branches/REL1_18/extensions/CentralAuth (modified) (history)
  • /branches/REL1_18/extensions/CentralAuth/specials/SpecialGlobalUsers.php (modified) (history)
  • /branches/REL1_18/extensions/GlobalUsage/GlobalUsageHooks.php (modified) (history)
  • /branches/REL1_18/extensions/GlobalUsage/GlobalUsage_body.php (modified) (history)
  • /branches/REL1_18/extensions/LiquidThreads (modified) (history)
  • /branches/REL1_18/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/extensions/LiquidThreads/classes/View.php
@@ -359,7 +359,7 @@
360360 * @param $request FauxRequest object to have session data injected into.
361361 */
362362 static function fixFauxRequestSession( $request ) {
363 - foreach( $_SESSION as $k => $v ) {
 363+ foreach( (array)$_SESSION as $k => $v ) {
364364 $request->setSessionData( $k, $v );
365365 }
366366 }
Property changes on: branches/REL1_18/extensions/LiquidThreads
___________________________________________________________________
Modified: svn:mergeinfo
367367 Merged /trunk/extensions/LiquidThreads:r103675,104049,104162
Index: branches/REL1_18/extensions/CentralAuth/specials/SpecialGlobalUsers.php
@@ -9,7 +9,7 @@
1010 global $wgOut, $wgRequest, $wgContLang;
1111 $this->setHeaders();
1212
13 - $pg = new GlobalUsersPager();
 13+ $pg = new GlobalUsersPager( $this->getContext(), $par );
1414
1515 if ( $par ) {
1616 $pg->setGroup( $par );
@@ -33,8 +33,8 @@
3434 class GlobalUsersPager extends UsersPager {
3535 protected $requestedGroup = false, $requestedUser;
3636
37 - function __construct() {
38 - parent::__construct();
 37+ function __construct( IContextSource $context = null, $par = null ) {
 38+ parent::__construct( $context, $par );
3939 $this->mDb = CentralAuthUser::getCentralSlaveDB();
4040 }
4141
Property changes on: branches/REL1_18/extensions/CentralAuth
___________________________________________________________________
Modified: svn:mergeinfo
4242 Merged /trunk/extensions/CentralAuth:r100516,103675,104049,104162
Index: branches/REL1_18/extensions/GlobalUsage/GlobalUsageHooks.php
@@ -17,7 +17,19 @@
1818
1919 // Create a list of locally existing images
2020 $images = array_keys( $linksUpdater->getImages() );
21 - $localFiles = array_keys( RepoGroup::singleton()->getLocalRepo()->findFiles( $images ) );
 21+
 22+ //$localFiles = array_keys( RepoGroup::singleton()->getLocalRepo()->findFiles( $images ) );
 23+ // Unrolling findFiles() here because pages with thousands of images trigger an OOM
 24+ // error while building an array with thousands of File objects (bug 32598)
 25+ $localFiles = array();
 26+ $repo = RepoGroup::singleton()->getLocalRepo();
 27+ foreach ( $images as $image ) {
 28+ $file = $repo->findFile( $image );
 29+ if ( $file ) {
 30+ $localFiles[] = $file->getTitle()->getDBkey();
 31+ }
 32+ }
 33+
2234 $missingFiles = array_diff( $images, $localFiles );
2335
2436 global $wgUseDumbLinkUpdate;
Index: branches/REL1_18/extensions/GlobalUsage/GlobalUsage_body.php
@@ -112,7 +112,7 @@
113113 'gil_to' => $row->il_to,
114114 );
115115 }
116 - $this->db->insert( 'globalimagelinks', $insert, __METHOD__ );
 116+ $this->db->insert( 'globalimagelinks', $insert, __METHOD__, array( 'IGNORE' ) );
117117 }
118118
119119 /**
Property changes on: branches/REL1_18/extensions
___________________________________________________________________
Modified: svn:mergeinfo
120120 Merged /trunk/extensions:r100516,103675,104049,104162

Follow-up revisions

RevisionCommit summaryAuthorDate
r108072Fix r104178 like r108070reedy19:16, 4 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100516Fix links on SpecialGlobalUsers, which were pointing to ListUsers instead of ...hartman20:55, 22 October 2011
r103675Fix notice in LiquidThreads caused by $_SESSION not being defined if session_...catrope14:03, 19 November 2011
r104049(bug 32598) Fix OOM errors in GlobalUsage caused by calling findFiles() on an...catrope16:37, 23 November 2011
r104162Use INSERT IGNORE in GlobalUsage::copyLocalImagelinks(), was throwing DB erro...catrope13:51, 24 November 2011

Status & tagging log