You are here

function biblio_citeproc_csl_editor_submit in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/CiteProc/biblio_citeproc.admin.inc \biblio_citeproc_csl_editor_submit()
  2. 7.2 modules/CiteProc/biblio_citeproc.admin.inc \biblio_citeproc_csl_editor_submit()

File

modules/CiteProc/biblio_citeproc.admin.inc, line 688

Code

function biblio_citeproc_csl_editor_submit($form, &$form_state) {
  $form_state['redirect'] = 'admin/config/content/biblio/citeproc/styles';
  if ($form_state['triggering_element']['#value'] == t('Save')) {
    $csl = $form_state['values']['editor']['value'];
    $id = $form_state['values']['id'];
    $record = array(
      'id' => $id,
      'csl' => $csl,
      'sha1' => sha1($csl),
      'changed' => time(),
      'updated' => time(),
    );
    drupal_write_record('biblio_citeproc_styles', $record, 'id');
  }
}