[vhffs-dev] [1298] ok, we don't need anymore the group in the session, it fixes the bug #245

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


Revision: 1298
Author:   gradator
Date:     2008-10-31 01:17:58 +0100 (Fri, 31 Oct 2008)

Log Message:
-----------
ok, we don't need anymore the group in the session, it fixes the bug #245

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm
    trunk/vhffs-api/src/Vhffs/Panel/Menu.pm
    trunk/vhffs-panel/admin/broadcast.pl
    trunk/vhffs-panel/admin/broadcast_delete.pl
    trunk/vhffs-panel/admin/broadcast_list.pl
    trunk/vhffs-panel/admin/broadcast_submit.pl
    trunk/vhffs-panel/admin/broadcast_view.pl
    trunk/vhffs-panel/admin/cron/search.pl
    trunk/vhffs-panel/admin/cvs/search.pl
    trunk/vhffs-panel/admin/dns/search.pl
    trunk/vhffs-panel/admin/git/search.pl
    trunk/vhffs-panel/admin/group/search.pl
    trunk/vhffs-panel/admin/mail/search.pl
    trunk/vhffs-panel/admin/mailinglist/search.pl
    trunk/vhffs-panel/admin/moderation.pl
    trunk/vhffs-panel/admin/mysql/search.pl
    trunk/vhffs-panel/admin/object/delete_avatar.pl
    trunk/vhffs-panel/admin/object/edit.pl
    trunk/vhffs-panel/admin/object/edit_submit.pl
    trunk/vhffs-panel/admin/object/list.pl
    trunk/vhffs-panel/admin/object/search.pl
    trunk/vhffs-panel/admin/pgsql/search.pl
    trunk/vhffs-panel/admin/repository/search.pl
    trunk/vhffs-panel/admin/stats.pl
    trunk/vhffs-panel/admin/svn/search.pl
    trunk/vhffs-panel/admin/user/search.pl
    trunk/vhffs-panel/admin/web/search.pl
    trunk/vhffs-panel/cron/create.pl
    trunk/vhffs-panel/cron/delete.pl
    trunk/vhffs-panel/cron/index.pl
    trunk/vhffs-panel/cron/prefs.pl
    trunk/vhffs-panel/cvs/create.pl
    trunk/vhffs-panel/cvs/delete.pl
    trunk/vhffs-panel/cvs/index.pl
    trunk/vhffs-panel/dns/create.pl
    trunk/vhffs-panel/dns/delete.pl
    trunk/vhffs-panel/dns/index.pl
    trunk/vhffs-panel/git/create.pl
    trunk/vhffs-panel/git/delete.pl
    trunk/vhffs-panel/git/index.pl
    trunk/vhffs-panel/git/prefs.pl
    trunk/vhffs-panel/group/delete.pl
    trunk/vhffs-panel/group/history.pl
    trunk/vhffs-panel/group/prefs.pl
    trunk/vhffs-panel/group/view.pl
    trunk/vhffs-panel/history.pl
    trunk/vhffs-panel/mail/create.pl
    trunk/vhffs-panel/mail/delete.pl
    trunk/vhffs-panel/mail/index.pl
    trunk/vhffs-panel/mail/prefs.pl
    trunk/vhffs-panel/mailinglist/create.pl
    trunk/vhffs-panel/mailinglist/delete.pl
    trunk/vhffs-panel/mailinglist/index.pl
    trunk/vhffs-panel/mailinglist/prefs.pl
    trunk/vhffs-panel/mysql/create.pl
    trunk/vhffs-panel/mysql/delete.pl
    trunk/vhffs-panel/mysql/index.pl
    trunk/vhffs-panel/mysql/prefs.pl
    trunk/vhffs-panel/object/quickdelete.pl
    trunk/vhffs-panel/object/resubmit.pl
    trunk/vhffs-panel/pgsql/create.pl
    trunk/vhffs-panel/pgsql/delete.pl
    trunk/vhffs-panel/pgsql/index.pl
    trunk/vhffs-panel/pgsql/prefs.pl
    trunk/vhffs-panel/repository/create.pl
    trunk/vhffs-panel/repository/delete.pl
    trunk/vhffs-panel/repository/index.pl
    trunk/vhffs-panel/repository/prefs.pl
    trunk/vhffs-panel/svn/create.pl
    trunk/vhffs-panel/svn/delete.pl
    trunk/vhffs-panel/svn/index.pl
    trunk/vhffs-panel/svn/prefs.pl
    trunk/vhffs-panel/templates/Makefile.am
    trunk/vhffs-panel/templates/admin/group/part.tmpl
    trunk/vhffs-panel/templates/group/index.tmpl
    trunk/vhffs-panel/templates/group/info.tmpl
    trunk/vhffs-panel/templates/group/prefs.tmpl
    trunk/vhffs-panel/templates/menu/main.tmpl
    trunk/vhffs-panel/templates/misc/service_index.tmpl
    trunk/vhffs-panel/templates/misc/welcome.tmpl
    trunk/vhffs-panel/user/delete.pl
    trunk/vhffs-panel/web/create.pl
    trunk/vhffs-panel/web/delete.pl
    trunk/vhffs-panel/web/index.pl
    trunk/vhffs-panel/web/prefs.pl

Added Paths:
-----------
    trunk/vhffs-panel/templates/menu/context-group.tmpl


Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2008-10-31 00:17:58 UTC (rev 1298)
@@ -381,22 +381,6 @@
 
 	$panel->{session} = $session;
 	$panel->{user} = $user;
-
-	my $groupname = $cgi->param('project');
-	$session->param('project', $groupname) if( defined $groupname );
-
-	$groupname = $session->param('project');
-	if( defined $groupname )  {
-		my $group = Vhffs::Group::get_by_groupname( $vhffs, $groupname );
-		if(  defined $group  &&  $user->can_view( $group )  )  {
-			$panel->{'group'} = $group;
-			$panel->{'groupname'} = $groupname;
-		}
-		else  {
-			$session->param('project', NULL);
-		}
-	}
-
 	return $session;
 }
 
@@ -414,10 +398,11 @@
     my $user = $panel->{user};
     my $theme = $panel->{theme};
     my $templatedir = $panel->{templatedir};
-    my $groupname = $panel->{groupname};
     my $vhffs = $panel->{vhffs};
     my $cgi = $panel->{cgi};
 
+    my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+
     my $menutemplate = new HTML::Template( filename => $templatedir.'/panel/menu/main.tmpl' );
     $menutemplate->param( THEME => $theme );
 
