You are here

function getid3_admin_settings_form in getID3() 6

Same name and namespace in other branches
  1. 7.2 getid3.admin.inc \getid3_admin_settings_form()
  2. 7 getid3.admin.inc \getid3_admin_settings_form()

Administration settings for getID3().

1 string reference to 'getid3_admin_settings_form'
getid3_menu in ./getid3.module
Implementation of hook_menu()

File

./getid3.admin.inc, line 11
Admin pages.

Code

function getid3_admin_settings_form() {
  $form['getid3_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Path'),
    '#default_value' => getid3_get_path(),
    '#description' => t('The location where getID3() is installed. Relative paths are from the Drupal root directory.'),
    '#after_build' => array(
      '_getid3_admin_settings_check_path',
    ),
  );
  if ($version = getid3_get_version()) {
    $form['getid3_version'] = array(
      '#type' => 'item',
      '#title' => t('Version'),
      '#value' => '<pre>' . check_plain($version) . '</pre>',
      '#description' => t("If you're seeing this it indicates that the getID3 library was found."),
    );

    // Check for existence of the 'demos' folder, contained in the getID3
    // library. The contents of this folder create a potential securtiy hole,
    // so we recommend that the user delete it.
    $getid3_demos_path = getid3_get_path() . '/../demos';
    if (file_exists($getid3_demos_path)) {
      drupal_set_message(t("Your getID3 library is insecure! The demos distributed with getID3 contains code which creates a huge security hole. Remove the demos directory (%path) from beneath Drupal's directory.", array(
        '%path' => realpath($getid3_demos_path),
      )), 'error');
    }
  }
  $form['getid3_show_warnings'] = array(
    '#type' => 'checkbox',
    '#title' => t("Display Warnings"),
    '#default_value' => variable_get('getid3_show_warnings', FALSE),
    '#description' => t("Check this to display the warning messages from the getID3 library when reading and writing ID3 tags. Generally it's a good idea to leave this unchecked, getID3 reports warnings for several trivial problems and the warnings can be confusing to users. This setting can be useful when debugging problems with the ID3 tags."),
  );
  return system_settings_form($form);
}