diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 0f04056..24a8c9a 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -394,15 +394,16 @@ function locale_translate_delete_translation_files($langcode) { $files = locale_translate_get_interface_translation_files($langcode); if (!empty($files)) { foreach ($files as $file) { - $success = file_unmanaged_delete($files->uri); + $success = file_unmanaged_delete($file->uri); if (!$success) { return FALSE; } + // Remove the registered translation file if any. + db_delete('locale_file') + ->condition('langcode', $langcode) + ->coddition('uri', $file->uri) + ->execute(); } } - // Remove registered translation files. - db_delete('locale_file') - ->condition('langcode', $langcode) - ->execute(); return TRUE; }