@@ -443,17 +428,15 @@
     # Current project stuff (TODO stop handle it in session)
     if( ( CGI::url( -absolute => 1) =~ /^\/admin\// ) || defined $cgi->param('admin_menu')) {
         if( $user->is_admin ) {
-            $menutemplate->param( CONTEXTUAL_MENU => Vhffs::Panel::Menu::generate_admin_ctxmenu($vhffs->get_config) );
+            $menutemplate->param( CONTEXTUAL_MENU => Vhffs::Panel::Menu::generate_admin_ctxmenu( $vhffs->get_config ) );
         } elsif( $user->is_moderator ) {
-            $menutemplate->param( CONTEXTUAL_MENU => Vhffs::Panel::Menu::generate_moderator_ctxmenu($vhffs->get_config) );
+            $menutemplate->param( CONTEXTUAL_MENU => Vhffs::Panel::Menu::generate_moderator_ctxmenu( $vhffs->get_config ) );
         }
-    } elsif($groupname) {
-        $menutemplate->param( CURRENT_GROUP_TEXT => gettext('Current group:') );
-        $menutemplate->param( PROJECT_HOME_TEXT => gettext('Project home') );
-        $menutemplate->param( GROUPNAME => $groupname );
-        $menutemplate->param( CONTEXTUAL_MENU => Vhffs::Panel::Menu::generate_project_ctxmenu($vhffs->get_config));
+    } elsif( $group ) {
+        $menutemplate->param( CONTEXTUAL_MENU => Vhffs::Panel::Menu::generate_project_ctxmenu( $vhffs->get_config , $group ) );
     }
 
+
     return $menutemplate->output();
 }
 
