function postContent() { $this->gatekeeper(); $new = false; if (!empty($this->arguments)) { $object = \IdnoPlugins\Event\Event::getByID($this->arguments[0]); } if (empty($object)) { $object = new \IdnoPlugins\Event\Event(); } if ($object->saveDataFromInput($this)) { $this->forward($object->getURL()); } }
function postContent() { $this->createGatekeeper(); $new = false; if (!empty($this->arguments)) { $object = \IdnoPlugins\Event\Event::getByID($this->arguments[0]); } if (empty($object)) { $object = new \IdnoPlugins\Event\Event(); } if ($object->saveDataFromInput($this)) { (new \Idno\Core\Autosave())->clearContext('event'); $this->forward(\Idno\Core\site()->config()->getDisplayURL() . 'content/all/'); //$this->forward($object->getDisplayURL()); } }