[vhffs-dev] [840] Bye bye get_cvsweburl and get_svnweburl

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


Revision: 840
Author:   gradator
Date:     2007-08-30 21:50:11 +0000 (Thu, 30 Aug 2007)

Log Message:
-----------
Bye bye get_cvsweburl and get_svnweburl

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Conf.pm
    trunk/vhffs-api/src/Vhffs/Robots/Group.pm
    trunk/vhffs-panel/mailinglist/prefs.pl
    trunk/vhffs-public/allgroups.pl
    trunk/vhffs-public/group.pl
    trunk/vhffs-public/lastgroups.pl


Modified: trunk/vhffs-api/src/Vhffs/Conf.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Conf.pm	2007-08-30 20:50:59 UTC (rev 839)
+++ trunk/vhffs-api/src/Vhffs/Conf.pm	2007-08-30 21:50:11 UTC (rev 840)
@@ -302,32 +302,6 @@
 }
 
 
-sub get_cvsweburl
-{
-	if( defined $Config{"services"}{"cvs"}{"cvsweb_url"} )
-	{
-	    return $Config{"services"}{"cvs"}{"cvsweb_url"};
-	}
-	else
-	{
-	    return "cvsweb";
-	}
-}
-
-
-sub get_svnweburl
-{
-	if( defined $Config{"services"}{"svn"}{"svnweb_url"} )
-	{
-	    return $Config{"services"}{"svn"}{"svnweb_url"};
-	}
-	else
-	{
-	    return "svnweb";
-	}
-}
-
-
 sub get_repositoryurl
 {
 	if( defined $Config{"services"}{"repository"}{"repository_url"} )

Modified: trunk/vhffs-api/src/Vhffs/Robots/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Group.pm	2007-08-30 20:50:59 UTC (rev 839)
+++ trunk/vhffs-api/src/Vhffs/Robots/Group.pm	2007-08-30 21:50:11 UTC (rev 840)
@@ -189,7 +189,7 @@
 {
 	my $vhffs = shift;
 	my $group = shift;
-	my $users = $group->get_config->get_users;
+	my $users = $group->get_users;
 	my $user;
 	foreach $user ( @{$users} )
 	{

Modified: trunk/vhffs-panel/mailinglist/prefs.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/prefs.pl	2007-08-30 20:50:59 UTC (rev 839)
+++ trunk/vhffs-panel/mailinglist/prefs.pl	2007-08-30 21:50:11 UTC (rev 840)
@@ -156,7 +156,7 @@
 	$template->param( BUTTON_ADD_MEMBERS => gettext("Add them !") );
 
 	my $emaillist = "";
-	foreach ( @{$group->get_config->get_users} )  {
+	foreach ( @{$group->get_users} )  {
 		$emaillist .= $_->{'mail'}."\n";
 	}
 	$template->param( PROJECT_MEMBERS_LIST => $emaillist );

Modified: trunk/vhffs-public/allgroups.pl
===================================================================
--- trunk/vhffs-public/allgroups.pl	2007-08-30 20:50:59 UTC (rev 839)
+++ trunk/vhffs-public/allgroups.pl	2007-08-30 21:50:11 UTC (rev 840)
@@ -86,7 +86,7 @@
 
 	
 	my $output = "";
-	my $users = $group->get_config->get_users;
+	my $users = $group->get_users;
 	my $subtemplate;
 	my $user;
 	if( ! defined $users )

Modified: trunk/vhffs-public/group.pl
===================================================================
--- trunk/vhffs-public/group.pl	2007-08-30 20:50:59 UTC (rev 839)
+++ trunk/vhffs-public/group.pl	2007-08-30 21:50:11 UTC (rev 840)
@@ -95,7 +95,7 @@
 
 	
 	my $output = "";
-	my $users = $group->get_config->get_users;
+	my $users = $group->get_users;
 	my $subtemplate;
 	my $user;
 	if( ! defined $users )
@@ -150,12 +150,12 @@
 		    {
 			foreach(  @{$repos} )
 			{
-			    $subtemplate = new HTML::Template( filename => $templatedir."/public/misc/cvs-part.tmpl" );
-			    $subtemplate->param( CVSROOT => $_->get_cvsroot );
-			    my $cvspath = $_->get_cvsroot;
-			    $cvspath =~ s/\//_/;
-			    $subtemplate->param( CVSURL  => $vhffs->get_config->get_cvsweburl . '/cvs_' . $cvspath . '/' );
-			    $output .= $subtemplate->output;
+				$subtemplate = new HTML::Template( filename => $templatedir."/public/misc/cvs-part.tmpl" );
+				$subtemplate->param( CVSROOT => $_->get_cvsroot );
+				my $cvspath = $_->get_cvsroot;
+				$cvspath =~ s/\//_/;
+				$subtemplate->param( CVSURL  => $vhffs->get_config->get_service('cvs')->{'cvsweb_url'} . '/cvs_' . $cvspath . '/' );
+				$output .= $subtemplate->output;
 			}
 
 			$template->param( CVS_VALUE => $output );
@@ -183,7 +183,7 @@
 			    		$subtemplate->param( DESCRIPTION => CGI::escapeHTML( $_->get_description ) );
 					my $svnpath = $_->get_reponame;
 					$svnpath =~ s/\//_/;
-			    		$subtemplate->param( SVNURL  => $vhffs->get_config->get_svnweburl . '/svn_' . $svnpath  . '/' );
+			    		$subtemplate->param( SVNURL  => $vhffs->get_config->get_service('svn')->{'svnweb_url'} . '/svn_' . $svnpath  . '/' );
 			    		$output .= $subtemplate->output;
 				}
 

Modified: trunk/vhffs-public/lastgroups.pl
===================================================================
--- trunk/vhffs-public/lastgroups.pl	2007-08-30 20:50:59 UTC (rev 839)
+++ trunk/vhffs-public/lastgroups.pl	2007-08-30 21:50:11 UTC (rev 840)
@@ -78,7 +78,7 @@
 	$template->param( VALUE_DESCRIPTION => CGI::escapeHTML( $group->get_description ) );
 	
 	my $output = "";
-	my $users = $group->get_config->get_users;
+	my $users = $group->get_users;
 	my $subtemplate;
 	my $user;
 	if( ! defined $users )


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