public function moderation($Page = '')
{
$this->permission(array('Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), false);
$Where = array('Operation' => array('Moderate', 'Pending'));
// Filter by category menu
if ($CategoryID = Gdn::request()->getValue('CategoryID')) {
$this->setData('ModerationCategoryID', $CategoryID);
$Where['CategoryID'] = $CategoryID;
}
list($Offset, $Limit) = offsetLimit($Page, 10);
$this->setData('Title', t('Moderation Queue'));
$RecordCount = $this->LogModel->getCountWhere($Where);
$this->setData('RecordCount', $RecordCount);
if ($Offset >= $RecordCount) {
$Offset = $RecordCount - $Limit;
}
$Log = $this->LogModel->getWhere($Where, 'LogID', 'Desc', $Offset, $Limit);
$this->setData('Log', $Log);
if ($this->deliveryType() == DELIVERY_TYPE_VIEW) {
$this->View = 'Table';
}
Gdn_Theme::section('Moderation');
$this->setHighlightRoute('dashboard/log/moderation');
$this->render();
}