[vhffs-dev] [825] Moved www-archives from listengine to mailinglist and renamed it url_archives |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 825
Author: gradator
Date: 2007-08-30 04:50:41 +0000 (Thu, 30 Aug 2007)
Log Message:
-----------
Moved www-archives from listengine to mailinglist and renamed it url_archives
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Conf.pm
trunk/vhffs-backend/conf/vhffs.conf.dist.in
trunk/vhffs-listengine/src/listengine.pl
trunk/vhffs-public/group.pl
trunk/vhffs-tests/conf/vhffs.conf
Modified: trunk/vhffs-api/src/Vhffs/Conf.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Conf.pm 2007-08-30 04:27:42 UTC (rev 824)
+++ trunk/vhffs-api/src/Vhffs/Conf.pm 2007-08-30 04:50:41 UTC (rev 825)
@@ -746,15 +746,6 @@
return undef;
}
-sub get_www_archives
-{
- if( defined $Config{"services"}{"listengine"}{"www-archives"} )
- {
- return( $Config{"services"}{"listengine"}{"www-archives"} );
- }
-}
-
-
sub get_moderation
{
if( ( defined $Config{"global"}{"moderation"} ) && ( $Config{"global"}{"moderation"} eq 'yes' ) )
Modified: trunk/vhffs-backend/conf/vhffs.conf.dist.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-30 04:27:42 UTC (rev 824)
+++ trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-30 04:50:41 UTC (rev 825)
@@ -336,6 +336,8 @@
default_domain = lists.vhffs.org
+ url_archives = http://localhost/listengine
+
# URL to the documentation (optional)
url_doc = http://help.myhoster.net/ml
</mailinglist>
@@ -366,9 +368,6 @@
#SMTP Server to bounce listengine mails
smtp_server = "localhost"
-
- #Url of archives
- www-archives = http://localhost/listengine
</listengine>
</services>
Modified: trunk/vhffs-listengine/src/listengine.pl
===================================================================
--- trunk/vhffs-listengine/src/listengine.pl 2007-08-30 04:27:42 UTC (rev 824)
+++ trunk/vhffs-listengine/src/listengine.pl 2007-08-30 04:50:41 UTC (rev 825)
@@ -72,6 +72,7 @@
{
my $header = shift;
my $list = shift;
+ my $mailinglistconfig = $vhffs->get_config->get_service('mailinglist');
$header->replace( 'List-Unsubscribe' ,"<mailto:".$list->get_localpart."-request"."\@".$list->get_domain."?subject=unsubscribe>" );
$header->replace( 'List-Subscribe' ,"<mailto:".$list->get_localpart."-request"."\@".$list->get_domain."?subject=subscribe>" );
@@ -79,7 +80,7 @@
$header->replace( 'List-Software' ,"Listengine 4.1, VHFFS 4.1" );
$header->replace( 'List-Id' , $list->get_localpart.".".$list->get_domain );
$header->replace( 'List-Post' , '<mailto:'.$list->get_localpart."@".$list->get_domain.'>' );
- $header->replace( 'List-Archive' , '<'.$vhffs->get_config->get_www_archives.'/'.$list->get_domain.'/'.$list->get_localpart.'>' ) if( $list->get_open_archive );
+ $header->replace( 'List-Archive' , '<'.$mailinglistconfig->{'url_archives'}.'/'.$list->get_domain.'/'.$list->get_localpart.'>' ) if( $mailinglistconfig->{'url_archives'} );
}
Modified: trunk/vhffs-public/group.pl
===================================================================
--- trunk/vhffs-public/group.pl 2007-08-30 04:27:42 UTC (rev 824)
+++ trunk/vhffs-public/group.pl 2007-08-30 04:50:41 UTC (rev 825)
@@ -200,6 +200,8 @@
if( $vhffs->get_config->get_service_availability('mailinglist') == 1 )
{
use Vhffs::Services::MailingList;
+ my $mailinglistconfig = $vhffs->get_config->get_service('mailinglist');
+
$objs = Vhffs::Services::MailingList::getall_by_group( $vhffs , $group );
$output = "";
$template->param( LISTS_TITLE => gettext("List(s) for this group") );
@@ -208,12 +210,12 @@
foreach( @{$objs} )
{
$subtemplate = new HTML::Template::Expr(
- filename => $templatedir."/public/misc/list-part.tmpl",
- functions => { obfuscate_email => \&obfuscate_email } );
+ filename => $templatedir."/public/misc/list-part.tmpl",
+ functions => { obfuscate_email => \&obfuscate_email } );
$subtemplate->param( LISTNAME => $_->get_title );
$subtemplate->param( DOMAIN => $_->get_domain );
$subtemplate->param( LOCALPART => $_->get_localpart );
- $subtemplate->param( ARCHIVESURL => $vhffs->get_config->get_www_archives );
+ $subtemplate->param( ARCHIVESURL => $mailinglistconfig->{'url_archives'} );
$subtemplate->param( ARCHIVES_TEXT => gettext( "View archives" ) );
$output .= $subtemplate->output;
}
Modified: trunk/vhffs-tests/conf/vhffs.conf
===================================================================
--- trunk/vhffs-tests/conf/vhffs.conf 2007-08-30 04:27:42 UTC (rev 824)
+++ trunk/vhffs-tests/conf/vhffs.conf 2007-08-30 04:50:41 UTC (rev 825)
@@ -219,6 +219,9 @@
<mailing>
activate = yes
default_domain = lists.tuxfamily.org
+
+ #Url of archives
+ url_archives = http://localhost/listengine
</mailing>
#Configuration for listengine
@@ -234,8 +237,6 @@
smtp_server = "localhost"
#Directory which contains template for the archives
templatesdir = /usr/share/vhffs/listengine/templates/
- #Url of archives
- www-archives = http://localhost/listengine
</listengine>
#Configuration of download repository