Not sure if this is a bug or not, but I'm having problems setting the Default image type in the Audio Settings (Images) page. No matter what I set it to, it defaults to "Other" (my 0x03 option) when I'm on the audio add form. My chosen default value does stick in my settings page (so it IS recording my choice to the db).

I did make a change in audio_image.inc, just to trim down the number of options. That portion of code now looks like:

function audio_image_type_clean_array($index = NULL) {
  $ret = array(
    0x00 => 'option1',
    0x01 => 'option2',
    0x02 => 'option3',
    0x03 => 'other'
  );
  return is_null($index) ? $ret : $ret[$index];
}

/**
 * Returns an array of all the different image types with "dirty" descriptions.
 *
 * @param $index
 *   Optional index into the array.
 * @return
 *   If $index is specified a string will be returned. If $index isn't
 *   specified an array of strings will be returned.
 */
function audio_image_type_dirty_array($index = NULL) {
  $ret = array(
    0x00 => t('Option 1'),
    0x01 => t('Option 2'),
    0x02 => t('Option 3'),
    0x03 => t('Other')
  );
  return is_null($index) ? $ret : $ret[$index];
}

Any ideas?

Comments

tj2653’s picture

I rolled back my audio_image.inc file to the original version, and it seems like that also defaults to the 0x03 option, no matter what default is selected in the settings.