[vhffs-dev] [824] ->use_$service died with terrible injuries, please bear with him

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 824
Author:   gradator
Date:     2007-08-30 04:27:42 +0000 (Thu, 30 Aug 2007)

Log Message:
-----------
->use_$service died with terrible injuries, please bear with him

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Conf.pm
    trunk/vhffs-api/src/Vhffs/Group.pm
    trunk/vhffs-api/src/Vhffs/Panel/Admin.pm
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm
    trunk/vhffs-api/src/Vhffs/Panel/Menu.pm
    trunk/vhffs-api/src/Vhffs/User.pm
    trunk/vhffs-irc/modobot.pl
    trunk/vhffs-panel/admin/moderation.pl
    trunk/vhffs-panel/group/prefs.pl
    trunk/vhffs-panel/lost_ack.pl
    trunk/vhffs-panel/user/prefs.pl
    trunk/vhffs-public/group.pl
    trunk/vhffs-robots/src/svn_viewvcconf.pl
    trunk/vhffs-tools/src/vhffs-moderate


Modified: trunk/vhffs-api/src/Vhffs/Conf.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Conf.pm	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-api/src/Vhffs/Conf.pm	2007-08-30 04:27:42 UTC (rev 824)
@@ -121,7 +121,7 @@
 # get availability of a service (return 1 if open, 0 if closed or unknown)
 sub get_service_availability
 {
-	my $service = shift;
+	my ( $self , $service ) = @_;
 	use Vhffs::Functions;
 	return Vhffs::Functions::strtoboolean( $Config{'services'}{$service}{'activate'} );
 }
@@ -227,62 +227,6 @@
 }
 
 
