summaryrefslogtreecommitdiff
path: root/modules/system/system.install
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 /modules/system/system.install
parentffe4dc84d449e601561b7128212daf9758b6d9b0 (diff)
downloadbrdo-f73610bec64dbc81b8e5031ac6778c5f539cb730.tar.gz
brdo-f73610bec64dbc81b8e5031ac6778c5f539cb730.tar.bz2
- Patch #76588 by Gabor: made log messages translatable. Yay.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install24
1 files changed, 22 insertions, 2 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index ab3bb09ba..334ff08c6 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -2353,7 +2353,7 @@ function system_update_159() {
}
else {
db_query('UPDATE {old_revisions} SET done = 1 WHERE nid = %d', $node->nid);
- watchdog('php', "Recovering old revisions for node $node->nid failed.", WATCHDOG_WARNING);
+ watchdog('php', "Recovering old revisions for node %nid failed.", array('%nid' => $node->nid), WATCHDOG_WARNING);
}
}
}
@@ -2583,7 +2583,7 @@ function system_update_169() {
$encoding = db_result(db_query('SHOW server_encoding'));
if (!in_array(strtolower($encoding), array('unicode', 'utf8'))) {
$msg = 'Your PostgreSQL database is set up with the wrong character encoding ('. $encoding .'). It is possible it will not work as expected. It is advised to recreate it with UTF-8/Unicode encoding. More information can be found in the <a href="http://www.postgresql.org/docs/7.4/interactive/multibyte.html">PostgreSQL documentation</a>.';
- watchdog('php', $msg, WATCHDOG_WARNING);
+ watchdog('php', $msg, array(), WATCHDOG_WARNING);
drupal_set_message($msg, 'status');
}
}
@@ -3778,6 +3778,26 @@ function system_update_6009() {
}
/**
+ * Add variable replacement for watchdog messages.
+ */
+function system_update_6009() {
+ $ret = array();
+ switch ($GLOBALS['db_type']) {
+ case 'pgsql':
+ db_add_column($ret, 'watchdog', 'variables', 'text', array('not null' => TRUE));
+ break;
+ case 'mysql':
+ case 'mysqli':
+ $ret[] = update_sql("ALTER TABLE {watchdog} ADD variables longtext NOT NULL");
+ break;
+ }
+ // Ensure we have 'N;' (serialize(NULL)) as the default, so existing
+ // log messages will not get translated in the new system.
+ $ret[] = update_sql("UPDATE {watchdog} SET variables = 'N;'");
+ return $ret;
+}
+
+/**
* @} End of "defgroup updates-5.x-to-6.x"
* The next series of updates should start at 7000.
*/