You are here

function l10n_update_ensure_htaccess in Localization update 7.2

Same name and namespace in other branches
  1. 6 l10n_update.module \l10n_update_ensure_htaccess()
  2. 7 l10n_update.module \l10n_update_ensure_htaccess()

Creates a .htaccess file in the translations directory if it is missing.

Parameters

string $directory: The translations directory to create the file in. Defaults to the directory of the 'translations://' wrapper.

5 calls to l10n_update_ensure_htaccess()
l10n_update_admin_settings_form_submit in ./l10n_update.admin.inc
Submit handler for translation update settings.
l10n_update_install in ./l10n_update.install
Implements hook_install().
l10n_update_requirements in ./l10n_update.install
Implements hook_requirements().
l10n_update_update_7210 in ./l10n_update.install
Add a .htaccess file to the translations directory.
_l10n_update_fetch_operations in ./l10n_update.fetch.inc
Helper function to construct the batch operations to fetch translations.

File

./l10n_update.module, line 813
Download translations from remote localization server.

Code

function l10n_update_ensure_htaccess($directory = '') {
  $directory = empty($directory) ? 'translations://' : $directory;
  file_create_htaccess($directory, FALSE);
}