summaryrefslogtreecommitdiff
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
parentdfef5164b49fc79af58ab6e7a595add1b6dc7592 (diff)
downloadbrdo-c0b85a5721be04cec2f5e0d4a61200e43f2a9d92.tar.gz
brdo-c0b85a5721be04cec2f5e0d4a61200e43f2a9d92.tar.bz2
- Patch #4950 by Stefan (and Morbus): made watchdog messages translatable.
-rw-r--r--cron.php2
-rw-r--r--includes/common.inc8
-rw-r--r--includes/database.pear.inc4
-rw-r--r--modules/aggregator.module8
-rw-r--r--modules/aggregator/aggregator.module8
-rw-r--r--modules/blogapi.module4
-rw-r--r--modules/blogapi/blogapi.module4
-rw-r--r--modules/book.module4
-rw-r--r--modules/book/book.module4
-rw-r--r--modules/comment.module12
-rw-r--r--modules/comment/comment.module12
-rw-r--r--modules/drupal.module4
-rw-r--r--modules/drupal/drupal.module4
-rw-r--r--modules/node.module6
-rw-r--r--modules/node/node.module6
-rw-r--r--modules/ping.module8
-rw-r--r--modules/ping/ping.module8
-rw-r--r--modules/queue.module10
-rw-r--r--modules/search.module2
-rw-r--r--modules/search/search.module2
-rw-r--r--modules/throttle.module4
-rw-r--r--modules/throttle/throttle.module4
22 files changed, 64 insertions, 64 deletions
diff --git a/cron.php b/cron.php
index 70aee47fd..6b22941f5 100644
--- a/cron.php
+++ b/cron.php
@@ -18,5 +18,5 @@ if (!ini_get("safe_mode")) {
module_invoke_all("cron");
-watchdog("regular", "cron run completed");
+watchdog('regular', t('cron run completed'));
?>
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;
diff --git a/modules/aggregator.module b/modules/aggregator.module
index c5f32b1b5..f82f5ea27 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -290,7 +290,7 @@ function aggregator_refresh($feed) {
break;
case 301:
$feed['url'] = $result->redirect_url;
- watchdog('special', "aggregator: updated URL for feed \"$feed[title]\" to $feed[url]");
+ watchdog('special', t('aggregator: updated URL for feed "%title" to %url', array('%title' => $feed[title], '%url' => $feed[url])));
case 200:
case 302:
case 307:
@@ -328,14 +328,14 @@ function aggregator_refresh($feed) {
cache_clear_all();
+ watchdog('regular', t('aggregator: syndicated content from "%site"', array('%site' => $feed[title])));
$message = t('syndicated content from "%site".', array('%site' => $feed['title']));
- watchdog('regular', "aggregator: $message");
drupal_set_message($message);
}
break;
default:
+ watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)));
$message = t('failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error));
- watchdog('error', "aggregator: $message");
drupal_set_message($message);
}
}
@@ -355,8 +355,8 @@ function aggregator_parse_feed(&$data, $feed) {
xml_set_character_data_handler($xml_parser, 'aggregator_element_data');
if (!xml_parse($xml_parser, $data, 1)) {
+ watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))));
$message = t('failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser)));
- watchdog('error', "aggregator: $message");
drupal_set_message($message, 'error');
return 0;
}
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index c5f32b1b5..f82f5ea27 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -290,7 +290,7 @@ function aggregator_refresh($feed) {
break;
case 301:
$feed['url'] = $result->redirect_url;
- watchdog('special', "aggregator: updated URL for feed \"$feed[title]\" to $feed[url]");
+ watchdog('special', t('aggregator: updated URL for feed "%title" to %url', array('%title' => $feed[title], '%url' => $feed[url])));
case 200:
case 302:
case 307:
@@ -328,14 +328,14 @@ function aggregator_refresh($feed) {
cache_clear_all();
+ watchdog('regular', t('aggregator: syndicated content from "%site"', array('%site' => $feed[title])));
$message = t('syndicated content from "%site".', array('%site' => $feed['title']));
- watchdog('regular', "aggregator: $message");
drupal_set_message($message);
}
break;
default:
+ watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)));
$message = t('failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error));
- watchdog('error', "aggregator: $message");
drupal_set_message($message);
}
}
@@ -355,8 +355,8 @@ function aggregator_parse_feed(&$data, $feed) {
xml_set_character_data_handler($xml_parser, 'aggregator_element_data');
if (!xml_parse($xml_parser, $data, 1)) {
+ watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))));
$message = t('failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser)));
- watchdog('error', "aggregator: $message");
drupal_set_message($message, 'error');
return 0;
}
diff --git a/modules/blogapi.module b/modules/blogapi.module
index 83f2c9494..8d5fa3089 100644
--- a/modules/blogapi.module
+++ b/modules/blogapi.module
@@ -142,7 +142,7 @@ function blogapi_new_post($req_params) {
$nid = node_save($node);
if ($nid) {
- watchdog('special', "$node->type: added '$node->title' using blog API", l(t('view post'), "node/view/$nid"));
+ watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/view/$nid"));
return new xmlrpcresp(new xmlrpcval($nid, 'string'));
}
@@ -202,7 +202,7 @@ function blogapi_edit_post($req_params) {
}
$nid = node_save($node);
if ($nid) {
- watchdog('special', "$node->type: updated '$node->title' using blog API", l(t('view post'), "node/view/$nid"));
+ watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/view/$nid"));
return new xmlrpcresp(new xmlrpcval(true, 'boolean'));
}
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 83f2c9494..8d5fa3089 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -142,7 +142,7 @@ function blogapi_new_post($req_params) {
$nid = node_save($node);
if ($nid) {
- watchdog('special', "$node->type: added '$node->title' using blog API", l(t('view post'), "node/view/$nid"));
+ watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/view/$nid"));
return new xmlrpcresp(new xmlrpcval($nid, 'string'));
}
@@ -202,7 +202,7 @@ function blogapi_edit_post($req_params) {
}
$nid = node_save($node);
if ($nid) {
- watchdog('special', "$node->type: updated '$node->title' using blog API", l(t('view post'), "node/view/$nid"));
+ watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/view/$nid"));
return new xmlrpcresp(new xmlrpcval(true, 'boolean'));
}
diff --git a/modules/book.module b/modules/book.module
index f499db81c..7a36a03d2 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -837,8 +837,8 @@ function book_admin_save($nid, $edit = array()) {
}
}
- $message = t("updated book '%title'", array("%title" => $book->title));
- watchdog("special", $message);
+ $message = t('updated book "%title"', array('%title' => $book->title));
+ watchdog('special', $message);
return $message;
}
diff --git a/modules/book/book.module b/modules/book/book.module
index f499db81c..7a36a03d2 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -837,8 +837,8 @@ function book_admin_save($nid, $edit = array()) {
}
}
- $message = t("updated book '%title'", array("%title" => $book->title));
- watchdog("special", $message);
+ $message = t('updated book "%title"', array('%title' => $book->title));
+ watchdog('special', $message);
return $message;
}
diff --git a/modules/comment.module b/modules/comment.module
index 03ab6b0b8..c9fe6f44b 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -332,7 +332,7 @@ function comment_post($edit) {
$duplicate = db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND nid = %d AND subject = '%s' AND comment = '%s'", $edit["pid"], $edit["nid"], $edit['subject'], $edit['comment']), 0);
if ($duplicate != 0) {
- watchdog("warning", "comment: duplicate '". $edit['subject'] ."'");
+ watchdog('warning', t('comment: duplicate "%comment-subject"', array('%comment-subject' => $edit["subject"])));
}
if ($edit["cid"]) {
@@ -354,7 +354,7 @@ function comment_post($edit) {
** Add entry to the watchdog log:
*/
- watchdog("special", "comment: updated '". $edit['subject'] ."'", l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
+ watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit["subject"])), l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
}
else {
/*
@@ -472,7 +472,7 @@ function comment_post($edit) {
** Add entry to the watchdog log:
*/
- watchdog("special", "comment: added '". $edit['subject'] ."'", l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
+ watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit["subject"])), l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
}
@@ -500,7 +500,7 @@ function comment_post($edit) {
}
}
else {
- watchdog("error", "comment: unauthorized comment submitted or comment submitted to a closed node '". $edit['subject'] ."'");
+ watchdog('error', t('comment: unauthorized comment submitted or comment submitted to a closed node "%comment-subject"', array('%comment-subject' => $edit["subject"])));
}
}
@@ -947,7 +947,7 @@ function comment_admin_edit($id) {
function _comment_delete_thread($comment) {
// Delete the comment:
db_query("DELETE FROM {comments} WHERE cid = %d", $comment->cid);
- watchdog("special", "comment: deleted '$comment->subject'");
+ watchdog('special', t('comment: deleted "%comment-subject"', array('%comment-subject' => $comment->subject)));
// Delete the comment's replies:
$result = db_query("SELECT cid, subject FROM {comments} WHERE pid = %d", $comment->cid);
@@ -997,7 +997,7 @@ function comment_delete($cid, $confirmed = 0) {
function comment_save($id, $edit) {
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d WHERE cid = %d", $edit['subject'], $edit['comment'], $edit['status'], $id);
- watchdog("special", "comment: modified '". $edit['subject'] ."'");
+ watchdog('special', t('comment: modified "%comment-subject"', array('%comment-subject' => $edit["subject"])));
drupal_set_message(t("the comment has been saved."));
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 03ab6b0b8..c9fe6f44b 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -332,7 +332,7 @@ function comment_post($edit) {
$duplicate = db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND nid = %d AND subject = '%s' AND comment = '%s'", $edit["pid"], $edit["nid"], $edit['subject'], $edit['comment']), 0);
if ($duplicate != 0) {
- watchdog("warning", "comment: duplicate '". $edit['subject'] ."'");
+ watchdog('warning', t('comment: duplicate "%comment-subject"', array('%comment-subject' => $edit["subject"])));
}
if ($edit["cid"]) {
@@ -354,7 +354,7 @@ function comment_post($edit) {
** Add entry to the watchdog log:
*/
- watchdog("special", "comment: updated '". $edit['subject'] ."'", l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
+ watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit["subject"])), l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
}
else {
/*
@@ -472,7 +472,7 @@ function comment_post($edit) {
** Add entry to the watchdog log:
*/
- watchdog("special", "comment: added '". $edit['subject'] ."'", l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
+ watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit["subject"])), l(t("view comment"), "node/view/". $edit["nid"], NULL, NULL, "comment-". $edit["cid"]));
}
@@ -500,7 +500,7 @@ function comment_post($edit) {
}
}
else {
- watchdog("error", "comment: unauthorized comment submitted or comment submitted to a closed node '". $edit['subject'] ."'");
+ watchdog('error', t('comment: unauthorized comment submitted or comment submitted to a closed node "%comment-subject"', array('%comment-subject' => $edit["subject"])));
}
}
@@ -947,7 +947,7 @@ function comment_admin_edit($id) {
function _comment_delete_thread($comment) {
// Delete the comment:
db_query("DELETE FROM {comments} WHERE cid = %d", $comment->cid);
- watchdog("special", "comment: deleted '$comment->subject'");
+ watchdog('special', t('comment: deleted "%comment-subject"', array('%comment-subject' => $comment->subject)));
// Delete the comment's replies:
$result = db_query("SELECT cid, subject FROM {comments} WHERE pid = %d", $comment->cid);
@@ -997,7 +997,7 @@ function comment_delete($cid, $confirmed = 0) {
function comment_save($id, $edit) {
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d WHERE cid = %d", $edit['subject'], $edit['comment'], $edit['status'], $id);
- watchdog("special", "comment: modified '". $edit['subject'] ."'");
+ watchdog('special', t('comment: modified "%comment-subject"', array('%comment-subject' => $edit["subject"])));
drupal_set_message(t("the comment has been saved."));
}
diff --git a/modules/drupal.module b/modules/drupal.module
index 526e9aefa..9c05beaca 100644
--- a/modules/drupal.module
+++ b/modules/drupal.module
@@ -90,7 +90,7 @@ function drupal_directory_ping($arguments) {
db_query("DELETE FROM {directory} WHERE link = '%s' OR mail = '%s'", $link, $mail);
db_query("INSERT INTO {directory} (link, name, mail, slogan, mission, timestamp) VALUES ('%s', '%s', '%s', '%s', '%s', %d)", $link, $name, $mail, $slogan, $mission, time());
- watchdog('regular', "directory: ping from \"$name\" ($link)");
+ watchdog('regular', t('directory: ping from "%name" (%link)', array('%name' => $name, '%link' => $link)));
return new xmlrpcresp(new xmlrpcval(1, 'int'));
}
@@ -138,7 +138,7 @@ function drupal_notify($server) {
$result = $client->send($message, 5);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "'. $url['host'] .'" at "'. $url['path'] .'": '. $result->faultString());
+ watchdog('error', t('failed to notify "%url" at "%path": %error', array('%url' => $url["host"], '%path' => $url["path"], '%error' => $result->faultString())));
}
}
diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module
index 526e9aefa..9c05beaca 100644
--- a/modules/drupal/drupal.module
+++ b/modules/drupal/drupal.module
@@ -90,7 +90,7 @@ function drupal_directory_ping($arguments) {
db_query("DELETE FROM {directory} WHERE link = '%s' OR mail = '%s'", $link, $mail);
db_query("INSERT INTO {directory} (link, name, mail, slogan, mission, timestamp) VALUES ('%s', '%s', '%s', '%s', '%s', %d)", $link, $name, $mail, $slogan, $mission, time());
- watchdog('regular', "directory: ping from \"$name\" ($link)");
+ watchdog('regular', t('directory: ping from "%name" (%link)', array('%name' => $name, '%link' => $link)));
return new xmlrpcresp(new xmlrpcval(1, 'int'));
}
@@ -138,7 +138,7 @@ function drupal_notify($server) {
$result = $client->send($message, 5);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "'. $url['host'] .'" at "'. $url['path'] .'": '. $result->faultString());
+ watchdog('error', t('failed to notify "%url" at "%path": %error', array('%url' => $url["host"], '%path' => $url["path"], '%error' => $result->faultString())));
}
}
diff --git a/modules/node.module b/modules/node.module
index 1aadba70b..117e2e8a8 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1422,7 +1422,7 @@ function node_submit($node) {
if (node_access('update', $node)) {
$node->nid = node_save($node);
- watchdog('special', "$node->type: updated '$node->title'", l(t('view post'), "node/view/$node->nid"));
+ watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/view/$node->nid"));
$msg = t('the %name was updated.', array ('%name' => node_invoke($node, 'node_name')));
}
}
@@ -1435,7 +1435,7 @@ function node_submit($node) {
if (node_access('create', $node)) {
$node->nid = node_save($node);
- watchdog('special', "$node->type: added '$node->title'", l(t('view post'), "node/view/$node->nid"));
+ watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node->title' => $node->title)), l(t('view post'), "node/view/$node->nid"));
$msg = t('your %name was created.', array ('%name' => node_invoke($node, 'node_name')));
}
}
@@ -1474,7 +1474,7 @@ function node_delete($edit) {
cache_clear_all();
- watchdog('special', "$node->type: deleted '$node->title'");
+ watchdog('special', t('%node-type: deleted "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)));
$output = t('The node has been deleted.');
}
else {
diff --git a/modules/node/node.module b/modules/node/node.module
index 1aadba70b..117e2e8a8 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1422,7 +1422,7 @@ function node_submit($node) {
if (node_access('update', $node)) {
$node->nid = node_save($node);
- watchdog('special', "$node->type: updated '$node->title'", l(t('view post'), "node/view/$node->nid"));
+ watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/view/$node->nid"));
$msg = t('the %name was updated.', array ('%name' => node_invoke($node, 'node_name')));
}
}
@@ -1435,7 +1435,7 @@ function node_submit($node) {
if (node_access('create', $node)) {
$node->nid = node_save($node);
- watchdog('special', "$node->type: added '$node->title'", l(t('view post'), "node/view/$node->nid"));
+ watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node->title' => $node->title)), l(t('view post'), "node/view/$node->nid"));
$msg = t('your %name was created.', array ('%name' => node_invoke($node, 'node_name')));
}
}
@@ -1474,7 +1474,7 @@ function node_delete($edit) {
cache_clear_all();
- watchdog('special', "$node->type: deleted '$node->title'");
+ watchdog('special', t('%node-type: deleted "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)));
$output = t('The node has been deleted.');
}
else {
diff --git a/modules/ping.module b/modules/ping.module
index ac73fea93..4e363bb11 100644
--- a/modules/ping.module
+++ b/modules/ping.module
@@ -63,7 +63,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "weblogs.com" (site)');
+ watchdog('error', t('failed to notify "weblogs.com" (site)'));
}
unset($client);
@@ -75,7 +75,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "weblogs.com" (RSS)');
+ watchdog('error', t('failed to notify "weblogs.com" (RSS)'));
}
unset($client);
@@ -87,7 +87,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "blo.gs" ');
+ watchdog('error', t('failed to notify "blo.gs"'));
}
unset($client);
@@ -99,7 +99,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "technorati.com"');
+ watchdog('error', t('failed to notify "technorati.com"'));
}
}
?>
diff --git a/modules/ping/ping.module b/modules/ping/ping.module
index ac73fea93..4e363bb11 100644
--- a/modules/ping/ping.module
+++ b/modules/ping/ping.module
@@ -63,7 +63,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "weblogs.com" (site)');
+ watchdog('error', t('failed to notify "weblogs.com" (site)'));
}
unset($client);
@@ -75,7 +75,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "weblogs.com" (RSS)');
+ watchdog('error', t('failed to notify "weblogs.com" (RSS)'));
}
unset($client);
@@ -87,7 +87,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "blo.gs" ');
+ watchdog('error', t('failed to notify "blo.gs"'));
}
unset($client);
@@ -99,7 +99,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', 'failed to notify "technorati.com"');
+ watchdog('error', t('failed to notify "technorati.com"'));
}
}
?>
diff --git a/modules/queue.module b/modules/queue.module
index 803f5d70e..fba8ccd7f 100644
--- a/modules/queue.module
+++ b/modules/queue.module
@@ -73,30 +73,30 @@ function queue_vote($node, $vote) {
$node->moderate = 0;
$node->promote = 1;
node_save($node);
- watchdog("special", "moderation: approved '$node->title'");
+ watchdog('special', t('moderation: approved "%node-title"', array('%node-title' => $node->title)));
}
else if (variable_get("queue_threshold_dump", -2) >= $node->score) {
if ($node->revisions) {
node_revision_rollback($node, end(node_revision_list($node)));
- watchdog("special", "moderation: declined '$node->title' (rollback)");
+ watchdog('special', t('moderation: declined "%node-title" (rollback)', array('%node-title' => $node->title)));
}
else {
$node->moderate = 0;
$node->status = 0;
node_save($node);
- watchdog("special", "moderation: declined '$node->title'");
+ watchdog('special', t('moderation: declined "%node-title"', array('%node-title' => $node->title)));
}
}
else if (variable_get("queue_threshold_expire", 8) <= $node->votes) {
if ($node->revisions) {
node_revision_rollback($node, end(node_revision_list($node)));
- watchdog("special", "moderation: expired '$node->title' (rollback)");
+ watchdog('special', t('moderation: expired "%node-title" (rollback)', array('%node-title' => $node->title)));
}
else {
$node->moderate = 0;
$node->status = 0;
node_save($node);
- watchdog("special", "moderation: expired '$node->title'");
+ watchdog('special', t('moderation: expired "%node-title"', array('%node-title' => $node->title)));
}
}
}
diff --git a/modules/search.module b/modules/search.module
index 790fcca77..6503d10bd 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -342,7 +342,7 @@ function search_view($keys) {
// Only perform search if there is non-whitespace search term:
if (trim($keys)) {
// Log the search keys:
- watchdog("search", "search: '$keys'", l("view results", "search", NULL, "keys=". urlencode($keys)));
+ watchdog('search', t('search: "%keys"', array('%keys' => $keys)), l("view results", "search", NULL, "keys=". urlencode($keys)));
// Collect the search results:
$results = search_data($keys);
diff --git a/modules/search/search.module b/modules/search/search.module
index 790fcca77..6503d10bd 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -342,7 +342,7 @@ function search_view($keys) {
// Only perform search if there is non-whitespace search term:
if (trim($keys)) {
// Log the search keys:
- watchdog("search", "search: '$keys'", l("view results", "search", NULL, "keys=". urlencode($keys)));
+ watchdog('search', t('search: "%keys"', array('%keys' => $keys)), l("view results", "search", NULL, "keys=". urlencode($keys)));
// Collect the search results:
$results = search_data($keys);
diff --git a/modules/throttle.module b/modules/throttle.module
index 7af30a89a..1dd8f0ed9 100644
--- a/modules/throttle.module
+++ b/modules/throttle.module
@@ -175,11 +175,11 @@ function _throttle_update($hits) {
// log the change
if ($throttle_new < $throttle) {
variable_set('throttle_level', $throttle - 1);
- watchdog($type, 'throttle: $hits hits in past minute; throttle decreased to level '. ($throttle - 1));
+ watchdog($type, t('throttle: %hits hits in past minute; throttle decreased to level %level', array('%hits' => $hits, '%level' => ($throttle - 1))));
}
if ($throttle_new > $throttle) {
variable_set('throttle_level', $throttle + 1);
- watchdog($type, 'throttle: $hits hits in past minute; throttle increased to level '. ($throttle + 1));
+ watchdog($type, t('throttle: %hits hits in past minute; throttle increased to level %level', array('%hits' => $hits, '%level' => ($throttle + 1))));
}
}
diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module
index 7af30a89a..1dd8f0ed9 100644
--- a/modules/throttle/throttle.module
+++ b/modules/throttle/throttle.module
@@ -175,11 +175,11 @@ function _throttle_update($hits) {
// log the change
if ($throttle_new < $throttle) {
variable_set('throttle_level', $throttle - 1);
- watchdog($type, 'throttle: $hits hits in past minute; throttle decreased to level '. ($throttle - 1));
+ watchdog($type, t('throttle: %hits hits in past minute; throttle decreased to level %level', array('%hits' => $hits, '%level' => ($throttle - 1))));
}
if ($throttle_new > $throttle) {
variable_set('throttle_level', $throttle + 1);
- watchdog($type, 'throttle: $hits hits in past minute; throttle increased to level '. ($throttle + 1));
+ watchdog($type, t('throttle: %hits hits in past minute; throttle increased to level %level', array('%hits' => $hits, '%level' => ($throttle + 1))));
}
}