public function update_rule($index, $content)
{
foreach ($content['actions'] as $action) {
if (!in_array($action['type'], $this->supported)) {
return SIEVE_ERROR_BAD_ACTION;
}
}
if ($this->content[$index]) {
$this->content[$index] = $content;
return true;
}
return SIEVE_ERROR_NOT_FOUND;
}