示例#1
0
文件: index.php 项目: kienv/mahara
/**
 * This function is called to update the blog details.
 */
function editblog_submit(Pieform $form, $values)
{
    global $USER;
    if ($data = $form->get_element('institution')) {
        ArtefactTypeBlog::edit_blog($USER, $values);
        redirect('/artefact/blog/view/index.php?id=' . $values['id'] . '&institution=' . $data['value']);
    } else {
        ArtefactTypeBlog::edit_blog($USER, $values);
        redirect('/artefact/blog/view/index.php?id=' . $values['id']);
    }
}
示例#2
0
文件: index.php 项目: patkira/mahara
/**
 * This function is called to update the blog details.
 */
function editblog_submit(Pieform $form, $values)
{
    global $USER;
    ArtefactTypeBlog::edit_blog($USER, $values);
    $institution = $form->get_element('institution');
    $group = $form->get_element('group');
    if (!empty($institution['value'])) {
        redirect('/artefact/blog/view/index.php?id=' . $values['id'] . '&institution=' . $institution['value']);
    } else {
        if (!empty($group['value'])) {
            redirect('/artefact/blog/view/index.php?id=' . $values['id'] . '&group=' . $group['value']);
        } else {
            redirect('/artefact/blog/view/index.php?id=' . $values['id']);
        }
    }
}
/**
 * This function is called to update the blog details.
 */
function editblog_submit(Pieform $form, $values)
{
    global $USER;
    ArtefactTypeBlog::edit_blog($USER, $values);
    redirect('/artefact/blog/view/?id=' . $values['id']);
}