In the Privatemsg Limits submodule, the following functions are listed as having a $timeframe argument but this argument hasn't actually been taken in.

_privatemsg_limits_get_received()
privatemsg_limits_sql_received()

For example:

/**
 * Returns the number of messages/threads a user has received.
 *
 * @param user $account   User object
 * @param int  $timeframe How many seconds back should be considered
 *
 * @return int Number of messages/threads
 */
function _privatemsg_limits_get_received($account) {

_privatemsg_limits_get_sent() does take a $timeframe argument, so it looks like the documentation was mistakenly copied.

I would be interested in adding the $timeframe argument to received() functions as well, but I need to do more testing to see if it doesn't break anything.

In any case, I am opening this as a bug report because the code documentation is presently incorrect.

Comments

ivnish’s picture

Status: Active » Closed (outdated)