You are here

function photos_swfu_init in Album Photos 6.2

Same name and namespace in other branches
  1. 7.3 photos_swfu/photos_swfu.module \photos_swfu_init()

File

photos_swfu/photos_swfu.module, line 214

Code

function photos_swfu_init() {
  if (!empty($_FILES['Filedata']) && module_exists('transliteration')) {
    require_once drupal_get_path('module', 'transliteration') . '/transliteration.inc';
    $langcode = NULL;
    if (!empty($_POST['language'])) {
      $languages = language_list();
      $langcode = isset($languages[$_POST['language']]) ? $_POST['language'] : NULL;
    }
    $_FILES['Filedata']['name'] = transliteration_clean_filename($_FILES['Filedata']['name'], $langcode);
  }
}