Ejemplo n.º 1
0
        $url = 'list.php?list=' . $new_concept_list_id;
    } else {
        // todo: need to pass error message to user
        $url = 'list.php';
    }
} elseif ($submit == 'update') {
    // Make sure the right parameters are set
    if (!$list_id) {
        trigger_error('<strong>list</strong> is a required form post parameter ' . "for submit type 'update'.", E_USER_ERROR);
    }
    // Throw error if updating one of the restricted lists
    if ($restrict_editing) {
        trigger_error("Cannot update restricted lists without administrative privileges", E_USER_ERROR);
    }
    // Update the list
    if (!$clf->updateConceptList($list_id, $name, $source, $concepts)) {
        trigger_error('Unable to update concept list: ' . $list_id, E_USER_ERROR);
    }
    // Set the redirect url
    $url = 'list.php?list=' . $list_id;
}
/****************************************************************************
**	Redirect back to list.php
****************************************************************************/
// Get back to list.php
if ($debug) {
    echo '<p>Redirect to: <a href="' . $url . '">' . $url . '</a></p>';
} else {
    header('Location:' . $url);
}
exit;