Airship\Cabin\Bridge\Landing\Admin::deleteNotary PHP Method

deleteNotary() protected method

Add a new notary
protected deleteNotary ( array $channels, array $post ) : boolean
$channels array
$post array
return boolean
    protected function deleteNotary(array $channels, array $post) : bool
    {
        if (\strpos($post['delete_notary'], '|') === false) {
            return false;
        }
        list($ch, $idx) = \explode('|', $post['delete_notary']);
        if (!isset($channels[$ch])) {
            return false;
        }
        $idx += 0;
        if ($channels[$ch]['notaries'][$idx]) {
            unset($channels[$ch]['notaries'][$idx]);
        }
        return \Airship\saveJSON(ROOT . '/config/channel_peers/' . $ch . '.json', $channels[$ch]['notaries']);
    }