rcube_sieve_script::update_rule PHP Method

update_rule() public method

public update_rule ( $index, $content )
    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;
    }