r93919 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93918‎ | r93919 | r93920 >
Date:21:19, 4 August 2011
Author:raindrift
Status:ok
Tags:
Comment:
Fixed bug where global wgUploadStashMaxAge wasn't used, removed redundant defaults. Followup to r93476
Modified paths:
  • /trunk/phase3/includes/upload/UploadStash.php (modified) (history)
  • /trunk/phase3/maintenance/cleanupUploadStash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/cleanupUploadStash.php
@@ -41,9 +41,6 @@
4242
4343 // how far back should this look for files to delete?
4444 global $wgUploadStashMaxAge;
45 - if( $wgUploadStashMaxAge === null ) {
46 - $wgUploadStashMaxAge = 6 * 3600; // default: 6 hours.
47 - }
4845
4946 $this->output( "Getting list of files to clean up...\n" );
5047 $res = $dbr->select(
Index: trunk/phase3/includes/upload/UploadStash.php
@@ -69,12 +69,6 @@
7070 $this->userId = $this->user->getId();
7171 $this->isLoggedIn = $this->user->isLoggedIn();
7272 }
73 -
74 - // Age of the repository in seconds. That is, after how long will files be assumed abandoned and deleted?
75 - global $wgUploadStashMaxAge;
76 - if( $wgUploadStashMaxAge === null ) {
77 - $wgUploadStashMaxAge = 6 * 3600; // default: 6 hours.
78 - }
7973 }
8074
8175 /**
@@ -272,6 +266,7 @@
273267 // - the key is owned by someone else and
274268 // - the age of the key is less than $wgUploadStashMaxAge
275269 if ( is_object( $row ) ) {
 270+ global $wgUploadStashMaxAge;
276271 if ( $row->us_user != $this->userId &&
277272 $row->wfTimestamp( TS_UNIX, $row->us_timestamp ) > time() - $wgUploadStashMaxAge
278273 ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93476Changed stash age parameter from a constant to a config option, switched to s...raindrift18:46, 29 July 2011

Status & tagging log