From 14b0d96870fca9cef9a8556eda1d107a19210af1 Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Sun, 26 Nov 2006 23:42:15 +0000 Subject: [PATCH] #98551 by sammys. The de facto standard for URL length is 2048 characters. So 128 isn't enough. --- modules/system/system.install | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/modules/system/system.install b/modules/system/system.install index ce05973a1fe..9bb327b5e99 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -537,7 +537,7 @@ function system_install() { message longtext NOT NULL, severity tinyint unsigned NOT NULL default '0', link varchar(255) NOT NULL default '', - location varchar(128) NOT NULL default '', + location text NOT NULL default '', referer varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '', timestamp int NOT NULL default '0', @@ -1002,7 +1002,7 @@ function system_install() { message text NOT NULL, severity smallint_unsigned NOT NULL default '0', link varchar(255) NOT NULL default '', - location varchar(128) NOT NULL default '', + location text NOT NULL default '', referer varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '', timestamp int NOT NULL default '0', @@ -3396,7 +3396,24 @@ function system_update_1015() { } /** - * @} End of "defgroup updates-4.7-to-x.x" + * Allow for longer URL encoded (%NN) UTF-8 characters in the location field of watchdog table. + */ +function system_update_1016() { + $ret = array(); + switch ($GLOBALS['db_type']) { + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {watchdog} CHANGE COLUMN location location text NOT NULL default ''"); + break; + case 'pgsql': + db_change_column($ret, 'watchdog', 'location', 'location', 'text', array('not null' => TRUE, 'default' => "''")); + break; + } + return $ret; +} + +/** + * @} End of "defgroup updates-4.7-to-5.0" */