private function validateForm()
{
if ($this->frm->isSubmitted()) {
if ($this->frm->isCorrect()) {
// set our settings
$this->get('fork.settings')->set($this->URL->getModule(), 'overview_num_items_per_category', (int) $this->frm->getField('overview_number_of_items_per_category')->getValue());
$this->get('fork.settings')->set($this->URL->getModule(), 'most_read_num_items', (int) $this->frm->getField('most_read_number_of_items')->getValue());
$this->get('fork.settings')->set($this->URL->getModule(), 'related_num_items', (int) $this->frm->getField('related_number_of_items')->getValue());
$this->get('fork.settings')->set($this->URL->getModule(), 'allow_multiple_categories', (bool) $this->frm->getField('allow_multiple_categories')->getValue());
$this->get('fork.settings')->set($this->URL->getModule(), 'spamfilter', (bool) $this->frm->getField('spamfilter')->getValue());
$this->get('fork.settings')->set($this->URL->getModule(), 'allow_feedback', (bool) $this->frm->getField('allow_feedback')->getValue());
$this->get('fork.settings')->set($this->URL->getModule(), 'allow_own_question', (bool) $this->frm->getField('allow_own_question')->getValue());
$this->get('fork.settings')->set($this->URL->getModule(), 'send_email_on_new_feedback', (bool) $this->frm->getField('send_email_on_new_feedback')->getValue());
if ($this->get('fork.settings')->get('Core', 'akismet_key') === null) {
$this->get('fork.settings')->set($this->URL->getModule(), 'spamfilter', false);
}
// redirect to the settings page
$this->redirect(BackendModel::createURLForAction('Settings') . '&report=saved');
}
}
}