-sub use_web
-{
-	return Vhffs::Conf::get_service_availability('web');
-}
-
-sub use_cvs
-{
-	return Vhffs::Conf::get_service_availability('cvs');
-}
-
-sub use_svn
-{
-	return Vhffs::Conf::get_service_availability('svn');
-}
-
-sub use_repository
-{
-	return Vhffs::Conf::get_service_availability('repository');
-}
-
-sub use_mail
-{
-	return Vhffs::Conf::get_service_availability('mail');
-}
-
-sub use_mailuser
-{
-	return Vhffs::Conf::get_service_availability('mailuser');
-}
-
-sub use_mailgroup
-{
-	return Vhffs::Conf::get_service_availability('mailgroup');
-}
-
-sub use_mailinglist
-{
-	return Vhffs::Conf::get_service_availability('mailinglist');
-}
-
-sub use_dns
-{
-	return Vhffs::Conf::get_service_availability('dns');
-}
-
-sub use_pgsql
-{
-	return Vhffs::Conf::get_service_availability('pgsql');
-}
-
-sub use_mysql
-{
-	return Vhffs::Conf::get_service_availability('mysql');
-}
-
-
 sub get_allow_subscribe
 {
 	return -1 if( ! defined $Config{"global"}{"allow_subscribe"} );

Modified: trunk/vhffs-api/src/Vhffs/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Group.pm	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-api/src/Vhffs/Group.pm	2007-08-30 04:27:42 UTC (rev 824)
@@ -175,7 +175,7 @@
 	my $query;
 	my $request;
 
-	if( $config->use_web == 1 ) {
+	if( $config->get_service_availability('web') == 1 ) {
 		$query ='SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid=?';
 	    $request = $self->{'db'}->prepare( $query );
 	    $request->execute( Vhffs::Constants::TYPE_HTTPD, $self->get_gid );
@@ -183,7 +183,7 @@
 		return 0 if( $rows != 0 );
 	}
 	
-	if( $config->use_cvs == 1 ) {
+	if( $config->get_service_availability('cvs') == 1 ) {
 		$query ='SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid=?';
 	    $request = $self->{'db'}->prepare( $query );
 	    $request->execute( Vhffs::Constants::TYPE_CVS, $self->get_gid );
@@ -191,7 +191,7 @@
 		return 0 if( $rows != 0 );
 	}
 	
-	if( $config->use_svn == 1 ) {
+	if( $config->get_service_availability('svn') == 1 ) {
 		$query ='SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid=?';
 	    $request = $self->{'db'}->prepare( $query );
 	    $request->execute( Vhffs::Constants::TYPE_SVN, $self->get_gid );
@@ -200,7 +200,7 @@
 	}
 
 	
-	if( $config->use_mail == 1 ) { 
+	if( $config->get_service_availability('mail') == 1 ) { 
 		$query ='SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid=?';
 	    $request = $self->{'db'}->prepare( $query );
 	    $request->execute( Vhffs::Constants::TYPE_MAIL, $self->get_gid );
@@ -209,7 +209,7 @@
 	}
 
 
-	if( $config->use_dns == 1 ) {
+	if( $config->get_service_availability('dns') == 1 ) {
 		$query ='SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid=?';
 	    $request = $self->{'db'}->prepare( $query );
 	    $request->execute( Vhffs::Constants::TYPE_DNS, $self->get_gid );
@@ -218,7 +218,7 @@
 	}
 
 
-	if( $config->use_pgsql == 1 ) { 
+	if( $config->get_service_availability('pgsql') == 1 ) { 
 		$query ='SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid=?';
 	    $request = $self->{'db'}->prepare( $query );
 	    $request->execute( Vhffs::Constants::TYPE_PGSQL, $self->get_gid );
@@ -227,7 +227,7 @@
 	}
 
 
-	if( $config->use_mysql == 1 ) {
+	if( $config->get_service_availability('mysql') == 1 ) {
 		$query ='SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid=?';
 	    $request = $self->{'db'}->prepare( $query );
 	    $request->execute( Vhffs::Constants::TYPE_MYSQL, $self->get_gid );
@@ -235,7 +235,7 @@
 		return 0 if( $rows != 0 );
 	}
 
-    if( $config->use_mailinglist == 1) {
+    if( $config->get_service_availability('mailinglist') == 1) {
         $query = 'SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid = ?';
         $request = $self->get_db_object()->prepare( $query );
         $request->execute( Vhffs::Constants::TYPE_ML, $self->get_gid );
@@ -243,7 +243,7 @@
         return 0 if( $rows != 0);
     }
 
-    if( $config->use_repository == 1) {
+    if( $config->get_service_availability('repository') == 1) {
         $query = 'SELECT COUNT(*) FROM vhffs_object WHERE type = ? AND owner_gid = ?';
         $request = $self->get_db_object()->prepare( $query );
         $request->execute( Vhffs::Constants::TYPE_REPOSITORY, $self->get_gid );

Modified: trunk/vhffs-api/src/Vhffs/Panel/Admin.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Admin.pm	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-api/src/Vhffs/Panel/Admin.pm	2007-08-30 04:27:42 UTC (rev 824)
@@ -310,15 +310,15 @@
     push @$categories, get_admin_category;
     push @$categories, get_user_category;
     push @$categories, get_group_category;
-    push @$categories, get_web_category     if($config->use_web);
-    push @$categories, get_mysql_category   if($config->use_mysql);
-    push @$categories, get_pgsql_category   if($config->use_pgsql);
-    push @$categories, get_cvs_category     if($config->use_cvs);
-    push @$categories, get_svn_category     if($config->use_svn);
-    push @$categories, get_dns_category     if($config->use_dns);
-    push @$categories, get_mail_category    if($config->use_mail);
-    push @$categories, get_mailing_category if($config->use_mailinglist);
-    push @$categories, get_repo_category    if($config->use_repository);
+    push @$categories, get_web_category     if($config->get_service_availability('web'));
+    push @$categories, get_mysql_category   if($config->get_service_availability('mysql'));
+    push @$categories, get_pgsql_category   if($config->get_service_availability('pgsql'));
+    push @$categories, get_cvs_category     if($config->get_service_availability('cvs'));
+    push @$categories, get_svn_category     if($config->get_service_availability('svn'));
+    push @$categories, get_dns_category     if($config->get_service_availability('dns'));
+    push @$categories, get_mail_category    if($config->get_service_availability('mail'));
+    push @$categories, get_mailing_category if($config->get_service_availability('mailinglist'));
+    push @$categories, get_repo_category    if($config->get_service_availability('repository'));
 
 
     return $categories;
@@ -342,15 +342,15 @@
     push @$categories, get_modo_category;
     push @$categories, get_user_category;
     push @$categories, get_group_category;
-    push @$categories, get_web_category     if($config->use_web);
-    push @$categories, get_mysql_category   if($config->use_mysql);
-    push @$categories, get_pgsql_category   if($config->use_pgsql);
-    push @$categories, get_cvs_category     if($config->use_cvs);
-    push @$categories, get_svn_category     if($config->use_svn);
-    push @$categories, get_dns_category     if($config->use_dns);
-    push @$categories, get_mail_category    if($config->use_mail);
-    push @$categories, get_mailing_category if($config->use_mailinglist);
-    push @$categories, get_repo_category    if($config->use_repository);
+    push @$categories, get_web_category     if($config->get_service_availability('web'));
+    push @$categories, get_mysql_category   if($config->get_service_availability('mysql'));
+    push @$categories, get_pgsql_category   if($config->get_service_availability('pgsql'));
+    push @$categories, get_cvs_category     if($config->get_service_availability('cvs'));
+    push @$categories, get_svn_category     if($config->get_service_availability('svn'));
+    push @$categories, get_dns_category     if($config->get_service_availability('dns'));
+    push @$categories, get_mail_category    if($config->get_service_availability('mail'));
+    push @$categories, get_mailing_category if($config->get_service_availability('mailinglist'));
+    push @$categories, get_repo_category    if($config->get_service_availability('repository'));
 
 
     return $categories;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2007-08-30 04:27:42 UTC (rev 824)
@@ -539,47 +539,47 @@
 		$template->param( HELP_URL => $url );
 	}
 
-        if($config->use_web) {
+        if($config->get_service_availability('web')) {
             my $webs = Vhffs::Panel::Web::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('web', $webs);
         }
 
-        if($config->use_mysql) {
+        if($config->get_service_availability('mysql')) {
             my $mysql = Vhffs::Panel::Mysql::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('mysql', $mysql);
         }
 
-        if($config->use_pgsql) {
+        if($config->get_service_availability('pgsql')) {
             my $pg = Vhffs::Panel::Pgsql::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('pgsql', $pg);
         }
 
-        if($config->use_cvs) {
+        if($config->get_service_availability('cvs')) {
             my $cvs = Vhffs::Panel::Cvs::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('cvs', $cvs);
         }
 
-        if($config->use_svn) {
+        if($config->get_service_availability('svn')) {
             my $svn = Vhffs::Panel::Svn::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('svn', $svn);
         }
 
-        if($config->use_mailinglist) {
+        if($config->get_service_availability('mailinglist')) {
             my $ml = Vhffs::Panel::MailingList::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('mailinglist', $ml);
         }
 
-        if($config->use_mail) {
+        if($config->get_service_availability('mail')) {
             my $mail = Vhffs::Panel::Mail::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('mail', $mail);
         }
 
-        if($config->use_repository) {
+        if($config->get_service_availability('repository')) {
             my $repos = Vhffs::Panel::Repository::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('repository', $repos);
         }
 
-        if($config->use_dns) {
+        if($config->get_service_availability('dns')) {
             my $dns = Vhffs::Panel::DNS::getall_per_group( $vhffs, $gid );
             $services_list .= $self->create_service_index('dns', $dns);
         }

Modified: trunk/vhffs-api/src/Vhffs/Panel/Menu.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Menu.pm	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-api/src/Vhffs/Panel/Menu.pm	2007-08-30 04:27:42 UTC (rev 824)
@@ -60,15 +60,15 @@
     my $context_tmpl = new HTML::Template( filename => $config->get_templatedir.'/panel/menu/context.tmpl' );
 
     my $items = [];
-    push @$items, {path => 'web', label => gettext('Web') } if( $config->use_web );
-    push @$items, {path => 'mysql', label => gettext('MySQL') } if( $config->use_mysql );
-    push @$items, {path => 'pgsql', label => gettext('PgSQL') } if( $config->use_pgsql );
-    push @$items, {path => 'cvs', label => gettext('CVS') } if( $config->use_cvs );
-    push @$items, {path => 'svn', label => gettext('SVN') } if( $config->use_svn );
-    push @$items, {path => 'dns', label => gettext('Domain names') } if( $config->use_dns );
-    push @$items, {path => 'repository', label => gettext('Dl repos') } if( $config->use_repository );
-    push @$items, {path => 'mail', label => gettext('Mail') } if( $config->use_mail );
-    push @$items, {path => 'mailinglist', label => gettext('ML') } if( $config->use_mailinglist );
+    push @$items, {path => 'web', label => gettext('Web') } if( $config->get_service_availability('web') );
+    push @$items, {path => 'mysql', label => gettext('MySQL') } if( $config->get_service_availability('mysql') );
+    push @$items, {path => 'pgsql', label => gettext('PgSQL') } if( $config->get_service_availability('pgsql') );
+    push @$items, {path => 'cvs', label => gettext('CVS') } if( $config->get_service_availability('cvs') );
+    push @$items, {path => 'svn', label => gettext('SVN') } if( $config->get_service_availability('svn') );
+    push @$items, {path => 'dns', label => gettext('Domain names') } if( $config->get_service_availability('dns') );
+    push @$items, {path => 'repository', label => gettext('Dl repos') } if( $config->get_service_availability('repository') );
+    push @$items, {path => 'mail', label => gettext('Mail') } if( $config->get_service_availability('mail') );
+    push @$items, {path => 'mailinglist', label => gettext('ML') } if( $config->get_service_availability('mailinglist') );
     $context_tmpl->param( MENU_ITEMS => $items );
     return $context_tmpl->output();
 }
@@ -108,15 +108,15 @@
     push @$items, {path => 'admin', label => gettext('General') };
     push @$items, {path => 'admin/user', label => gettext('Users') };
     push @$items, {path => 'admin/group', label => gettext('Groups') };
-    push @$items, {path => 'admin/web', label => gettext('Web') } if( $config->use_web );
-    push @$items, {path => 'admin/mysql', label => gettext('MySQL') } if( $config->use_mysql );
-    push @$items, {path => 'admin/pgsql', label => gettext('PgSQL') } if( $config->use_pgsql );
-    push @$items, {path => 'admin/cvs', label => gettext('CVS') } if( $config->use_cvs );
-    push @$items, {path => 'admin/svn', label => gettext('SVN') } if( $config->use_svn );
-    push @$items, {path => 'admin/dns', label => gettext('Domain names') } if( $config->use_dns );
-    push @$items, {path => 'admin/repository', label => gettext('Dl repos') } if( $config->use_repository );
-    push @$items, {path => 'admin/mail', label => gettext('Mail') } if( $config->use_mail );
-    push @$items, {path => 'admin/mailing', label => gettext('ML') } if( $config->use_mailinglist );
+    push @$items, {path => 'admin/web', label => gettext('Web') } if( $config->get_service_availability('web') );
+    push @$items, {path => 'admin/mysql', label => gettext('MySQL') } if( $config->get_service_availability('mysql') );
+    push @$items, {path => 'admin/pgsql', label => gettext('PgSQL') } if( $config->get_service_availability('pgsql') );
+    push @$items, {path => 'admin/cvs', label => gettext('CVS') } if( $config->get_service_availability('cvs') );
+    push @$items, {path => 'admin/svn', label => gettext('SVN') } if( $config->get_service_availability('svn') );
+    push @$items, {path => 'admin/dns', label => gettext('Domain names') } if( $config->get_service_availability('dns') );
+    push @$items, {path => 'admin/repository', label => gettext('Dl repos') } if( $config->get_service_availability('repository') );
+    push @$items, {path => 'admin/mail', label => gettext('Mail') } if( $config->get_service_availability('mail') );
+    push @$items, {path => 'admin/mailing', label => gettext('ML') } if( $config->get_service_availability('mailinglist') );
     $context_tmpl->param( MENU_ITEMS => $items );
     return $context_tmpl->output();
 

Modified: trunk/vhffs-api/src/Vhffs/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-api/src/Vhffs/User.pm	2007-08-30 04:27:42 UTC (rev 824)
@@ -304,7 +304,7 @@
     return -2 if ( $self->{'group'}->delete < 0 );
 
 	# delete mail user if mail_user is enabled
-	if( $self->{'main'}->get_config->use_mailuser == 1 )
+	if( $self->{'main'}->get_config->get_service_availability('mailuser') == 1 )
 	{
 		use Vhffs::Services::Mail;
 		use Vhffs::Services::MailUser;

Modified: trunk/vhffs-irc/modobot.pl
===================================================================
--- trunk/vhffs-irc/modobot.pl	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-irc/modobot.pl	2007-08-30 04:27:42 UTC (rev 824)
@@ -104,7 +104,7 @@
         @oldgroup = ();
     }
 
-    if( $vhffs->get_config->use_web == 1 )
+    if( $vhffs->get_config->get_service_availability('web') == 1 )
     {
         #Treat Website to moderate
         use Vhffs::Services::Web;
@@ -133,7 +133,7 @@
 	}
     }
 
-    if( $vhffs->get_config->use_dns == 1 )
+    if( $vhffs->get_config->get_service_availability('dns') == 1 )
     {
         #Treat DNS to moderate
         use Vhffs::Services::DNS;
@@ -162,7 +162,7 @@
         }
     }
 
-    if( $vhffs->get_config->use_cvs == 1 )
+    if( $vhffs->get_config->get_service_availability('cvs') == 1 )
     {
         #Treat CVS to moderate
         use Vhffs::Services::Cvs;
@@ -190,7 +190,7 @@
         }
     }
 
-    if( $vhffs->get_config->use_mailinglist == 1 )
+    if( $vhffs->get_config->get_service_availability('mailinglist') == 1 )
     {
         #Treat Mailing lists to moderate
         use Vhffs::Panel::MailingList;
@@ -218,7 +218,7 @@
         }
     }
 
-    if( $vhffs->get_config->use_svn == 1 )
+    if( $vhffs->get_config->get_service_availability('svn') == 1 )
     {
         #Treat Svn to moderate
         use Vhffs::Services::Svn;
@@ -246,7 +246,7 @@
         }
     }
 
-    if( $vhffs->get_config->use_mail == 1 )
+    if( $vhffs->get_config->get_service_availability('mail') == 1 )
     {
         #Treat Mail domains to moderate
         use Vhffs::Panel::Mail;
@@ -274,7 +274,7 @@
         }
     }
 
-    if( $vhffs->get_config->use_mysql == 1 )
+    if( $vhffs->get_config->get_service_availability('mysql') == 1 )
     {
         #Treat Mysql to moderate
         use Vhffs::Services::Mysql;
@@ -302,7 +302,7 @@
         }
     }
 
-    if( $vhffs->get_config->use_pgsql == 1 )
+    if( $vhffs->get_config->get_service_availability('pgsql') == 1 )
     {
         #Treat Postgres to moderate
         use Vhffs::Services::Pgsql;
@@ -330,7 +330,7 @@
         }
     }
 
-    if( $vhffs->get_config->use_repository == 1 )
+    if( $vhffs->get_config->get_service_availability('repository') == 1 )
     {
         #Treat Repository to moderate
         use Vhffs::Services::Repository;

Modified: trunk/vhffs-panel/admin/moderation.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation.pl	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-panel/admin/moderation.pl	2007-08-30 04:27:42 UTC (rev 824)
@@ -124,7 +124,7 @@
 		$template->param( MODERATION_GROUPS => gettext("No Group to validate") );
 	}
 
-	if( $vhffs->get_config->use_web == 1 )
+	if( $vhffs->get_config->get_service_availability('web') == 1 )
 	{
 		#Treat Website to moderate
 		use Vhffs::Services::Web;
@@ -168,7 +168,7 @@
 	}
 
 
-	if( $vhffs->get_config->use_dns == 1 )
+	if( $vhffs->get_config->get_service_availability('dns') == 1 )
 	{
 		#Treat Mail domains to moderate
 		use Vhffs::Services::DNS;
@@ -210,7 +210,7 @@
 
 
 
-	if( $vhffs->get_config->use_cvs == 1 )
+	if( $vhffs->get_config->get_service_availability('cvs') == 1 )
 	{
 		#Treat Mail domains to moderate
 		use Vhffs::Services::Cvs;
@@ -254,7 +254,7 @@
 
 
 
-	if( $vhffs->get_config->use_mailinglist == 1 )
+	if( $vhffs->get_config->get_service_availability('mailinglist') == 1 )
 	{
 		#Treat Mail domains to moderate
 		use Vhffs::Panel::MailingList;
@@ -297,7 +297,7 @@
 
 
 
-	if( $vhffs->get_config->use_svn == 1 )
+	if( $vhffs->get_config->get_service_availability('svn') == 1 )
 	{
 		#Treat Mail domains to moderate
 		use Vhffs::Services::Svn;
@@ -343,7 +343,7 @@
 
 
 
-	if( $vhffs->get_config->use_mail == 1 )
+	if( $vhffs->get_config->get_service_availability('mail') == 1 )
 	{
 		#Treat Mail domains to moderate
 		use Vhffs::Panel::Mail;
@@ -387,7 +387,7 @@
 
 
 
-	if( $vhffs->get_config->use_mysql == 1 )
+	if( $vhffs->get_config->get_service_availability('mysql') == 1 )
 	{
 		use Vhffs::Services::Mysql;
 		$template->param( TEXT_MYSQL => gettext("MySQL database awaiting validation") );
@@ -428,7 +428,7 @@
 		}
 	}
 
-	if( $vhffs->get_config->use_pgsql == 1 )
+	if( $vhffs->get_config->get_service_availability('pgsql') == 1 )
 	{
 		#Treat Mail domains to moderate
 		use Vhffs::Services::Pgsql;
@@ -471,7 +471,7 @@
 	}
 
 
-	if( $vhffs->get_config->use_repository == 1 )
+	if( $vhffs->get_config->get_service_availability('repository') == 1 )
 	{
 		use Vhffs::Services::Repository;
 		$template->param( TEXT_REPOSITORY => gettext( "Download repository awaiting validation" ) );

Modified: trunk/vhffs-panel/group/prefs.pl
===================================================================
--- trunk/vhffs-panel/group/prefs.pl	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-panel/group/prefs.pl	2007-08-30 04:27:42 UTC (rev 824)
@@ -170,7 +170,7 @@
             }
         }
     } elsif( defined( $cgi->param('contact_email_submit') ) ) {
-        if( $vhffs->get_config->use_mailgroup == 0  ||  ( $access_level < Vhffs::Constants::ACL_MODIFY  &&  $user->is_admin != 1 ) ) {
+        if( $vhffs->get_config->get_service_availability('mailgroup') == 0  ||  ( $access_level < Vhffs::Constants::ACL_MODIFY  &&  $user->is_admin != 1 ) ) {
             $panel->add_error( gettext( 'You\'re not allowed to do this (ACL rights)' ) );
         } else {
             my $forward = $cgi->param( 'contact_email' );
@@ -208,7 +208,7 @@
 	$template->param( NO => gettext("No, I'm not sure, I prefer to keep this project.") );
 	$template->param( TEXT_DELETE => gettext("Delete") );
 
-	if( $vhffs->get_config->use_mailgroup == 1 )  {
+	if( $vhffs->get_config->get_service_availability('mailgroup') == 1 )  {
 		use Vhffs::Services::MailGroup;
 		my $mg = init Vhffs::Services::MailGroup( $vhffs , $group );
 		if( defined $mg && $mg >= 0 )

Modified: trunk/vhffs-panel/lost_ack.pl
===================================================================
--- trunk/vhffs-panel/lost_ack.pl	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-panel/lost_ack.pl	2007-08-30 04:27:42 UTC (rev 824)
@@ -59,7 +59,7 @@
     #create a new password for this user
     my $plainpassword = $user->generate_password;
     my $mu;
-    if( $vhffs->get_config->use_mailuser == 1 ) {
+    if( $vhffs->get_config->get_service_availability('mailuser') == 1 ) {
         use Vhffs::Services::MailUser;
         $mu = init Vhffs::Services::MailUser( $vhffs , $user );
         if( defined $mu  &&  ref($mu)  &&  $mu->available > 0 && $mu->exists_box) {

Modified: trunk/vhffs-panel/user/prefs.pl
===================================================================
--- trunk/vhffs-panel/user/prefs.pl	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-panel/user/prefs.pl	2007-08-30 04:27:42 UTC (rev 824)
@@ -154,7 +154,7 @@
         }
 
         my $mu; 
-        if( $vhffs->get_config->use_mailuser == 1 ) {
+        if( $vhffs->get_config->get_service_availability('mailuser') == 1 ) {
             use Vhffs::Services::MailUser;
             $mu = init Vhffs::Services::MailUser( $vhffs , $user );
         }
@@ -359,7 +359,7 @@
 }
 
 
-if( $vhffs->get_config->use_mailuser == 1 )
+if( $vhffs->get_config->get_service_availability('mailuser') == 1 )
 {
 	use Vhffs::Services::MailUser;
     

Modified: trunk/vhffs-public/group.pl
===================================================================
--- trunk/vhffs-public/group.pl	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-public/group.pl	2007-08-30 04:27:42 UTC (rev 824)
@@ -114,7 +114,7 @@
 
 		$template->param( VALUE_USERS => $output );
 
-		if( $vhffs->get_config->use_web == 1 )
+		if( $vhffs->get_config->get_service_availability('web') == 1 )
 		{
 
 		    use Vhffs::Services::Web;
@@ -140,7 +140,7 @@
 		    }
 		}
 
-		if( $vhffs->get_config->use_cvs == 1 )
+		if( $vhffs->get_config->get_service_availability('cvs') == 1 )
 		{
 		    use Vhffs::Services::Cvs;
 		    $repos = Vhffs::Services::Cvs::getall_per_group( $vhffs , $group );
@@ -168,7 +168,7 @@
 
 
 
-		if( $vhffs->get_config->use_svn == 1 )
+		if( $vhffs->get_config->get_service_availability('svn') == 1 )
 		{
 		    use Vhffs::Services::Svn;
 		    $repos = Vhffs::Services::Svn::getall_by_group( $vhffs , $group );
@@ -197,7 +197,7 @@
 
 
 
-		if( $vhffs->get_config->use_mailinglist == 1 )
+		if( $vhffs->get_config->get_service_availability('mailinglist') == 1 )
 		{
 			use Vhffs::Services::MailingList;
 			$objs = Vhffs::Services::MailingList::getall_by_group( $vhffs , $group );

Modified: trunk/vhffs-robots/src/svn_viewvcconf.pl
===================================================================
--- trunk/vhffs-robots/src/svn_viewvcconf.pl	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-robots/src/svn_viewvcconf.pl	2007-08-30 04:27:42 UTC (rev 824)
@@ -53,7 +53,7 @@
 my $cvsroots;
 my $svnroots;
 
-if( $vhffs->get_config->use_cvs == 1 )
+if( $vhffs->get_config->get_service_availability('cvs') == 1 )
 {
 	my $cvss = Vhffs::Services::Cvs::getall( $vhffs , Vhffs::Constants::ACTIVATED );
 	my $cvs;
@@ -69,7 +69,7 @@
 	}
 }
 
-if( $vhffs->get_config->use_svn == 1 )
+if( $vhffs->get_config->get_service_availability('svn') == 1 )
 {
 	my $svns = Vhffs::Services::Svn::getall( $vhffs , Vhffs::Constants::ACTIVATED );
 	my $svn;

Modified: trunk/vhffs-tools/src/vhffs-moderate
===================================================================
--- trunk/vhffs-tools/src/vhffs-moderate	2007-08-30 03:38:51 UTC (rev 823)
+++ trunk/vhffs-tools/src/vhffs-moderate	2007-08-30 04:27:42 UTC (rev 824)
@@ -58,7 +58,7 @@
 
 
 
-	if( $vhffs->get_config->use_web == 1 )
+	if( $vhffs->get_config->get_service_availability('web') == 1 )
 	{
 		#Treat Website to moderate
 		use Vhffs::Services::Httpd;
@@ -99,7 +99,7 @@
 	print "\n";
 
 
-	if( $vhffs->get_config->use_dns == 1 )
+	if( $vhffs->get_config->get_service_availability('dns') == 1 )
 	{
 		use Vhffs::Services::DNS;
 		print "DNS to validate\n";
@@ -137,7 +137,7 @@
 	print "\n";
 	print "\n";
 
-	if( $vhffs->get_config->use_cvs == 1 )
+	if( $vhffs->get_config->get_service_availability('cvs') == 1 )
 	{
 		use Vhffs::Services::Cvs;
 		print "CVS Repository to validate\n";
@@ -173,7 +173,7 @@
 	print "\n";
 
 
-	if( $vhffs->get_config->use_mailinglist == 1 )
+	if( $vhffs->get_config->get_service_availability('mailinglist') == 1 )
 	{
 		use Vhffs::Panel::Mailinglist;
 		print "List to validate\n";
@@ -210,7 +210,7 @@
 	print "\n";
 
 
-	if( $vhffs->get_config->use_svn == 1 )
+	if( $vhffs->get_config->get_service_availability('svn') == 1 )
 	{
 		use Vhffs::Services::Svn;
 		use Vhffs::Constants;
@@ -250,7 +250,7 @@
 	print "\n";
 
 
-	if( $vhffs->get_config->use_mail == 1 )
+	if( $vhffs->get_config->get_service_availability('mail') == 1 )
 	{
 		use Vhffs::Panel::Mail;
 		print "Mail Area to validate\n";
@@ -289,7 +289,7 @@
 	print "\n";
 
 
-	if( $vhffs->get_config->use_mysql == 1 )
+	if( $vhffs->get_config->get_service_availability('mysql') == 1 )
 	{
 		use Vhffs::Services::Mysql;
 		print gettext("MySQL database awaiting validation") . "\n";
@@ -327,7 +327,7 @@
 	print "\n";
 	print "\n";
 
-	if( $vhffs->get_config->use_pgsql == 1 )
+	if( $vhffs->get_config->get_service_availability('pgsql') == 1 )
 	{
 		use Vhffs::Services::Postgres;
 		print gettext("Postgres database to validate") . "\n";


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/