You are here

function photos_swfu_init in Album Photos 7.3

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

Implements hook_init().

File

photos_swfu/photos_swfu.module, line 315

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']]) ? check_plain($_POST['language']) : NULL;
    }
    $_FILES['Filedata']['name'] = transliteration_clean_filename($_FILES['Filedata']['name'], $langcode);
  }
}