Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5886
Modified Files:
Bayes.pm
Log Message:
By default the UI operates in Stealth Mode and X-POPFile-Link uses
"127.0.0.1". Some email clients (e.g. Eudora 6.x and 7.x) display
an annoying warning/confirmation message when this link is clicked.
The new bayes_localhostname configuration item is only used when the
UI is operating in Stealth Mode.
By default the bayes_localhostname configuration item is empty
so X-POPFile-Link will use "127.0.0.1"
bayes_localhostname can be used to specify a name which stops these
messages from being displayed. Eudora still displays these messages
if "localhost" is used because it expects to find at least one dot
in the name (e.g. it is happy with a name like "froggie.gremlin")
(patch #1430184, X-POPFile-Link improvements Mk2)
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.350
retrieving revision 1.351
diff -C2 -d -r1.350 -r1.351
*** Bayes.pm 20 Feb 2006 02:11:13 -0000 1.350
--- Bayes.pm 27 Feb 2006 12:24:49 -0000 1.351
***************
*** 222,225 ****
--- 222,232 ----
$self->config_( 'hostname', $self->{hostname__} );
+
+ # This parameter is used when the UI is operating in Stealth Mode.
+ # If left blank (the default setting) the X-POPFile-Link will use 127.0.0.1
+ # otherwise it will use this string instead. The system's HOSTS file should
+ # map the string to 127.0.0.1
+
+ $self->config_( 'localhostname', '' );
$self->mq_register_( 'COMIT', $self );
***************
*** 2513,2518 ****
my $xpl = $self->user_config_( 1, 'xpl_angle' )?'<':'';
$xpl .= "http://";
! $xpl .= $self->module_config_( 'html', 'local' )?"127.0.0.1":$self->config_( 'hostname' );
$xpl .= ":" . $self->module_config_( 'html', 'port' ) . "/jump_to_message?view=$slot";
--- 2520,2527 ----
my $xpl = $self->user_config_( 1, 'xpl_angle' )?'<':'';
+ my $xpl_localhost = ($self->config_( 'localhostname' ) eq '')?"127.0.0.1":$self->config_( 'localhostname' );
+
$xpl .= "http://";
! $xpl .= $self->module_config_( 'html', 'local' )?$xpl_localhost:$self->config_( 'hostname' );
$xpl .= ":" . $self->module_config_( 'html', 'port' ) . "/jump_to_message?view=$slot";
|