Skip to content
Permalink
Browse files

[mms] Only count successful compose mails when determining recipient …

…limits (Bug #13751).
  • Loading branch information...
slusarz committed Dec 20, 2014
1 parent 3be9eed commit 2ae438bf712d83165aab8fbe57eddfa2b1e73552
Showing with 10 additions and 4 deletions.
  1. +2 −0 imp/docs/CHANGES
  2. +1 −0 imp/lib/Sentmail/Mongo.php
  3. +5 −2 imp/lib/Sentmail/Sql.php
  4. +2 −2 imp/package.xml
@@ -2,6 +2,8 @@
v6.2.5-git
----------

[mms] Only count successful compose mails when determining recipient limits
(Bug #13751).


------
@@ -145,6 +145,7 @@ public function favouriteRecipients($limit, $filter = null)
public function numberOfRecipients($hours, $user = false)
{
$query = array(
self::SUCCESS => 1,
self::TS => array(
'$gt' => (time() - ($hours * 3600))
)
@@ -103,8 +103,11 @@ public function favouriteRecipients($limit, $filter = null)
public function numberOfRecipients($hours, $user = false)
{
/* Build the SQL query. */
$query = sprintf('SELECT COUNT(*) FROM %s WHERE sentmail_ts > ?',
$this->_params['table']);
$query = sprintf(
'SELECT COUNT(*) FROM %s WHERE sentmail_ts > ? AND sentmail_success = 1',
$this->_params['table']
);
if ($user) {
$query .= sprintf(' AND sentmail_who = %s', $this->_db->quote($GLOBALS['registry']->getAuth()));
}
@@ -33,7 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
*
* [mms] Only count successful compose mails when determining recipient limits (Bug #13751).
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -3777,7 +3777,7 @@
<date>2014-12-03</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
*
* [mms] Only count successful compose mails when determining recipient limits (Bug #13751).
</notes>
</release>
</changelog>

0 comments on commit 2ae438b

Please sign in to comment.
You can’t perform that action at this time.