public function canHaveBounty()
{
$canHave = $this->accepted_answer != 'Y' && $this->sticked != self::IS_STICKED && $this->number_replies == 0 && $this->categories_id != 15 && $this->categories_id != 1 && $this->category->no_bounty != 'Y' && $this->categories_id != 7 && $this->categories_id != 24 && $this->votes_up - $this->votes_down >= 0;
if ($canHave) {
$diff = time() - $this->created_at;
if ($diff > 86400 && $diff < 86400 * 30) {
return true;
} elseif ($diff < 3600) {
return true;
}
}
return false;
}