as a quick and dirty fix, I have modified the functions.php file :
I have indicated the lines that were added or modified :
function post_notification_get_mailurl($addr, $code = ''){
GLOBAL $wpdb;
//added by Peter Van Eeckhoutte
$remip=ip2long($S_SERVER['REMOTE_ADDR']);
if ($remip == '')
{
$remip=0;
}
if ($remip < 0)
{
$remip=$remip * -1;
}
//end add
if(strlen($code) != 32){
$t_emails = $wpdb->prefix . 'post_notification_emails';
$query = $wpdb->get_results("SELECT id, act_code FROM $t_emails WHERE email_addr = '" . $wpdb->escape($addr) . "'");
$query = $query[0];
$debug .= "\n--DB-Debug--\n";
$debug .= "ip: $remip\n";
//Get Activation Code
if (($query->id == '') || (strlen($query->act_code) != 32)) { //Reuse the code
mt_srand((double) microtime() * 1000000);
$code = md5(mt_rand(100000, 99999999) . time());
$debug .= "code: $code\n";
if($query->id == ''){
//$ip = ip2long($_SERVER['REMOTE_ADDR']);
$ip=$remip;
$debug .="ip: $ip\n";
if($ip===false) $ip = -1; //This has changed with php 5
$debug .= "query: INSERT INTO $t_emails (email_addr,date_subscribed, act_code, subscribe_ip) ". "VALUES ('" . $wpdb->escape($addr) . "','" . post_notification_date2mysql() ."', '$code', " . $remip . ")\n";
//modified insert statement, replace ip2Long function with $remip - modified by Peter Van Eeckhoutte
$tmp=$wpdb->query(
"INSERT INTO $t_emails (email_addr,date_subscribed, act_code, subscribe_ip) ". "VALUES ('" . $wpdb->escape($addr) . "','" . post_notification_date2mysql() ."', '$code', " . $remip . ")");
//modified insert statement, replace ip2Long function with $remip - modified by Peter Van Eeckhoutte
var_dump($tmp);
} else {
$debug .= "--Update--\n";
$wpdb->query(
"UPDATE $t_emails SET act_code = '$code' WHERE email_addr = '" . $wpdb->escape($addr) . "'");
}
} else {
$debug .= "--Indb--\n";
$code = $query->act_code;
}
$debug .= "--DB-Debug-End--\n";
}
//Adjust the URL
$debug .= "run";
$confurl = post_notification_get_link();
if(strpos($confurl, '/?') || strpos($confurl, 'index.php?')) $confurl .= '&';
else $confurl .= '?';
$confurl .= "code=$code&addr=$addr&";
//disabled the following line - modified by Peter Van Eeckhoutte
//$confurl .= "debug=$debug";
return $confurl;
}