/** * This function gets called to submit the new blog. * * @param array */ function newblog_submit(Pieform $form, $values) { global $USER; $data = $form->get_element('institution'); if ($data['value'] != false) { ArtefactTypeBlog::new_blog(null, $values); redirect('/artefact/blog/index.php?institution=' . $data['value']); } else { ArtefactTypeBlog::new_blog($USER, $values); redirect('/artefact/blog/index.php'); } }
/** * This function gets called to submit the new blog. * * @param array */ function newblog_submit(Pieform $form, $values) { global $USER; ArtefactTypeBlog::new_blog($USER, $values); redirect('/artefact/blog/'); }