protected function getCondition()
{
if ($cond = $this->model->getCondition()) {
if (Document::doHideUnpublished() && !$this->model->getUnpublished()) {
return " WHERE (" . $cond . ") AND published = 1";
}
return " WHERE " . $cond . " ";
} elseif (Document::doHideUnpublished() && !$this->model->getUnpublished()) {
return " WHERE published = 1";
}
return "";
}