summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-06-02 19:01:40 +0000
committerDries Buytaert <dries@buytaert.net>2004-06-02 19:01:40 +0000
commitc0b85a5721be04cec2f5e0d4a61200e43f2a9d92 (patch)
treed2ae2f9b01fa39fc0ad26f4821e033865dc51dd9 /includes
parentdfef5164b49fc79af58ab6e7a595add1b6dc7592 (diff)
downloadbrdo-c0b85a5721be04cec2f5e0d4a61200e43f2a9d92.tar.gz
brdo-c0b85a5721be04cec2f5e0d4a61200e43f2a9d92.tar.bz2
- Patch #4950 by Stefan (and Morbus): made watchdog messages translatable.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc8
-rw-r--r--includes/database.pear.inc4
2 files changed, 6 insertions, 6 deletions
diff --git a/includes/common.inc b/includes/common.inc
index f8ee497ca..254993075 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -4,7 +4,7 @@
/**
* @defgroup common Core functions
*/
-
+
/**
* @name Page title
* @ingroup common
@@ -263,7 +263,7 @@ function drupal_goto($url = NULL, $query = NULL, $fragment = NULL) {
*/
function drupal_not_found() {
header('HTTP/1.0 404 Not Found');
- watchdog('httpd', '404 error: "'. check_query($_GET['q']) .'" not found');
+ watchdog('httpd', t('404 error: "%page" not found', array('%page' => check_query($_GET["q"]))));
$path = drupal_get_normal_path(variable_get('site_404', ''));
$status = MENU_FALLTHROUGH;
@@ -424,7 +424,7 @@ function error_handler($errno, $message, $filename, $line, $variables) {
$entry = $types[$errno] .": $message in $filename on line $line.";
if ($errno & E_ALL ^ E_NOTICE) {
- watchdog("error", $types[$errno] .": $message in $filename on line $line.");
+ watchdog('error', t('%error: %message in %file on line %line.', array('%error' => $types[$errno], '%message' => $message, '%file' => $filename, '%line' => $line)));
if (error_reporting()) {
print "<pre>$entry</pre>";
}
@@ -631,7 +631,7 @@ function valid_input_data($data) {
$match += preg_match("/<\s*(applet|script|object|style|embed|form|blink|meta|html|frame|iframe|layer|ilayer|head|frameset|xml)/i", $data);
if ($match) {
- watchdog("warning", "terminated request because of suspicious input data: ". drupal_specialchars($data));
+ watchdog('warning', t('terminated request because of suspicious input data: %data', array('%data' => drupal_specialchars($data))));
return 0;
}
}
diff --git a/includes/database.pear.inc b/includes/database.pear.inc
index 8ab8b4072..860b51dad 100644
--- a/includes/database.pear.inc
+++ b/includes/database.pear.inc
@@ -130,7 +130,7 @@ function db_next_id($name) {
$name = db_prefix_tables($name);
$result = $active_db->nextID($name);
if (DB::isError($result)) {
- watchdog("error", "database: ". $result->getMessage() ."\nsequence table: $name");
+ watchdog('error', t('database: %db\nsequence table: %name', array('%db' => $result->getMessage(), '%name' => $name)));
}
else {
return $result;
@@ -183,7 +183,7 @@ function db_query_range($query) {
}
if (DB::isError($result)) {
- watchdog("error", "database: ". $result->getMessage() ."\nquery: ". htmlspecialchars($query));
+ watchdog('error', t('database: %db\nquery: %query', array('%db' => $result->getMessage(), '%query' => htmlspecialchars($query))));
}
else {
return $result;