https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103499
Revision: 103499
Author: khorn
Date: 2011-11-17 19:34:41 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
GlobalCollect command-line orphan rectifier: Bugfix, because I'm hella dumb.
Modified Paths:
--------------
trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php
Modified:
trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php
===================================================================
---
trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php
2011-11-17 19:23:15 UTC (rev 103498)
+++
trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php
2011-11-17 19:34:41 UTC (rev 103499)
@@ -29,9 +29,13 @@
echo "Order ID count: " . $outstanding_count . "\n";
$files = $this->getAllLogFileNames();
+ $payments = array();
foreach ($files as $file){
+ if (count($payments) >= $this->max_per_execute){
+ continue;
+ }
$file_array = $this->getLogfileLines( $file );
- $payments = $this->findTransactionLines($file_array);
+ $payments =
array_merge($this->findTransactionLines($file_array), $payments);
if (count($payments) === 0){
$this->killfiles[] = $file;
echo print_r($this->killfiles, true);
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs