# HG changeset patch
# User Dan
# Date 1200928646 18000
# Node ID fad9bb5c094b4f379df0caf941ace684be46ea17
# Parent e0787bb6285b7978f6665fe26133ca1764cbfb42
Implemented (well stubbed) IP logging in non-AJAX comment interface
diff -r e0787bb6285b -r fad9bb5c094b includes/pageutils.php
--- a/includes/pageutils.php Mon Jan 21 10:09:48 2008 -0500
+++ b/includes/pageutils.php Mon Jan 21 10:17:26 2008 -0500
@@ -1005,7 +1005,7 @@
if(!$e) $db->_die('The comment text data could not be selected.');
$num_app = $db->numrows();
$db->free_result();
- $lq = $db->sql_query('SELECT c.comment_id,c.subject,c.name,c.comment_data,c.approved,c.time,c.user_id,u.user_level,u.signature,u.user_has_avatar,u.avatar_type
+ $lq = $db->sql_query('SELECT c.comment_id,c.subject,c.name,c.comment_data,c.approved,c.time,c.user_id,c.ip_address,u.user_level,u.signature,u.user_has_avatar,u.avatar_type
FROM ' . table_prefix.'comments AS c
LEFT JOIN ' . table_prefix.'users AS u
ON c.user_id=u.user_id
@@ -1118,6 +1118,7 @@
$applink .= '';
$strings['MOD_APPROVE_LINK'] = $applink; unset($applink);
$strings['MOD_DELETE_LINK'] = '' . $lang->get('comment_btn_mod_delete') . '';
+ $strings['MOD_IP_LINK'] = '' . ( ( empty($row['ip_address']) ) ? $lang->get('comment_btn_mod_ip_missing') : $lang->get('comment_btn_mod_ip_notimplemented') ) . '';
// Signature
$strings['SIGNATURE'] = '';
diff -r e0787bb6285b -r fad9bb5c094b language/english/core.json
--- a/language/english/core.json Mon Jan 21 10:09:48 2008 -0500
+++ b/language/english/core.json Mon Jan 21 10:17:26 2008 -0500
@@ -123,6 +123,7 @@
btn_mod_delete: 'Delete',
btn_mod_ip_logged: 'View IP',
btn_mod_ip_missing: 'IP not logged',
+ btn_mod_ip_notimplemented: 'Use AJAX interface to view IPs',
btn_save: 'save',
msg_comment_posted: 'Your comment has been posted. If it does not appear right away, it is probably awaiting approval.',