summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-04-24 13:53:15 +0000
committerDries Buytaert <dries@buytaert.net>2007-04-24 13:53:15 +0000
commitf73610bec64dbc81b8e5031ac6778c5f539cb730 (patch)
tree473284ff160a3ea8818c90d84043cac13bf336af /includes/file.inc
parentffe4dc84d449e601561b7128212daf9758b6d9b0 (diff)
downloadbrdo-f73610bec64dbc81b8e5031ac6778c5f539cb730.tar.gz
brdo-f73610bec64dbc81b8e5031ac6778c5f539cb730.tar.bz2
- Patch #76588 by Gabor: made log messages translatable. Yay.
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 7e70ed882..1673b75da 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -107,7 +107,7 @@ function file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
}
else {
form_set_error($form_item, t('The directory %directory is not writable', array('%directory' => $directory)));
- watchdog('file system', t('The directory %directory is not writable, because it does not have the correct permissions set.', array('%directory' => $directory)), WATCHDOG_ERROR);
+ watchdog('file system', 'The directory %directory is not writable, because it does not have the correct permissions set.', array('%directory' => $directory), WATCHDOG_ERROR);
return FALSE;
}
}
@@ -119,9 +119,9 @@ function file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
chmod($directory .'/.htaccess', 0664);
}
else {
- $message = t("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: <code>!htaccess</code>", array('%directory' => $directory, '!htaccess' => '<br />'. nl2br(check_plain($htaccess_lines))));
- form_set_error($form_item, $message);
- watchdog('security', $message, WATCHDOG_ERROR);
+ $variables = array('%directory' => $directory, '!htaccess' => '<br />'. nl2br(check_plain($htaccess_lines)));
+ form_set_error($form_item, t("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: <code>!htaccess</code>", $variables));
+ watchdog('security', "Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: <code>!htaccess</code>", $variables, WATCHDOG_ERROR);
}
}
@@ -239,7 +239,7 @@ function file_check_upload($source = 'upload') {
// This overcomes open_basedir restrictions for future file operations.
if (!move_uploaded_file($_FILES["files"]["tmp_name"][$source], $file->filepath)) {
drupal_set_message(t('File upload error. Could not move uploaded file.'));
- watchdog('file', t('Upload Error. Could not move uploaded file (%file) to destination (%destination).', array('%file' => $_FILES["files"]["tmp_name"][$source], '%destination' => $file->filepath)));
+ watchdog('file', 'Upload Error. Could not move uploaded file (%file) to destination (%destination).', array('%file' => $_FILES["files"]["tmp_name"][$source], '%destination' => $file->filepath));
return FALSE;
}
@@ -320,7 +320,7 @@ function file_copy(&$source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
if ($basename === FALSE) {
$source = is_object($source) ? $source->filepath : $source;
drupal_set_message(t('The selected file %file could not be uploaded, because the destination %directory is not properly configured.', array('%file' => $source, '%directory' => $dest)), 'error');
- watchdog('file system', t('The selected file %file could not be uploaded, because the destination %directory could not be found, or because its permissions do not allow the file to be written.', array('%file' => $source, '%directory' => $dest)), WATCHDOG_ERROR);
+ watchdog('file system', 'The selected file %file could not be uploaded, because the destination %directory could not be found, or because its permissions do not allow the file to be written.', array('%file' => $source, '%directory' => $dest), WATCHDOG_ERROR);
return 0;
}