From c12c43a415cbbe172687f888c1ae388b7f4e4451 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 27 Mar 2011 11:38:37 -0700 Subject: A little more work on kandsten's fix for IPv6 support in 10785b1e820c5e10d982c6b49125903886f7b889: - some style cleanup - bump the module version in module.info - rebuild the installer.sql --- modules/comment/helpers/comment_installer.php | 18 +++++++++--------- modules/comment/module.info | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'modules/comment') diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index cd20ef72..5c6bd586 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -64,15 +64,15 @@ class comment_installer { } if ($version == 3) { - /* - 40 bytes for server_remote_addr is enough to swallow the longest - representation of an IPv6 addy. - - 255 bytes for server_remote_host is enough to swallow the longest - legit DNS entry, with a few bytes to spare. - */ - $db->query("ALTER TABLE {comments} CHANGE `server_remote_addr` `server_remote_addr` varchar(40)"); - $db->query("ALTER TABLE {comments} CHANGE `server_remote_host` `server_remote_host` varchar(255)"); + // 40 bytes for server_remote_addr is enough to swallow the longest + // representation of an IPv6 addy. + // + // 255 bytes for server_remote_host is enough to swallow the longest + // legit DNS entry, with a few bytes to spare. + $db->query( + "ALTER TABLE {comments} CHANGE `server_remote_addr` `server_remote_addr` varchar(40)"); + $db->query( + "ALTER TABLE {comments} CHANGE `server_remote_host` `server_remote_host` varchar(255)"); module::set_version("comment", $version = 4); } } diff --git a/modules/comment/module.info b/modules/comment/module.info index cd34f140..e5aa454d 100644 --- a/modules/comment/module.info +++ b/modules/comment/module.info @@ -1,3 +1,3 @@ name = "Comments" description = "Allows users and guests to leave comments on photos and albums." -version = 3 +version = 4 -- cgit v1.2.3