Index: trunk/phase3/maintenance/cleanupUploadStash.php |
— | — | @@ -41,9 +41,6 @@ |
42 | 42 | |
43 | 43 | // how far back should this look for files to delete? |
44 | 44 | global $wgUploadStashMaxAge; |
45 | | - if( $wgUploadStashMaxAge === null ) { |
46 | | - $wgUploadStashMaxAge = 6 * 3600; // default: 6 hours. |
47 | | - } |
48 | 45 | |
49 | 46 | $this->output( "Getting list of files to clean up...\n" ); |
50 | 47 | $res = $dbr->select( |
Index: trunk/phase3/includes/upload/UploadStash.php |
— | — | @@ -69,12 +69,6 @@ |
70 | 70 | $this->userId = $this->user->getId(); |
71 | 71 | $this->isLoggedIn = $this->user->isLoggedIn(); |
72 | 72 | } |
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 | | - } |
79 | 73 | } |
80 | 74 | |
81 | 75 | /** |
— | — | @@ -272,6 +266,7 @@ |
273 | 267 | // - the key is owned by someone else and |
274 | 268 | // - the age of the key is less than $wgUploadStashMaxAge |
275 | 269 | if ( is_object( $row ) ) { |
| 270 | + global $wgUploadStashMaxAge; |
276 | 271 | if ( $row->us_user != $this->userId && |
277 | 272 | $row->wfTimestamp( TS_UNIX, $row->us_timestamp ) > time() - $wgUploadStashMaxAge |
278 | 273 | ) { |