r103499 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103498‎ | r103499 | r103500 >
Date:19:34, 17 November 2011
Author:khorn
Status:ok (Comments)
Tags:
Comment:
GlobalCollect command-line orphan rectifier: Bugfix, because I'm hella dumb.
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php
@@ -29,9 +29,13 @@
3030 echo "Order ID count: " . $outstanding_count . "\n";
3131
3232 $files = $this->getAllLogFileNames();
 33+ $payments = array();
3334 foreach ($files as $file){
 35+ if (count($payments) >= $this->max_per_execute){
 36+ continue;
 37+ }
3438 $file_array = $this->getLogfileLines( $file );
35 - $payments = $this->findTransactionLines($file_array);
 39+ $payments = array_merge($this->findTransactionLines($file_array), $payments);
3640 if (count($payments) === 0){
3741 $this->killfiles[] = $file;
3842 echo print_r($this->killfiles, true);

Follow-up revisions

RevisionCommit summaryAuthorDate
r103512MFT r103506, r103501, r103499, r103491, r103416, r103385, r103288, r103246, r...khorn21:54, 17 November 2011
r103513MFT r103506, r103501, r103499, r103491, r103416, r103385, r103288, r103246, r...khorn21:57, 17 November 2011

Comments

#Comment by Kaldari (talk | contribs)   20:30, 17 November 2011

I would suggest changing the continue into a regular if structure to make it more readable, but otherwise looks good.

Status & tagging log