Commit 0a5ec934 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#76588: Small fixes after that patch landed

 - typo fix in watchdog() phpdoc
 - add a missing array() on a watchdog call in ping.module
 - handle NULL 'variables' value in syslog module

Noticed these while writing the documentation for watchdog() updates and by comitting the updates into the i18n SVN repository.
parent 9a6099c2
...@@ -648,7 +648,7 @@ function request_uri() { ...@@ -648,7 +648,7 @@ function request_uri() {
* @param $message * @param $message
* The message to store in the log. See t() for documentation * The message to store in the log. See t() for documentation
* on how $message and $variables interact. Keep $message * on how $message and $variables interact. Keep $message
* translateable by not concatenating dynamic values into it! * translatable by not concatenating dynamic values into it!
* @param $variables * @param $variables
* Array of variables to replace in the message on display or * Array of variables to replace in the message on display or
* NULL if message is already translated or not possible to * NULL if message is already translated or not possible to
......
...@@ -52,7 +52,7 @@ function ping_ping($name = '', $url = '') { ...@@ -52,7 +52,7 @@ function ping_ping($name = '', $url = '') {
$result = xmlrpc('http://rpc.pingomatic.com', 'weblogUpdates.ping', $name, $url); $result = xmlrpc('http://rpc.pingomatic.com', 'weblogUpdates.ping', $name, $url);
if ($result === FALSE) { if ($result === FALSE) {
watchdog('directory ping', 'Failed to notify pingomatic.com (site).', WATCHDOG_WARNING); watchdog('directory ping', 'Failed to notify pingomatic.com (site).', array(), WATCHDOG_WARNING);
} }
} }
......
...@@ -98,8 +98,8 @@ function theme_syslog_format($entry) { ...@@ -98,8 +98,8 @@ function theme_syslog_format($entry) {
'@referer_uri' => $entry['referer'], '@referer_uri' => $entry['referer'],
'@uid' => $entry['user']->uid, '@uid' => $entry['user']->uid,
'@link' => strip_tags($entry['link']), '@link' => strip_tags($entry['link']),
// Keep message English, but replace variable components. // Keep message English, but replace variable components, if present.
'@message' => strip_tags(strtr($entry['message'], $entry['variables'])), '@message' => strip_tags(is_null($entry['variables']) ? $entry['message'] : strtr($entry['message'], $entry['variables'])),
)); ));
return $message; return $message;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment