You are here

function filelog_ui_admin_settings in File Log 6.2

filelog module settings form.

See also

system_settings_form()

1 string reference to 'filelog_ui_admin_settings'
filelog_ui_menu in ./filelog_ui.module
Implementation of hook_menu()

File

./filelog_ui.admin.inc, line 9

Code

function filelog_ui_admin_settings() {
  $form['filelog_maxage'] = array(
    '#type' => 'select',
    '#title' => t('Discard log entries older than the following maximum age'),
    '#default_value' => variable_get('filelog_maxage', 2592000),
    '#options' => array(
      0 => t('Forever'),
      604800 => t('1 week'),
      1209600 => t('2 weeks'),
      2592000 => t('1 month'),
      5184000 => t('2 months'),
      7776000 => t('3 months'),
    ),
    '#description' => t('This option does not affect the log file contents. The maximum age for rows to keep in the database. Older entries will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array(
      '@cron' => url('admin/reports/status'),
    )),
  );
  $last = variable_get('filelog_last_import', 0);
  $form['filelog_import_frequency'] = array(
    '#type' => 'select',
    '#title' => t('Import new entries at the following frequency'),
    '#default_value' => variable_get('filelog_import_frequency', 604800),
    '#options' => array(
      0 => t('Never'),
      604800 => t('1 week'),
      1209600 => t('2 weeks'),
      2592000 => t('1 month'),
      5184000 => t('2 months'),
      7776000 => t('3 months'),
    ),
    '#description' => t('Last import was on <strong>@date</strong>. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array(
      '@date' => $last ? format_date($last, 'medium') : t('Never'),
      '@cron' => url('admin/reports/status'),
    )),
  );
  $form['filelog_check_base_url'] = array(
    '#type' => 'checkbox',
    '#title' => t('Check base URL on file import'),
    '#default_value' => variable_get('filelog_check_base_url', 1),
    '#description' => t('When enabled, only entries belonging to the current base URL will be imported.'),
  );
  $form['import'] = array(
    '#type' => 'fieldset',
    '#title' => t('Import / Re-import'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['import']['import_new'] = array(
    '#type' => 'submit',
    '#value' => t('Import new entries'),
    '#submit' => array(
      'filelog_ui_submit_import_new',
    ),
  );
  $form['import']['import_all'] = array(
    '#type' => 'submit',
    '#value' => t('Re-import all entries'),
    '#submit' => array(
      'filelog_ui_submit_import_all',
    ),
  );
  return system_settings_form($form);
}