• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Implemented ThreadModel::prepareThreadConditions

xf_phantom

Well-known member
#1
It would be nice if you would include more thread fields to the conditions to avoid C&P code.

e.g. i've just checked my addons and seen that i have 5 addons extending the thread model and adding reply_count to the conditions.


PHP:
f (!empty($conditions['reply_count']) && is_array($conditions['reply_count']))
{
list($operator, $cutOff) = $conditions['reply_count'];
 
$this->assertValidCutOffOperator($operator);
$sqlCondition = "( thread.reply_count $operator " . $db->quote($cutOff) . ')';
}