@@ -527,17 +510,16 @@
 sub project_info
 {
 	my $panel = shift;
-
-    my $vhffs = $panel->{vhffs};
-    my $group = $panel->{group};
+	my $vhffs = $panel->{vhffs};
+	my $cgi = $panel->{cgi};
+	my $templatedir = $vhffs->get_config->get_templatedir;
 	my $temp;
 	my $object;
 	my $objects;
 	my $template;
-	my $templatedir;
 	my $subtemplate;
 
-	$templatedir = $vhffs->get_config->get_templatedir;
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 		
     if( ! defined( $group ) ) {
         $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
@@ -560,6 +542,8 @@
         $template->param( TEXT_GENERAL => gettext('General') );
         $template->param( TEXT_FULLHISTORY => gettext('Full history') );
 
+        $template->param( GROUPNAME => $group->get_groupname );
+
 	my $groupconfig = $config->get_groups;
 	if( defined $groupconfig && defined ( my $url = $groupconfig->{'url_doc'} ) )  {
 		$template->param( HELP_TEXT => gettext('Help') );
@@ -804,10 +788,12 @@
 	cron => 'Cron jobs',
     );
 
-    my $vhffs = $panel->{vhffs};
-    my $group = $panel->{group};
+    my $vhffs = $panel->{'vhffs'};
+    my $cgi = $panel->{'cgi'};
     my $templatedir = $panel->{templatedir};
 
+    my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+
     my $svclabel = $service_labels{$service};
     my $template = new HTML::Template( filename => $templatedir.'/panel/misc/service_index.tmpl', global_vars => 1 );
 
@@ -821,6 +807,7 @@
     $template->param( NEW => gettext('New') );
     $template->param( NO_SERVICE_TEXT => gettext('None') );
     $template->param( SERVICES => $services);
+    $template->param( GROUPNAME => $group->get_groupname );
 
     my $serviceconfig = $vhffs->get_config->get_service($service);
     if( defined $serviceconfig && defined ( my $url = $serviceconfig->{'url_doc'} ) )  {

Modified: trunk/vhffs-api/src/Vhffs/Panel/Menu.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Menu.pm	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-api/src/Vhffs/Panel/Menu.pm	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,10 +56,13 @@
 
 =cut
 
-sub generate_project_ctxmenu($) {
+sub generate_project_ctxmenu($$) {
     my $config = shift;
-    my $context_tmpl = new HTML::Template( filename => $config->get_templatedir.'/panel/menu/context.tmpl' );
+    my $group = shift;
+    my $context_tmpl = new HTML::Template( filename => $config->get_templatedir.'/panel/menu/context-group.tmpl' , global_vars => 1 );
 
+    $context_tmpl->param( GROUPNAME => $group->get_groupname );
+
     my $items = [];
     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') );

Modified: trunk/vhffs-panel/admin/broadcast.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/broadcast.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -55,8 +55,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/broadcast_delete.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/broadcast_delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -61,11 +61,7 @@
 my $vhffs        = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user         = $panel->{'user'};
-my $group        = $panel->{'group'};
 
-my $projectname = $session->param("project");
-
-
 my $mid         = $cgi->param("ID");
 
 my $templatedir  = $vhffs->get_config->get_templatedir;

Modified: trunk/vhffs-panel/admin/broadcast_list.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_list.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/broadcast_list.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,8 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/broadcast_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_submit.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/broadcast_submit.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -61,11 +61,7 @@
 my $vhffs        = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user         = $panel->{'user'};
-my $group        = $panel->{'group'};
 
-my $projectname = $session->param("project");
-
-
 my $subject      = Encode::decode_utf8( $cgi->param('SUBJECT') );
 my $body         = Encode::decode_utf8( $cgi->param('BODY') );
 

Modified: trunk/vhffs-panel/admin/broadcast_view.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_view.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/broadcast_view.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,8 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $mid = $cgi->param("ID");
 my $template;

Modified: trunk/vhffs-panel/admin/cron/search.pl
===================================================================
--- trunk/vhffs-panel/admin/cron/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/cron/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/cvs/search.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/cvs/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/dns/search.pl
===================================================================
--- trunk/vhffs-panel/admin/dns/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/dns/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/git/search.pl
===================================================================
--- trunk/vhffs-panel/admin/git/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/git/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/group/search.pl
===================================================================
--- trunk/vhffs-panel/admin/group/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/group/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/mail/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/mail/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/mailinglist/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mailinglist/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/mailinglist/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,8 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/moderation.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/moderation.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,7 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $templatesdir = $vhffs->get_config->get_templatedir;

Modified: trunk/vhffs-panel/admin/mysql/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/mysql/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/object/delete_avatar.pl
===================================================================
--- trunk/vhffs-panel/admin/object/delete_avatar.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/object/delete_avatar.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $oid = $cgi->param("OID");
 my $path;

Modified: trunk/vhffs-panel/admin/object/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/object/edit.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/object/edit.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,8 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $oid = $cgi->param("OID");
 my $template;

Modified: trunk/vhffs-panel/admin/object/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/object/edit_submit.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/object/edit_submit.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $oid = $cgi->param("OID");
 my $status = $cgi->param("STATUS");

Modified: trunk/vhffs-panel/admin/object/list.pl
===================================================================
--- trunk/vhffs-panel/admin/object/list.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/object/list.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -58,8 +58,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $name = $cgi->param("NAME");
 my $template;

Modified: trunk/vhffs-panel/admin/object/search.pl
===================================================================
--- trunk/vhffs-panel/admin/object/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/object/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/pgsql/search.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/pgsql/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/repository/search.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/repository/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/stats.pl
===================================================================
--- trunk/vhffs-panel/admin/stats.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/stats.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -58,8 +58,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/svn/search.pl
===================================================================
--- trunk/vhffs-panel/admin/svn/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/svn/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/user/search.pl
===================================================================
--- trunk/vhffs-panel/admin/user/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/user/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/admin/web/search.pl
===================================================================
--- trunk/vhffs-panel/admin/web/search.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/admin/web/search.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-#my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;

Modified: trunk/vhffs-panel/cron/create.pl
===================================================================
--- trunk/vhffs-panel/cron/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/cron/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -41,6 +41,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -54,13 +55,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -91,7 +91,7 @@
 		} elsif( $reportmail ne ''  &&  !Vhffs::Functions::valid_mail( $reportmail )  )  {
 			$panel->add_error( gettext('The email you entered fails syntax check') );
 		} elsif(defined Vhffs::Panel::Cron::create_cron($vhffs, $cronpath, $interval*60, $reportmail , $description, $user, $group)) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The Cron job was successfully created !');
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The Cron job was successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( 'An error occured while creating the object.' );
@@ -103,7 +103,6 @@
 
 		$panel->set_title( gettext('Create a Cron job') );
 
-		#$template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $groupname, $groupname) );
 		$template->param( GROUP_NAME => gettext('Group owning this cron job') );
 		$template->param( TEXT_CRONPATH_LABEL => gettext('Path') );
 		$template->param( TEXT_CRONPATH_HELP => gettext('Absolute path of the command to run') );
@@ -114,7 +113,7 @@
 		$template->param( CRONPATH_VALUE => $cronpath );
 		$template->param( INTERVAL_VALUE => $interval );
 		$template->param( REPORTMAIL_VALUE => $reportmail );
-		$template->param( GROUP => $groupname );
+		$template->param( GROUP => $group->get_groupname );
 		$template->param( SEND => gettext('Send') );
 		$template->param( DESCRIPTION => gettext('Description') );
 		$template->param( DESCRIPTION_VALUE => $description );

Modified: trunk/vhffs-panel/cron/delete.pl
===================================================================
--- trunk/vhffs-panel/cron/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/cron/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -55,7 +55,6 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 

Modified: trunk/vhffs-panel/cron/index.pl
===================================================================
--- trunk/vhffs-panel/cron/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/cron/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 unless( defined $group ) {
 	$panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/cron/prefs.pl
===================================================================
--- trunk/vhffs-panel/cron/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/cron/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,7 +56,6 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 

Modified: trunk/vhffs-panel/cvs/create.pl
===================================================================
--- trunk/vhffs-panel/cvs/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/cvs/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -42,6 +42,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -54,12 +55,11 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $groupname = $panel->{'groupname'};
 my $cgi = $panel->{cgi};
 my $templatedir = $panel->{templatedir};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -73,7 +73,7 @@
 
 	if($submitted) {
 		$reponame = $cgi->param('REPOSITORY_NAME');
-		my $fullreponame = $groupname.'/'.$reponame;
+		my $fullreponame = $group->get_groupname.'/'.$reponame;
 		$description = Encode::decode_utf8( $cgi->param('DESCRIPTION') );
 
 		unless( defined $reponame  &&  defined $description ) {
@@ -86,7 +86,7 @@
 			#Create CVS
 			my $cvs = Vhffs::Panel::Cvs::create_cvs( $vhffs, $fullreponame, $description, $user , $group );
 			if( defined $cvs ) {
-				my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The CVS object was successfully created !');
+				my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The CVS object was successfully created !');
 				$panel->redirect($url);
 			} else {
 				$panel->add_error( gettext( 'An error occured while creating the object.It probably already exists' ) );

Modified: trunk/vhffs-panel/cvs/delete.pl
===================================================================
--- trunk/vhffs-panel/cvs/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/cvs/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,7 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 

Modified: trunk/vhffs-panel/cvs/index.pl
===================================================================
--- trunk/vhffs-panel/cvs/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/cvs/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/dns/create.pl
===================================================================
--- trunk/vhffs-panel/dns/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/dns/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -12,6 +12,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Functions;
 use Vhffs::Panel::Main;
@@ -26,10 +27,10 @@
 my $vhffs = $panel->{'vhffs'};
 my $templatedir = $panel->{templatedir};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{cgi};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -54,7 +55,7 @@
 		} else {
 			my $dns = Vhffs::Panel::DNS::create_dns( $vhffs, $domain_name, $description, $user, $group );
 			if( defined $dns ) {
-				my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The DNS object was successfully created !');
+				my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The DNS object was successfully created !');
 				$panel->redirect($url);
 			} else {
 				$panel->add_error( gettext('An error occured while creating the object. The domain is not correct or aleady exists in Vhffs database') );

Modified: trunk/vhffs-panel/dns/delete.pl
===================================================================
--- trunk/vhffs-panel/dns/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/dns/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -60,19 +60,11 @@
 my $user = $panel->{'user'};
 
 my $dns = Vhffs::Services::DNS::get_by_domainname( $vhffs , $domain_name );
-
 my $templatedir = $vhffs->get_config->get_templatedir;
-
-my $maintemplate = $panel->{'template'};
-
-my $group = $panel->{'group'};
-
-
-my $template;
 my $output = "";
 my $message;
 
-$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
+my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 
 if( ! defined $domain_name )
 {

Modified: trunk/vhffs-panel/dns/index.pl
===================================================================
--- trunk/vhffs-panel/dns/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/dns/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/git/create.pl
===================================================================
--- trunk/vhffs-panel/git/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/git/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -42,6 +42,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -53,13 +54,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -73,7 +73,7 @@
 
 	if( $submitted ) {
 		$reponame = $cgi->param('reponame');
-		my $fullreponame = $groupname.'/'.$reponame.'.git';
+		my $fullreponame = $group->get_groupname.'/'.$reponame.'.git';
 		$description = Encode::decode_utf8( $cgi->param('description') );
 		unless( defined $reponame && defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -82,7 +82,7 @@
 		} elsif( $description =~ /^\s*$/) {
 			$panel->add_error( gettext('You must enter a description') );
 		} elsif( defined Vhffs::Panel::Git::create_git( $vhffs, $fullreponame, $description, $user, $group ) ) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The GIT object was successfully created !');
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The GIT object was successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( gettext('An error occured while creating the git repository') );
@@ -97,7 +97,7 @@
 		$template->param( REPOSITORY_VALUE => $reponame );
 		$template->param( GROUP_NAME => gettext('Group owning this git repository') );
 
-		$template->param( GROUP => $groupname );
+		$template->param( GROUP => $group->get_groupname );
 		$template->param( GIT_SUFFIX => '.git' );
 		$template->param( SEND => gettext('Send') );
 		$template->param( DESCRIPTION => gettext('Description') );

Modified: trunk/vhffs-panel/git/delete.pl
===================================================================
--- trunk/vhffs-panel/git/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/git/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,7 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $message;
 my $owner = $cgi->param("PROJECT_OWNER");

Modified: trunk/vhffs-panel/git/index.pl
===================================================================
--- trunk/vhffs-panel/git/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/git/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -48,7 +48,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/git/prefs.pl
===================================================================
--- trunk/vhffs-panel/git/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/git/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -63,6 +63,7 @@
 my $template;
 
 my $git = Vhffs::Services::Git::get_by_reponame( $vhffs , $repo_name );
+my $group = Vhffs::Group::get_by_gid( $vhffs , $git->{'owner_gid'} );
 
 unless( defined $repo_name )
 {
@@ -149,7 +150,7 @@
         $panel->add_error( gettext('Unable to apply modifications') );
         return 0;
     } else {
-        my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('Modifications applied. Please wait while your repository is being updated');
+        my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('Modifications applied. Please wait while your repository is being updated');
         $panel->redirect($url);
         return 1;
     }
@@ -194,7 +195,7 @@
             $panel->add_error( gettext('Unable to apply modifications') );
             return 0;
         } else {
-            my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('Modifications applied. Please wait while your repository is being updated');
+            my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('Modifications applied. Please wait while your repository is being updated');
             $panel->redirect($url);
             return 1;
         }

Modified: trunk/vhffs-panel/group/delete.pl
===================================================================
--- trunk/vhffs-panel/group/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/group/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -54,11 +54,10 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $message;
 
-my $groupname = $cgi->param('GROUPNAME');
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 my $sure = $cgi->param('DELETE');
 
 my $templatedir = $vhffs->get_config->get_templatedir;

Modified: trunk/vhffs-panel/group/history.pl
===================================================================
--- trunk/vhffs-panel/group/history.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/group/history.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -55,10 +55,11 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
+my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 my $template;
 
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 unless( defined $group ) {
 	$template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );

Modified: trunk/vhffs-panel/group/prefs.pl
===================================================================
--- trunk/vhffs-panel/group/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/group/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -60,11 +60,12 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $templatedir = $panel->{'templatedir'};
 my $cgi = $panel->{'cgi'};
 my $template;
 
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+
 unless( defined $group ) {
 	$template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( "Error. This group doesn't exists") );
@@ -236,8 +237,8 @@
 	if( defined $mg )
 	{
 		$template->param( CONTACT_EMAIL_TITLE => gettext('Project contact') );
-		$template->param( CONTACT_EMAIL_TEXT => sprintf( gettext('We offer you the possibility to forward emails from %s@%s.') , $group->{'groupname'} , $mg->{config}->{domain} ) );
-		$template->param( CONTACT_EMAIL => $group->{'groupname'}.'@'.$mg->{config}->{domain} );
+		$template->param( CONTACT_EMAIL_TEXT => sprintf( gettext('We offer you the possibility to forward emails from %s@%s.') , $group->get_groupname , $mg->{config}->{domain} ) );
+		$template->param( CONTACT_EMAIL => $group->get_groupname.'@'.$mg->{config}->{domain} );
 		$template->param( CONTACT_EMAIL_MODIFY => gettext('Modify') );
 		$template->param( CONTACT_EMAIL_FORWARD => $mg->getforward );
 

Modified: trunk/vhffs-panel/group/view.pl
===================================================================
--- trunk/vhffs-panel/group/view.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/group/view.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,9 +47,11 @@
 exit 0 unless $session;
 
 my $templatedir = $panel->{templatedir};
-my $groupname = $panel->{groupname};
+my $vhffs = $panel->{'vhffs'};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( defined $groupname )
+unless( defined $group )
 {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You must specify a project name' ) );

Modified: trunk/vhffs-panel/history.pl
===================================================================
--- trunk/vhffs-panel/history.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/history.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -58,8 +58,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $oid = $cgi->param("OID");
 

Modified: trunk/vhffs-panel/mail/create.pl
===================================================================
--- trunk/vhffs-panel/mail/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mail/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -40,6 +40,8 @@
 use Encode;
 
 use lib '%VHFFS_LIB_DIR%';
+use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Panel::Main;
 use Vhffs::Functions;
 
@@ -49,13 +51,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -77,7 +78,7 @@
 		} elsif( $description =~ /^\s*$/ ) {
 			$panel->add_error( gettext('You must enter a description') );
 		} elsif( defined(Vhffs::Panel::Mail::create_mail( $vhffs , $domain , $description, $user , $group )) ) {
-			my $url = '/group/view.pl?project='.$groupname.'&msg='.gettext('Mail domain successfully created !');
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('Mail domain successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( gettext('An error occured while creating the mail area') );
@@ -92,7 +93,7 @@
 		$template->param( DOMAIN_VALUE => $domain );
 		$template->param( GROUP_NAME => gettext('Group owning this mail domain') );
 
-		$template->param( GROUP => $groupname );
+		$template->param( GROUP => $group->get_groupname );
 		$template->param( SEND => gettext('Send') );
 		$template->param( DESCRIPTION_TEXT => gettext('Tell us for what purpose you want to create this mail domain') );
 		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );

Modified: trunk/vhffs-panel/mail/delete.pl
===================================================================
--- trunk/vhffs-panel/mail/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mail/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $domain = $cgi->param("name");
 my $sure = $cgi->param("DELETE");

Modified: trunk/vhffs-panel/mail/index.pl
===================================================================
--- trunk/vhffs-panel/mail/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mail/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/mail/prefs.pl
===================================================================
--- trunk/vhffs-panel/mail/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mail/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -58,7 +58,6 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 

Modified: trunk/vhffs-panel/mailinglist/create.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mailinglist/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -39,6 +39,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -51,13 +52,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -86,7 +86,7 @@
 		} elsif( $domain ne $default_domain &&  !Vhffs::Panel::Mail::is_owned_by_group( $vhffs, $domain, $group->get_gid ) ) {
 			$panel->add_error( gettext('You do not own this domain !') );
 		} elsif( defined Vhffs::Panel::MailingList::create_list( $vhffs, $localpart, $domain, $description, $user, $group ) ) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The mailing list object was successfully created !');
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The mailing list object was successfully created !');
 			$panel->redirect( $url );
 		} else {
 			$panel->add_error( gettext('An error occured while creating the object.It probably already exists') );

Modified: trunk/vhffs-panel/mailinglist/delete.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mailinglist/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -58,8 +58,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $domain = $cgi->param("domain");
 my $lpart = $cgi->param("local");

Modified: trunk/vhffs-panel/mailinglist/index.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mailinglist/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/mailinglist/prefs.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mailinglist/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -59,7 +59,6 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 
@@ -150,6 +149,7 @@
 	$template->param( BUTTON_ADD_MEMBERS => gettext("Add them !") );
 
 	my $emaillist = '';
+	my $group = Vhffs::Group::get_by_gid( $vhffs , $list->get_owner_gid );
 	if( defined $group )  {
 		foreach ( @{$group->get_users} )  {
 			$emaillist .= $_->{'mail'}."\n";

Modified: trunk/vhffs-panel/mysql/create.pl
===================================================================
--- trunk/vhffs-panel/mysql/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mysql/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -41,6 +41,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -52,13 +53,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -73,7 +73,7 @@
 
 	if( $submitted ) {
 		$dbsuffix = $cgi->param('db_suffix');
-		my $dbname = $groupname.'_'.$dbsuffix;
+		my $dbname = $group->get_groupname.'_'.$dbsuffix;
 		my $dbuser = $dbname;
 		$dbpass = $cgi->param('db_pass');
 		$description = Encode::decode_utf8( $cgi->param('description') );
@@ -87,7 +87,7 @@
 		} elsif(!Vhffs::Services::Mysql::check_dbpass($dbpass)) {
 			$panel->add_error( gettext('Invalid password. It must contain at least 3 characters') );
 		} elsif(defined Vhffs::Panel::Mysql::create_mysql($vhffs, $dbname, $user, $group, $dbuser, $dbpass, $description)) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The MySQL DB was successfully created !');
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The MySQL DB was successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( 'An error occured while creating the object.' );
@@ -99,13 +99,13 @@
 
 		$panel->set_title( gettext('Create a MySQL database') );
 
-		$template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $groupname, $groupname) );
+		$template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $group->get_groupname, $group->get_groupname) );
 		$template->param( GROUP_NAME => gettext('Group owning this database') );
-		$template->param( DB_PREFIX => $groupname.'_' );
+		$template->param( DB_PREFIX => $group->get_groupname.'_' );
 		$template->param( DB_SUFFIX => gettext('MySQL database name ') );
 		$template->param( DB_SUFFIX_VALUE => $dbsuffix );
 		$template->param( DB_PASS => gettext('MySQL password for this database ') );
-		$template->param( GROUP => $groupname );
+		$template->param( GROUP => $group->get_groupname );
 		$template->param( SEND => gettext('Send') );
 		$template->param( DESCRIPTION => gettext('Description') );
 		$template->param( DESCRIPTION_VALUE => $description );

Modified: trunk/vhffs-panel/mysql/delete.pl
===================================================================
--- trunk/vhffs-panel/mysql/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mysql/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -55,7 +55,6 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 

Modified: trunk/vhffs-panel/mysql/index.pl
===================================================================
--- trunk/vhffs-panel/mysql/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mysql/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/mysql/prefs.pl
===================================================================
--- trunk/vhffs-panel/mysql/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/mysql/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -55,12 +55,13 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 
 my $dbname = $cgi->param('name');
 my $mysql = Vhffs::Services::Mysql::get_by_dbname( $vhffs , $dbname );
+my $group = Vhffs::Group::get_by_gid( $vhffs , $mysql->{'owner_gid'} );
+
 my $template;
 
 
@@ -143,7 +144,7 @@
             $mysql->blank_password;
             return 0;
         } else {
-            my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('Password change request taken in account, please wait for processing');
+            my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('Password change request taken in account, please wait for processing');
             $panel->redirect($url);
             return 1;
         }

Modified: trunk/vhffs-panel/object/quickdelete.pl
===================================================================
--- trunk/vhffs-panel/object/quickdelete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/object/quickdelete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,7 +56,6 @@
 my $vhffs = $panel->{vhffs};
 my $templatedir = $panel->{templatedir};
 my $user = $panel->{user};
-my $group = $panel->{group};
 my $cgi = $panel->{cgi};
 
 my $oid = $cgi->param('oid');
@@ -86,7 +85,8 @@
 		$url = '/group/index.pl?msg='.gettext('This object has been deleted');
 	}
 	else {
-		$url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('This object has been deleted');
+		my $group = Vhffs::Group::get_by_gid( $vhffs , $object->get_owner_gid );
+		$url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('This object has been deleted');
 	}
 
 	if( $object->delete )  {

Modified: trunk/vhffs-panel/object/resubmit.pl
===================================================================
--- trunk/vhffs-panel/object/resubmit.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/object/resubmit.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,7 +56,6 @@
 my $vhffs = $panel->{vhffs};
 my $templatedir = $panel->{templatedir};
 my $user = $panel->{user};
-my $group = $panel->{group};
 my $cgi = $panel->{cgi};
 
 my $oid = $cgi->param('oid');
@@ -95,7 +94,8 @@
 			$url = '/group/index.pl?msg='.gettext('The new description has been submitted');
 		}
 		else {
-			$url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The new description has been submitted');
+			my $group = Vhffs::Group::get_by_gid( $vhffs , $object->get_owner_gid );
+			$url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The new description has been submitted');
 		}
 		$panel->redirect( $url );
 	}

Modified: trunk/vhffs-panel/pgsql/create.pl
===================================================================
--- trunk/vhffs-panel/pgsql/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/pgsql/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -41,6 +41,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -52,13 +53,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -73,7 +73,7 @@
 
 	if( $submitted ) {
 		$dbsuffix = $dbsuffix = $cgi->param('db_suffix');
-		my $dbname = $groupname.'_'.$dbsuffix;
+		my $dbname = $group->get_groupname.'_'.$dbsuffix;
 		my $dbuser = $dbname;
 		my $dbencoding = $cgi->param('db_encoding');
 		$dbpass = $cgi->param('db_pass');
@@ -90,7 +90,7 @@
 		} elsif(! defined Vhffs::Services::Pgsql::get_supported_encodings()->{$dbencoding}) {
 		    $panel->add_error( gettext('Invalid encoding') );
 		} elsif(defined Vhffs::Panel::Pgsql::create_pgsql($vhffs, $dbname, $user, $group, $dbuser, $dbpass, $dbencoding, $description)) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The PostgreSQL DB was successfully created !');
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The PostgreSQL DB was successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( 'An error occured while creating the object.' );
@@ -102,9 +102,9 @@
 
 		$panel->set_title( gettext('Create a PostgreSQL database') );
 
-		$template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $groupname, $groupname) );
+		$template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $group->get_groupname, $group->get_groupname) );
 		$template->param( GROUP_NAME => gettext("Group owning this database") );
-		$template->param( DB_PREFIX => $groupname.'_' );
+		$template->param( DB_PREFIX => $group->get_groupname.'_' );
 		$template->param( DB_SUFFIX => gettext("PostgreSQL database name ") );
 		$template->param( DB_SUFFIX_VALUE => $dbsuffix );
 		$template->param( DB_PASS => gettext("PostgreSQL password for this database ") );
@@ -113,7 +113,7 @@
 		my @encodings = map +{'encoding' => $_}, keys %{Vhffs::Services::Pgsql::get_supported_encodings()};
 		@encodings = sort { return -1 if($a->{'encoding'} eq 'UTF8'); return 1 if($b->{encoding} eq 'UTF8'); return $a->{encoding} cmp $b->{encoding}} @encodings;
 		$template->param( DB_ENCODINGS =>  \@encodings);
-		$template->param( GROUP => $groupname );
+		$template->param( GROUP => $group->get_groupname );
 		$template->param( SEND => gettext("Send") );
 		$template->param( DESCRIPTION => gettext("Description") );
 		$template->param( DESCRIPTION_VALUE => $description );

Modified: trunk/vhffs-panel/pgsql/delete.pl
===================================================================
--- trunk/vhffs-panel/pgsql/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/pgsql/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,7 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $message;
 my $owner = $cgi->param("PROJECT_OWNER");

Modified: trunk/vhffs-panel/pgsql/index.pl
===================================================================
--- trunk/vhffs-panel/pgsql/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/pgsql/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/pgsql/prefs.pl
===================================================================
--- trunk/vhffs-panel/pgsql/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/pgsql/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -54,12 +54,12 @@
 
 my $vhffs = $panel->{'vhffs'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $templatedir = $panel->{'templatedir'};
 
 my $dbname = $cgi->param('name');
 my $pgsql = Vhffs::Services::Pgsql::get_by_dbname( $vhffs , $dbname );
+my $group = Vhffs::Group::get_by_gid( $vhffs , $pgsql->{'owner_gid'} );
 
 my $template;
 
@@ -132,7 +132,7 @@
             $pgsql->blank_password;
             return 0;
         } else {
-            my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('Password change request taken in account, please wait for processing');
+            my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('Password change request taken in account, please wait for processing');
             $panel->redirect($url);
             return 1;
         }

Modified: trunk/vhffs-panel/repository/create.pl
===================================================================
--- trunk/vhffs-panel/repository/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/repository/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -42,6 +42,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -53,13 +54,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -77,8 +77,8 @@
 			$panel->add_error( gettext('CGI Error !') );
 		} elsif($description =~ /^\s*$/) {
 			$panel->add_error( gettext('You must enter a description') );
-		} elsif( defined Vhffs::Panel::Repository::create_repository( $vhffs, $groupname, $user, $group , $description ) ) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The repository was successfully created !');
+		} elsif( defined Vhffs::Panel::Repository::create_repository( $vhffs, $group->get_groupname, $user, $group , $description ) ) {
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The repository was successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( gettext('An error occured while creating the object. Check that this group doesn\'t already have a download repository') );
@@ -92,8 +92,8 @@
 		$template->param( REPOSITORY_NAME => gettext('Repository Name') );
 		$template->param( GROUP_NAME => gettext('Group owning this repository') );
 
-		$template->param( GROUP => $groupname );
-		$template->param( NAME => $groupname );
+		$template->param( GROUP => $group->get_groupname );
+		$template->param( NAME => $group->get_groupname );
 		$template->param( SEND => gettext('Send') );
 		$template->param( DESCRIPTION => gettext('Description') );
 		$template->param( DESCRIPTION_VALUE => $description );

Modified: trunk/vhffs-panel/repository/delete.pl
===================================================================
--- trunk/vhffs-panel/repository/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/repository/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,7 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $message;
 my $owner = $cgi->param("PROJECT_OWNER");

Modified: trunk/vhffs-panel/repository/index.pl
===================================================================
--- trunk/vhffs-panel/repository/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/repository/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/repository/prefs.pl
===================================================================
--- trunk/vhffs-panel/repository/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/repository/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,7 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $cgi = $panel->{'cgi'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $templatedir = $panel->{'templatedir'};
 
 my $repo_name = $cgi->param('name');

Modified: trunk/vhffs-panel/svn/create.pl
===================================================================
--- trunk/vhffs-panel/svn/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/svn/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -41,6 +41,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -52,13 +53,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -72,7 +72,7 @@
 
 	if( $submitted ) {
 		$reponame = $cgi->param('reponame');
-		my $fullreponame = $groupname.'/'.$reponame;
+		my $fullreponame = $group->get_groupname.'/'.$reponame;
 		$description = Encode::decode_utf8( $cgi->param('description') );
 
 		unless( defined $reponame && defined $description ) {
@@ -82,7 +82,7 @@
 		} elsif( $description =~ /^\s*$/) {
 			$panel->add_error( gettext('You must enter a description') );
 		} elsif( defined Vhffs::Panel::Svn::create_svn( $vhffs, $fullreponame, $description, $user, $group ) ) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The SVN object was successfully created !');
+			my $url = '/group/view.pl?project='.$group->get_groupname.'&msg='.gettext('The SVN object was successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( gettext('An error occured while creating the svn repository') );
@@ -97,7 +97,7 @@
 		$template->param( REPOSITORY_VALUE => $reponame);
 		$template->param( GROUP_NAME => gettext('Group owning this Subversion repository') );
 
-		$template->param( GROUP => $groupname );
+		$template->param( GROUP => $group->get_groupname );
 		$template->param( SEND => gettext('Send') );
 		$template->param( DESCRIPTION => gettext('Description') );
 		$template->param( DESCRIPTION_VALUE => $description );

Modified: trunk/vhffs-panel/svn/delete.pl
===================================================================
--- trunk/vhffs-panel/svn/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/svn/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -56,7 +56,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
 my $cgi = $panel->{'cgi'};
 my $message;
 my $owner = $cgi->param("PROJECT_OWNER");

Modified: trunk/vhffs-panel/svn/index.pl
===================================================================
--- trunk/vhffs-panel/svn/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/svn/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/svn/prefs.pl
===================================================================
--- trunk/vhffs-panel/svn/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/svn/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -58,6 +58,7 @@
 
 my $repo_name = $cgi->param("name");
 my $svn = Vhffs::Services::Svn::get_by_reponame( $vhffs , $repo_name );
+my $group = Vhffs::Group::get_by_gid( $vhffs , $svn->{'owner_gid'} );
 my $template;
 
 unless( defined $repo_name )
@@ -160,7 +161,7 @@
 
     if($svn->get_status == Vhffs::Constants::WAITING_FOR_MODIFICATION) {
         if($svn->commit > 0) {
-            my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('Modifications applied. Please wait while your repository is being updated');
+            my $url = '/group/view.pl?project='.$group->get_groupname.'&msg='.gettext('Modifications applied. Please wait while your repository is being updated');
             $panel->redirect($url);
             return 1;
 

Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/Makefile.am	2008-10-31 00:17:58 UTC (rev 1298)
@@ -86,6 +86,7 @@
 	main/auth.tmpl \
 	main/close.tmpl \
 	menu/context.tmpl \
+	menu/context-group.tmpl \
 	menu/context-modo.tmpl \
 	main/lost_failed.tmpl \
 	main/lost_ok.tmpl \

Modified: trunk/vhffs-panel/templates/admin/group/part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/group/part.tmpl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/admin/group/part.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -10,7 +10,7 @@
 		<TMPL_VAR ESCAPE=1 NAME="STATE"> 
 	</td>
 	<td>
-		<a href="/group/prefs.pl?admin_menu=1&amp;project=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="ACTION"></a>
+		<a href="/group/prefs.pl?admin_menu=1&amp;group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="ACTION"></a>
 	</td>
 </tr>
 </TMPL_LOOP>

Modified: trunk/vhffs-panel/templates/group/index.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/index.tmpl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/group/index.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -4,7 +4,7 @@
 <ul>
 <TMPL_LOOP NAME="OWNED_PROJECTS">
 <TMPL_IF NAME="ACTIVE">
-    <li><a href="/group/view.pl?project=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="GROUPNAME"></a></li>
+    <li><a href="/group/view.pl?group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="GROUPNAME"></a></li>
 <tmpl_else>
     <li><TMPL_VAR ESCAPE=1 NAME="GROUPNAME">&nbsp;&mdash;&nbsp;<TMPL_VAR ESCAPE=1 NAME="STATE">
     <TMPL_IF NAME="REFUSED">
@@ -23,7 +23,7 @@
 <ul>
 <TMPL_LOOP NAME="CONTRIBUTED_PROJECTS">
 <TMPL_IF NAME="ACTIVE">
-    <li><a href="/group/view.pl?project=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="GROUPNAME"></a></li>
+    <li><a href="/group/view.pl?group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="GROUPNAME"></a></li>
 <tmpl_else>
     <li><TMPL_VAR ESCAPE=1 NAME="GROUPNAME">&nbsp;&mdash;&nbsp;<TMPL_VAR ESCAPE=1 NAME="STATE"></li>
     <TMPL_IF NAME="REFUSED">

Modified: trunk/vhffs-panel/templates/group/info.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/info.tmpl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/group/info.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -10,8 +10,8 @@
 		<img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/quota_progress.png" width="<TMPL_VAR ESCAPE=1 NAME="QUOTA_WIDTH">" alt="<TMPL_VAR ESCAPE=1 NAME="QUOTA_WIDTH">"/>
 		</div>
 	</li>
-        <li><a href="/group/history.pl"><TMPL_VAR ESCAPE=1 NAME="TEXT_FULLHISTORY"></a></li>
-        <li><a href="/group/prefs.pl"><TMPL_VAR ESCAPE=1 NAME="TEXT_PREFS"></a></li>
+        <li><a href="/group/history.pl?group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="TEXT_FULLHISTORY"></a></li>
+        <li><a href="/group/prefs.pl?group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="TEXT_PREFS"></a></li>
 	<TMPL_IF NAME="HELP_URL">
         <li><a href="<TMPL_VAR ESCAPE=1 NAME="HELP_URL">"><TMPL_VAR ESCAPE=1 NAME="HELP_TEXT"></a></li>
 	</TMPL_IF>

Modified: trunk/vhffs-panel/templates/group/prefs.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/prefs.tmpl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/group/prefs.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -11,6 +11,7 @@
     <p><label for="description" class="description"><TMPL_VAR ESCAPE=1 NAME="TEXT_DESCRIPTION">:</label></p>
     <p><textarea name="description" id="description" class="description" cols="45" rows="7"><TMPL_VAR ESCAPE=1 NAME="VALUE_DESCRIPTION"></textarea></p>
     <p class="button" id="buttonModify">
+        <input type="hidden" name="group" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTNAME">"/>
         <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_MODIFY">" name="update_desc_submit"/>
     </p>
 </form>
@@ -21,7 +22,9 @@
 <TMPL_VAR ESCAPE=1 NAME="CONTACT_EMAIL_TEXT">
 <form action="#" method="post" accept-charset="utf-8">
 Forward emails from <TMPL_VAR ESCAPE=1 NAME="CONTACT_EMAIL"> to
-<input type="text" name="contact_email" id="contact_email" value="<TMPL_VAR ESCAPE=1 NAME="CONTACT_EMAIL_FORWARD">"/> <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="CONTACT_EMAIL_MODIFY">" name="contact_email_submit"/>
+<input type="text" name="contact_email" id="contact_email" value="<TMPL_VAR ESCAPE=1 NAME="CONTACT_EMAIL_FORWARD">"/> 
+<input type="hidden" name="group" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTNAME">"/>
+<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="CONTACT_EMAIL_MODIFY">" name="contact_email_submit"/>
 </form>
 <TMPL_IF NAME="HELP_URL">
 <a href="<TMPL_VAR ESCAPE=1 NAME="HELP_URL">"><TMPL_VAR ESCAPE=1 NAME="HELP_TEXT"></a>
@@ -38,6 +41,7 @@
 <TMPL_IF NAME="ACTIVE">
 <form action="#" method="post" accept-charset="utf-8">
 <input type="hidden" name="uid" value="<TMPL_VAR ESCAPE=1 NAME="uid">"/>
+<input type="hidden" name="group" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTNAME">"/>
 <p><label><TMPL_VAR ESCAPE=1 NAME="username"></label><input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="REMOVE_USER_TEXT">" name="remove_user_submit"/></p>
 </form>
 <tmpl_else>
@@ -54,6 +58,7 @@
 			<TMPL_VAR ESCAPE=1 NAME="TEXT_USERNAME">	
 		</label>
 		<input type="text" name="username" id="username_add" />
+                <input type="hidden" name="group" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTNAME">"/>
 		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SEND">" name="add_user_submit"/>
 	</p>
 </form>
@@ -100,7 +105,7 @@
 	</fieldset>
 	
 	<p class="button" id="buttonDelete">
-		<input type="hidden" name="name" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTNAME">" />
+		<input type="hidden" name="group" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTNAME">" />
 		<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_DELETE">" />
 	</p>
 

Added: trunk/vhffs-panel/templates/menu/context-group.tmpl
===================================================================
--- trunk/vhffs-panel/templates/menu/context-group.tmpl	                        (rev 0)
+++ trunk/vhffs-panel/templates/menu/context-group.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -0,0 +1,3 @@
+<TMPL_LOOP NAME="MENU_ITEMS">
+<a href="/<TMPL_VAR ESCAPE=1 NAME="PATH">/index.pl?group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="LABEL"></a>
+</TMPL_LOOP>

Modified: trunk/vhffs-panel/templates/menu/main.tmpl
===================================================================
--- trunk/vhffs-panel/templates/menu/main.tmpl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/menu/main.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -1,9 +1,4 @@
 <div id="header">
-    <TMPL_IF NAME="GROUPNAME">
-    <div id="group_menu">
-        <span id="groupname"><a href="/group/view.pl?project=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/projectcurrent.png" title="<TMPL_VAR ESCAPE=1 NAME="PROJECT_HOME_TEXT">" alt="<TMPL_VAR ESCAPE=1 NAME="PROJECT_HOME_TEXT">" onmouseover="javascript:this.timer=helpTimeout('user_project');" onmouseout="javascript:window.clearTimeout(this.timer);"/></a>&nbsp;<TMPL_VAR ESCAPE=1 NAME="CURRENT_GROUP_TEXT"> <TMPL_VAR ESCAPE=1 NAME="GROUPNAME"></span>
-    </div>
-    </TMPL_IF>
     <div id="top_menu">
         <div id="userToolBox">
             <a  href="/panel.pl" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_HOME">">

Modified: trunk/vhffs-panel/templates/misc/service_index.tmpl
===================================================================
--- trunk/vhffs-panel/templates/misc/service_index.tmpl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/misc/service_index.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -19,7 +19,7 @@
 <tmpl_else>
         <li><TMPL_VAR ESCAPE=1 NAME="NO_SERVICE_TEXT"></li>
 </TMPL_IF>
-        <li><a href="/<TMPL_VAR ESCAPE=1 NAME="SERVICE">/create.pl"><TMPL_VAR ESCAPE=1 NAME="NEW"></a></li>
+        <li><a href="/<TMPL_VAR ESCAPE=1 NAME="SERVICE">/create.pl?group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="NEW"></a></li>
         <TMPL_IF NAME="HELP_URL">
         <li><a href="<TMPL_VAR ESCAPE=1 NAME="HELP_URL">"><TMPL_VAR ESCAPE=1 NAME="HELP_TEXT"></a></li>
         </TMPL_IF>

Modified: trunk/vhffs-panel/templates/misc/welcome.tmpl
===================================================================
--- trunk/vhffs-panel/templates/misc/welcome.tmpl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/templates/misc/welcome.tmpl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -4,7 +4,7 @@
 <h2><TMPL_VAR ESCAPE=1 NAME="OVER_QUOTA_TEXT"></h2>
 <ul>
 <TMPL_LOOP NAME="OVER_QUOTA">
-    <li><a href="/group/view.pl?project=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="GROUPNAME"></a></li>
+    <li><a href="/group/view.pl?group=<TMPL_VAR ESCAPE=1 NAME="GROUPNAME">"><TMPL_VAR ESCAPE=1 NAME="GROUPNAME"></a></li>
 </TMPL_LOOP>
 </ul>
 </div>

Modified: trunk/vhffs-panel/user/delete.pl
===================================================================
--- trunk/vhffs-panel/user/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/user/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $groupname = $panel->{'groupname'};
 my $cgi = $panel->{'cgi'};
 my $message;
 my $owner = $cgi->param("PROJECT_OWNER");
@@ -98,6 +96,6 @@
 my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 $template->param( MESSAGE => $message );
 
-$panel->set_refresh_url( "/group/view.pl?project=$groupname" );
+$panel->set_refresh_url( '/panel.pl' );
 $panel->build( $template );
 $panel->display;

Modified: trunk/vhffs-panel/web/create.pl
===================================================================
--- trunk/vhffs-panel/web/create.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/web/create.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -41,6 +41,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
+use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
@@ -52,13 +53,12 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
 my $user = $panel->{user};
-my $group = $panel->{group};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
-unless( $user->can_modify( $group ) ) {
+unless( defined $group && $user->can_modify( $group ) ) {
 	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
 	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
@@ -80,7 +80,7 @@
 		} elsif( $description =~ /^\s*$/ ) {
 			$panel->add_error( gettext('You must enter a description') );
 		} elsif( defined(Vhffs::Panel::Web::create_web( $vhffs, $servername, $description, $user, $group)) ) {
-			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The webarea was successfully created !');
+			my $url = '/group/view.pl?group='.$group->get_groupname.'&msg='.gettext('The webarea was successfully created !');
 			$panel->redirect($url);
 		} else {
 			$panel->add_error( gettext('Error creating webarea.') );
@@ -98,7 +98,7 @@
 		$template->param( SERVERNAME_VALUE => $servername );
 		$template->param( GROUP_NAME => gettext('Group owning this web space') );
 
-		$template->param( GROUP => $groupname );
+		$template->param( GROUP => $group->get_groupname );
 		$template->param( SEND => gettext('Send') );
 		$template->param( DESCRIPTION => gettext('Tell us what the use of this web space will be') );
 		$template->param( WARNING_PUBLIC => gettext('Please consider that this description is going to be displayed in the public area. So you have to write it in impersonal form. You should take care to write it with correct grammar and tenses. Take all the time you need to fill it with the best content you are able to do.') ) if $panel->is_public;

Modified: trunk/vhffs-panel/web/delete.pl
===================================================================
--- trunk/vhffs-panel/web/delete.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/web/delete.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,8 +57,6 @@
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $groupname = $panel->{'groupname'};
 my $cgi = $panel->{'cgi'};
 my $message;
 my $owner = $cgi->param("PROJECT_OWNER");
@@ -72,8 +70,8 @@
 my $servername = $cgi->param("name");
 
 my $web = Vhffs::Services::Web::get_by_servername( $vhffs , $servername );
+my $group = Vhffs::Group::get_by_gid( $vhffs , $web->{'owner_gid'} );
 
-
 if( ! defined( $web ) ) 
 {
     $message = gettext("This web area doesn't exist in VHFFS database");
@@ -107,6 +105,6 @@
 my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 $template->param( MESSAGE => $message );
 
-$panel->set_refresh_url( "/group/view.pl?project=$groupname" );
+$panel->set_refresh_url( '/group/view.pl?group='.$group->get_groupname );
 $panel->build( $template );
 $panel->display;

Modified: trunk/vhffs-panel/web/index.pl
===================================================================
--- trunk/vhffs-panel/web/index.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/web/index.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -47,7 +47,8 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
+my $cgi = $panel->{'cgi'};
+my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
 
 if( ! defined($group) ) {
     $panel->set_title( gettext('Error') );

Modified: trunk/vhffs-panel/web/prefs.pl
===================================================================
--- trunk/vhffs-panel/web/prefs.pl	2008-10-30 07:15:19 UTC (rev 1297)
+++ trunk/vhffs-panel/web/prefs.pl	2008-10-31 00:17:58 UTC (rev 1298)
@@ -57,10 +57,7 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
-my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 my $cgi = $panel->{'cgi'};
 my $servername = $cgi->param("name");
 my $template;


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