Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Commit

Permalink
Put 0 for unlimited messages to process by default
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Aug 13, 2013
1 parent 777d119 commit 318270b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions class.cws.mbh.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Cr@zy
* @copyright 2013, Cr@zy
* @license LGPL licensed
* @version 1.3
* @version 1.4
* @link https://github.com/crazy-max/CwsMailBounceHandler
*
*/
Expand Down Expand Up @@ -84,7 +84,7 @@ class CwsMailBounceHandler
* CwsMailBounceHandler version.
* @var string
*/
public $version = "1.3";
public $version = "1.4";

/**
* Mail host server.
Expand Down Expand Up @@ -177,11 +177,11 @@ class CwsMailBounceHandler
public $folder_hard = 'INBOX.hard';

/**
* Maximum limit messages processed in one batch.
* default 1000
* Maximum limit messages processed in one batch (0 for unlimited).
* default 0
* @var int
*/
public $max_messages = 1000;
public $max_messages = 0;

/**
* The last error message.
Expand Down Expand Up @@ -908,7 +908,7 @@ public function processMails($max=0)
$this->output('<strong>Total:</strong> ' . $this->result['counter']['total'] . ' messages.');

// process maximum number of messages
if ($this->result['counter']['fetched'] > $this->max_messages) {
if (!empty($this->max_messages) && $this->result['counter']['fetched'] > $this->max_messages) {
$this->result['counter']['fetched'] = $this->max_messages;
$this->output('Processing first <strong>' . $this->result['counter']['fetched'] . ' messages</strong>...');
}
Expand Down

0 comments on commit 318270b

Please sign in to comment.