From f73610bec64dbc81b8e5031ac6778c5f539cb730 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 24 Apr 2007 13:53:15 +0000 Subject: - Patch #76588 by Gabor: made log messages translatable. Yay. --- includes/file.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'includes/file.inc') 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: !htaccess", array('%directory' => $directory, '!htaccess' => '
'. nl2br(check_plain($htaccess_lines)))); - form_set_error($form_item, $message); - watchdog('security', $message, WATCHDOG_ERROR); + $variables = array('%directory' => $directory, '!htaccess' => '
'. 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: !htaccess", $variables)); + watchdog('security', "Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: !htaccess", $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; } -- cgit v1.2.3