[vhffs-dev] [866] All panel scripts are now using the new Vhffs::Panel API

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


Revision: 866
Author:   gradator
Date:     2007-09-06 18:07:30 +0000 (Thu, 06 Sep 2007)

Log Message:
-----------
All panel scripts are now using the new Vhffs::Panel API

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm
    trunk/vhffs-panel/Makefile.am
    trunk/vhffs-panel/acl/view.pl
    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/cvs/edit.pl
    trunk/vhffs-panel/admin/cvs/edit_submit.pl
    trunk/vhffs-panel/admin/cvs/index.pl
    trunk/vhffs-panel/admin/cvs/list.pl
    trunk/vhffs-panel/admin/cvs/search.pl
    trunk/vhffs-panel/admin/cvs/show.pl
    trunk/vhffs-panel/admin/dns/index.pl
    trunk/vhffs-panel/admin/dns/list.pl
    trunk/vhffs-panel/admin/dns/search.pl
    trunk/vhffs-panel/admin/group/edit.pl
    trunk/vhffs-panel/admin/group/edit_submit.pl
    trunk/vhffs-panel/admin/group/index.pl
    trunk/vhffs-panel/admin/group/list.pl
    trunk/vhffs-panel/admin/group/search.pl
    trunk/vhffs-panel/admin/group/show.pl
    trunk/vhffs-panel/admin/index.pl
    trunk/vhffs-panel/admin/mail/change_forward.pl
    trunk/vhffs-panel/admin/mail/delete_box.pl
    trunk/vhffs-panel/admin/mail/delete_forward.pl
    trunk/vhffs-panel/admin/mail/edit.pl
    trunk/vhffs-panel/admin/mail/index.pl
    trunk/vhffs-panel/admin/mail/list.pl
    trunk/vhffs-panel/admin/mail/password_box.pl
    trunk/vhffs-panel/admin/mail/search.pl
    trunk/vhffs-panel/admin/mail/show.pl
    trunk/vhffs-panel/admin/mailing/index.pl
    trunk/vhffs-panel/admin/mailing/list.pl
    trunk/vhffs-panel/admin/mailing/mailing_submit.pl
    trunk/vhffs-panel/admin/mailing/search.pl
    trunk/vhffs-panel/admin/moderation.pl
    trunk/vhffs-panel/admin/moderation_submit.pl
    trunk/vhffs-panel/admin/mysql/edit.pl
    trunk/vhffs-panel/admin/mysql/edit_submit.pl
    trunk/vhffs-panel/admin/mysql/index.pl
    trunk/vhffs-panel/admin/mysql/list.pl
    trunk/vhffs-panel/admin/mysql/search.pl
    trunk/vhffs-panel/admin/mysql/show.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/edit.pl
    trunk/vhffs-panel/admin/pgsql/edit_submit.pl
    trunk/vhffs-panel/admin/pgsql/index.pl
    trunk/vhffs-panel/admin/pgsql/list.pl
    trunk/vhffs-panel/admin/pgsql/search.pl
    trunk/vhffs-panel/admin/pgsql/show.pl
    trunk/vhffs-panel/admin/repository/edit.pl
    trunk/vhffs-panel/admin/repository/edit_submit.pl
    trunk/vhffs-panel/admin/repository/index.pl
    trunk/vhffs-panel/admin/repository/list.pl
    trunk/vhffs-panel/admin/repository/search.pl
    trunk/vhffs-panel/admin/repository/show.pl
    trunk/vhffs-panel/admin/stats.pl
    trunk/vhffs-panel/admin/su.pl
    trunk/vhffs-panel/admin/svn/index.pl
    trunk/vhffs-panel/admin/svn/list.pl
    trunk/vhffs-panel/admin/svn/search.pl
    trunk/vhffs-panel/admin/user/edit.pl
    trunk/vhffs-panel/admin/user/edit_note.pl
    trunk/vhffs-panel/admin/user/edit_submit.pl
    trunk/vhffs-panel/admin/user/index.pl
    trunk/vhffs-panel/admin/user/list.pl
    trunk/vhffs-panel/admin/user/search.pl
    trunk/vhffs-panel/admin/user/show.pl
    trunk/vhffs-panel/admin/web/edit.pl
    trunk/vhffs-panel/admin/web/edit_submit.pl
    trunk/vhffs-panel/admin/web/index.pl
    trunk/vhffs-panel/admin/web/list.pl
    trunk/vhffs-panel/admin/web/search.pl
    trunk/vhffs-panel/admin/web/show.pl
    trunk/vhffs-panel/ajax/help.pl
    trunk/vhffs-panel/alert.pl
    trunk/vhffs-panel/alert_submit.pl
    trunk/vhffs-panel/auth.pl
    trunk/vhffs-panel/cvs/create.pl
    trunk/vhffs-panel/cvs/delete.pl
    trunk/vhffs-panel/cvs/index.pl
    trunk/vhffs-panel/cvs/prefs.pl
    trunk/vhffs-panel/dns/create.pl
    trunk/vhffs-panel/dns/delete.pl
    trunk/vhffs-panel/dns/index.pl
    trunk/vhffs-panel/dns/prefs.pl
    trunk/vhffs-panel/group/create.pl
    trunk/vhffs-panel/group/delete.pl
    trunk/vhffs-panel/group/history.pl
    trunk/vhffs-panel/group/prefs.pl
    trunk/vhffs-panel/history.pl
    trunk/vhffs-panel/lost.pl
    trunk/vhffs-panel/lost_ack.pl
    trunk/vhffs-panel/mail/add_account.pl
    trunk/vhffs-panel/mail/add_forward.pl
    trunk/vhffs-panel/mail/change_forward.pl
    trunk/vhffs-panel/mail/create.pl
    trunk/vhffs-panel/mail/delete.pl
    trunk/vhffs-panel/mail/delete_box.pl
    trunk/vhffs-panel/mail/delete_forward.pl
    trunk/vhffs-panel/mail/index.pl
    trunk/vhffs-panel/mail/password_box.pl
    trunk/vhffs-panel/mail/prefs.pl
    trunk/vhffs-panel/mail/save_catchall.pl
    trunk/vhffs-panel/mail/spambox.pl
    trunk/vhffs-panel/mail/spamvirus.pl
    trunk/vhffs-panel/mailinglist/add_sub.pl
    trunk/vhffs-panel/mailinglist/change_right.pl
    trunk/vhffs-panel/mailinglist/create.pl
    trunk/vhffs-panel/mailinglist/del_member.pl
    trunk/vhffs-panel/mailinglist/delete.pl
    trunk/vhffs-panel/mailinglist/index.pl
    trunk/vhffs-panel/mailinglist/prefs.pl
    trunk/vhffs-panel/mailinglist/save_options.pl
    trunk/vhffs-panel/mailinglist/save_sig.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/mysql/prefs_save.pl
    trunk/vhffs-panel/object/upavatar.pl
    trunk/vhffs-panel/panel.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/pgsql/prefs_save.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/repository/prefs_save.pl
    trunk/vhffs-panel/subscribe.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/svn/prefs_save.pl
    trunk/vhffs-panel/user/delete.pl
    trunk/vhffs-panel/user/prefs.pl
    trunk/vhffs-panel/user/projects.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
    trunk/vhffs-panel/web/prefs_save.pl

Removed Paths:
-------------
    trunk/vhffs-panel/help/


Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2007-09-06 18:07:30 UTC (rev 866)
@@ -275,12 +275,6 @@
 }
 
 
-sub get_lang
-{
-	return CGI->cookie( 'language' );
-}
-
-
 sub new
 {
 	my $class = ref($_[0]) || $_[0];

Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/Makefile.am	2007-09-06 18:07:30 UTC (rev 866)
@@ -105,8 +105,6 @@
 	group/delete.pl \
 	group/prefs.pl \
 	group/history.pl \
-	help/cvs.html \
-	help/index.html \
 	js/prototype.js \
 	js/commons.js \
 	js/tooltip.js \

Modified: trunk/vhffs-panel/acl/view.pl
===================================================================
--- trunk/vhffs-panel/acl/view.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/acl/view.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,10 +48,11 @@
 use Vhffs::Services::Web;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $user = $panel->{user};
@@ -179,4 +180,5 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/broadcast.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/broadcast.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -45,13 +45,13 @@
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -80,5 +80,6 @@
 	$template->param( TEXT_SUBMIT => gettext("Ok, send it !") );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/broadcast_delete.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/broadcast_delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,16 +48,16 @@
 use Vhffs::Services::Web;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $template;
 
 my $cgi          = $panel->{'cgi'};
 my $vhffs        = $panel->{'vhffs'};
-my $session      = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user         = $panel->{'user'};
 my $group        = $panel->{'group'};
@@ -97,4 +97,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/broadcast_list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/broadcast_list.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/broadcast_list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,13 +46,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Constants;
 use Vhffs::Misc::Mailings;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -109,5 +109,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/broadcast_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/broadcast_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,16 +48,16 @@
 use Vhffs::Services::Web;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $template;
 
 my $cgi          = $panel->{'cgi'};
 my $vhffs        = $panel->{'vhffs'};
-my $session      = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user         = $panel->{'user'};
 my $group        = $panel->{'group'};
@@ -97,4 +97,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/broadcast.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/broadcast_view.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_view.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/broadcast_view.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,13 +46,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Constants;
 use Vhffs::Misc::Mailings;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -106,5 +106,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/cvs/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/cvs/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -201,5 +201,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/cvs/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/cvs/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -50,12 +50,11 @@
 use Vhffs::Services::Cvs;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -112,4 +111,5 @@
 
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/cvs/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/cvs/index.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/cvs/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/cvs/list.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/cvs/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -50,12 +50,11 @@
 use Vhffs::Constants;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -106,4 +105,5 @@
 	$template->param( LIST => $subtemplate->output );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/cvs/search.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/cvs/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -78,5 +78,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/cvs/show.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/cvs/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -118,5 +118,6 @@
 	$template->param( VALUE_HISTORY => "/history.pl?OID=$oid" );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/dns/index.pl
===================================================================
--- trunk/vhffs-panel/admin/dns/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/dns/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/dns/list.pl
===================================================================
--- trunk/vhffs-panel/admin/dns/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/dns/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -110,4 +110,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/dns/search.pl
===================================================================
--- trunk/vhffs-panel/admin/dns/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/dns/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -79,4 +79,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/group/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/group/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/group/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $projectname = $session->param("project");
@@ -197,4 +197,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/group/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/group/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/group/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $projectname = $session->param("project");
@@ -121,4 +121,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/group/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/group/index.pl
===================================================================
--- trunk/vhffs-panel/admin/group/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/group/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/group/list.pl
===================================================================
--- trunk/vhffs-panel/admin/group/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/group/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Panel::Group;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -110,4 +110,5 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/group/search.pl
===================================================================
--- trunk/vhffs-panel/admin/group/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/group/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -80,4 +80,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/group/show.pl
===================================================================
--- trunk/vhffs-panel/admin/group/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/group/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $projectname = $session->param("project");
@@ -111,4 +111,5 @@
 	$template->param( VALUE_HISTORY => "/history.pl?OID=$oid" );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/index.pl
===================================================================
--- trunk/vhffs-panel/admin/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -39,10 +39,11 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::Panel::Main;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_modo;
 
@@ -56,7 +57,6 @@
 my $items;
 my $c;
 if( $user->is_moderator ) { 
-#    push @$categories, Vhffs::Panel::Admin::get_modo_category;
     $categories = Vhffs::Panel::Admin::get_all_modo_categories($panel->{vhffs});
 } else {
     $categories = Vhffs::Panel::Admin::get_all_admin_categories($panel->{vhffs});
@@ -64,4 +64,5 @@
 
 $template->param( CATEGORIES => $categories );
 
-$panel->display($template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mail/change_forward.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/change_forward.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/change_forward.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -111,5 +111,6 @@
 	$template->param( MESSAGE => $message );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mail/delete_box.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/delete_box.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/delete_box.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -110,5 +110,6 @@
 	$template->param( MESSAGE => $message );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mail/delete_forward.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/delete_forward.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/delete_forward.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -111,5 +111,6 @@
 	$template->param( MESSAGE => $message );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mail/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -233,4 +233,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mail/index.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/mail/list.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -113,5 +113,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mail/password_box.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/password_box.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/password_box.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -112,4 +112,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mail/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -80,4 +80,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mail/show.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mail/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -140,4 +140,5 @@
 	$template->param( POPBOXES => $output );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mailing/index.pl
===================================================================
--- trunk/vhffs-panel/admin/mailing/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mailing/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/mailing/list.pl
===================================================================
--- trunk/vhffs-panel/admin/mailing/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mailing/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,12 +47,11 @@
 use Vhffs::Panel::MailingList;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -106,5 +105,6 @@
 
     }
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mailing/mailing_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/mailing/mailing_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mailing/mailing_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,12 +48,11 @@
 use Vhffs::Misc::Mailings;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -92,5 +91,6 @@
 
 $template->param( MESSAGE => $message );
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mailing/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mailing/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mailing/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,13 +46,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -79,4 +79,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/moderation.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/moderation.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -51,23 +51,20 @@
 use Vhffs::Note;
 
 my $panel = new Vhffs::Panel::Main();
-my $temp;
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 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;
-
 my $templatesdir = $vhffs->get_config->get_templatedir;
 
+my $template;
+my $temp;
 
 #Use is not allowed to see this page, only MODERATOR and ADMIN
 if( ($user->is_moderator != 1 ) && ( $user->is_admin ) != 1 ) 
@@ -515,4 +512,5 @@
 	
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/moderation_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/moderation_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,16 +49,16 @@
 use Vhffs::Acl;
 use Vhffs::Constants;
 use Vhffs::ObjectFactory;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $template;
 
 my $cgi          = $panel->{'cgi'};
 my $vhffs        = $panel->{'vhffs'};
-my $session      = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user         = $panel->{'user'};
 my $group        = $panel->{'group'};
@@ -143,4 +143,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/moderation.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mysql/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mysql/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -193,5 +193,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mysql/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mysql/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $projectname = $session->param("project");
@@ -113,4 +113,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/mysql/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mysql/index.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mysql/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/mysql/list.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mysql/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Panel::Mysql;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -110,4 +110,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/mysql/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mysql/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -79,5 +79,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/mysql/show.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/mysql/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -110,4 +110,5 @@
 	$template->param( VALUE_HISTORY => "/history.pl?OID=$oid" );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/object/delete_avatar.pl
===================================================================
--- trunk/vhffs-panel/admin/object/delete_avatar.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/object/delete_avatar.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,10 +49,11 @@
 use Vhffs::Panel::Avatar;
 
 my $panel = new Vhffs::Panel::Main();
-exit 0 unless defined $panel;
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -105,5 +106,6 @@
 }
 $template->param( MESSAGE => $message );
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/object/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/object/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/object/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,13 +46,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -227,5 +227,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/object/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/object/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/object/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -94,5 +94,6 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/object/list.pl
===================================================================
--- trunk/vhffs-panel/admin/object/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/object/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,11 +48,13 @@
 use Vhffs::Panel::Object;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
 exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -101,4 +103,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/object/search.pl
===================================================================
--- trunk/vhffs-panel/admin/object/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/object/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -76,5 +76,6 @@
 	$template->param( TITLE => gettext("Search an object (give object_id)") );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/pgsql/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/pgsql/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -192,4 +192,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/pgsql/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/pgsql/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -110,4 +110,5 @@
 
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/pgsql/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/pgsql/index.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/pgsql/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/pgsql/list.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/pgsql/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -111,5 +111,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/pgsql/search.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/pgsql/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -79,4 +79,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/pgsql/show.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/pgsql/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -110,4 +110,5 @@
 	$template->param( VALUE_HISTORY => "/history.pl?OID=$oid" );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/repository/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/repository/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -192,5 +192,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/repository/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/repository/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -50,12 +50,11 @@
 use Vhffs::Services::Repository;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -113,4 +112,5 @@
 
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/repository/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/repository/index.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/repository/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/repository/list.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/repository/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Panel::Repository;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -111,4 +111,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/repository/search.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/repository/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -78,5 +78,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/repository/show.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/repository/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -112,5 +112,6 @@
 	$template->param( VALUE_HISTORY => "/history.pl?OID=$oid" );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/stats.pl
===================================================================
--- trunk/vhffs-panel/admin/stats.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/stats.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -166,4 +166,5 @@
 	$template->param( VALUE_TOTAL_SUBS => $stats->get_lists_totalsubs );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/su.pl
===================================================================
--- trunk/vhffs-panel/admin/su.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/su.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -45,13 +45,13 @@
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -79,5 +79,6 @@
 	$template->param( TEXT_SUBMIT => gettext("Su !") );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/svn/index.pl
===================================================================
--- trunk/vhffs-panel/admin/svn/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/svn/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/svn/list.pl
===================================================================
--- trunk/vhffs-panel/admin/svn/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/svn/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -39,12 +39,11 @@
 use Vhffs::Panel::Svn;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -95,4 +94,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/svn/search.pl
===================================================================
--- trunk/vhffs-panel/admin/svn/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/svn/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -80,5 +80,6 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;
 

Modified: trunk/vhffs-panel/admin/user/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/user/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/user/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -267,4 +267,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/user/edit_note.pl
===================================================================
--- trunk/vhffs-panel/admin/user/edit_note.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/user/edit_note.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Stats;
 use Vhffs::Note;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs          = $panel->{'vhffs'};
-my $session        = $panel->{'session'};
 my $maintemplate   = $panel->{'template'};
 my $user           = $panel->{'user'};
 my $group          = $panel->{'group'};
@@ -105,4 +105,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/user/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/user/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/user/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/user/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs          = $panel->{'vhffs'};
-my $session        = $panel->{'session'};
 my $maintemplate   = $panel->{'template'};
 my $user           = $panel->{'user'};
 my $group          = $panel->{'group'};
@@ -140,4 +140,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/user/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/user/index.pl
===================================================================
--- trunk/vhffs-panel/admin/user/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/user/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/user/list.pl
===================================================================
--- trunk/vhffs-panel/admin/user/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/user/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -40,12 +40,11 @@
 use Vhffs::Panel::User;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -99,4 +98,5 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/user/search.pl
===================================================================
--- trunk/vhffs-panel/admin/user/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/user/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -79,4 +79,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/user/show.pl
===================================================================
--- trunk/vhffs-panel/admin/user/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/user/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -50,12 +50,11 @@
 use Vhffs::Functions;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -156,4 +155,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/web/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/web/edit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/web/edit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -187,4 +187,5 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/web/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/web/edit_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/web/edit_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -106,4 +106,5 @@
 
 
 set_refresh_url Vhffs::Panel::Main($panel, "/admin/web/list.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/web/index.pl
===================================================================
--- trunk/vhffs-panel/admin/web/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/web/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,9 +42,9 @@
 use Vhffs::Panel::Admin;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 $panel->check_admin;
 

Modified: trunk/vhffs-panel/admin/web/list.pl
===================================================================
--- trunk/vhffs-panel/admin/web/list.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/web/list.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -39,12 +39,11 @@
 use Vhffs::Panel::Web;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -101,4 +100,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/web/search.pl
===================================================================
--- trunk/vhffs-panel/admin/web/search.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/web/search.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -80,4 +80,5 @@
 }
 
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/admin/web/show.pl
===================================================================
--- trunk/vhffs-panel/admin/web/show.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/admin/web/show.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -109,4 +109,5 @@
 	$template->param( VALUE_STATUS => Vhffs::Functions::status_string_from_status_id ($object->get_status) );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/ajax/help.pl
===================================================================
--- trunk/vhffs-panel/ajax/help.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/ajax/help.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -37,27 +37,20 @@
 use Vhffs::Main;
 use Vhffs::Panel::Main;
 
-my $cgi = new CGI;
-my $vhffs = init Vhffs::Main;
+my $panel = new Vhffs::Panel::Main();
+my $vhffs = $panel->{'vhffs'};
+my $cgi = $panel->{cgi};
 my $topic = $cgi->param('topic');
 
 print CGI->header( -type=>'text/html', -charset=>'utf-8' );
-if(!$vhffs) {
-    print gettext('Database error');
-    exit(1);
+unless( $vhffs ) {
+	print gettext('Database error');
+	exit(1);
 }
 
-my $lang = Vhffs::Panel::Main::get_lang;
-
-my $msg;
-if(! defined $topic ) {
-    print gettext('Topic not found');
-} else {
-    $topic = 'help_'.$topic;
-    $msg = gettext($topic);
-    if($msg eq $topic) {
-        $msg = gettext('Topic not found');
-    }
-    print $msg;
+my $msg = gettext('Topic not found');
+if( defined $topic ) {
+	$topic = 'help_'.$topic;
+	$msg = gettext($topic) if( gettext($topic) ne $topic);
 }
-
+print $msg;

Modified: trunk/vhffs-panel/alert.pl
===================================================================
--- trunk/vhffs-panel/alert.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/alert.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,13 +46,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -70,4 +70,5 @@
 $template->param( YOUR_MESSAGE_TEXT => gettext("Your message") );
 $template->param( SEND => gettext("Send") );
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/alert_submit.pl
===================================================================
--- trunk/vhffs-panel/alert_submit.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/alert_submit.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,13 +46,13 @@
 use Vhffs::Panel::Menu;
 use Vhffs::Stats;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 #my $group = $panel->{'group'};
@@ -84,4 +84,5 @@
 	$template->param( MESSAGE => gettext("Cannot send message, CGI error...") );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/auth.pl
===================================================================
--- trunk/vhffs-panel/auth.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/auth.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -44,6 +44,8 @@
 use Vhffs::Constants;
 
 my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+
 my $vhffs = $panel->{'vhffs'};
 my $templatedir = $panel->{'templatedir'};
 my $cgi = $panel->{cgi};

Modified: trunk/vhffs-panel/cvs/create.pl
===================================================================
--- trunk/vhffs-panel/cvs/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/cvs/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,12 +47,11 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -105,5 +104,6 @@
     $template->param( DESCRIPTION => gettext("Description") );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }

Modified: trunk/vhffs-panel/cvs/delete.pl
===================================================================
--- trunk/vhffs-panel/cvs/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/cvs/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,12 +49,11 @@
 use Vhffs::Services::Cvs;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -107,4 +106,5 @@
 my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 $template->param( MESSAGE => $message );
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/cvs/index.pl
===================================================================
--- trunk/vhffs-panel/cvs/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/cvs/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::Cvs;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/cvs/prefs.pl
===================================================================
--- trunk/vhffs-panel/cvs/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/cvs/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,12 +47,11 @@
 use Vhffs::Panel::Menu;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -139,4 +138,5 @@
     $template->param( PUBLIC => $cvs->is_public );
 }
 
-display Vhffs::Panel::Main($panel, $template->output );
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/dns/create.pl
===================================================================
--- trunk/vhffs-panel/dns/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/dns/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -18,12 +18,11 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -69,5 +68,6 @@
     $template->param( DESCRIPTION => gettext('Description') );
     $template->param( DESCRIPTION_VALUE => $description );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }

Modified: trunk/vhffs-panel/dns/delete.pl
===================================================================
--- trunk/vhffs-panel/dns/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/dns/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,12 +46,13 @@
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
 
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
+
 my $cgi = $panel->{'cgi'};
-
 my $vhffs = $panel->{'vhffs'};
 my $domain_name = $cgi->param("name");
 my $sure = $cgi->param("DELETE");
@@ -61,11 +62,9 @@
 
 my $templatedir = $vhffs->get_config->get_templatedir;
 
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 
 my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 
 
 my $template;
@@ -114,4 +113,5 @@
 }
 
 $template->param( MESSAGE => $message );
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/dns/index.pl
===================================================================
--- trunk/vhffs-panel/dns/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/dns/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::DNS;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/dns/prefs.pl
===================================================================
--- trunk/vhffs-panel/dns/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/dns/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,10 +46,12 @@
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
 
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
+
 my $cgi = $panel->{'cgi'};
 
 my $vhffs = $panel->{'vhffs'};
@@ -60,12 +62,9 @@
 
 my $dns = Vhffs::Services::DNS::get_by_domainname( $vhffs , $domain_name );
 
-
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 
 my $group = $panel->{'group'};
-my $projectname = $session->param("project");
 
 my $templatedir = $vhffs->get_config->get_templatedir;
 my $thirdtemplate;
@@ -426,4 +425,5 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/group/create.pl
===================================================================
--- trunk/vhffs-panel/group/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/group/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -45,9 +45,9 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $user = $panel->{user};
@@ -87,6 +87,7 @@
     $template->param( PROJECT_VALUE => CGI::escapeHTML( $groupname ) );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML( $description ) );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }
 

Modified: trunk/vhffs-panel/group/delete.pl
===================================================================
--- trunk/vhffs-panel/group/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/group/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,12 +47,11 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -95,4 +94,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/group/prefs.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/group/history.pl
===================================================================
--- trunk/vhffs-panel/group/history.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/group/history.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,9 +49,10 @@
 
 my $panel = new Vhffs::Panel::Main();
 exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $projectname = $session->param("project");
@@ -115,4 +116,5 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/group/prefs.pl
===================================================================
--- trunk/vhffs-panel/group/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/group/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,9 +49,10 @@
 
 my $panel = new Vhffs::Panel::Main();
 exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $projectname = $session->param("project");
@@ -247,4 +248,5 @@
 	$template->param( CURRENT_USERS => gettext( 'All users in this group' ) );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/history.pl
===================================================================
--- trunk/vhffs-panel/history.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/history.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Acl;
 use Vhffs::Constants;
 use Vhffs::Functions;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -136,4 +136,5 @@
 	}
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/lost.pl
===================================================================
--- trunk/vhffs-panel/lost.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/lost.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -42,6 +42,8 @@
 
 
 my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+
 my $vhffs = $panel->{'vhffs'};
 my $templatedir = $panel->{'templatedir'};
 my $cgi = $panel->{'cgi'};

Modified: trunk/vhffs-panel/lost_ack.pl
===================================================================
--- trunk/vhffs-panel/lost_ack.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/lost_ack.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -45,6 +45,8 @@
 use Vhffs::Services::MailUser;
 
 my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+
 my $vhffs = $panel->{'vhffs'};
 my $templatedir = $panel->{'templatedir'};
 my $cgi = $panel->{'cgi'};

Modified: trunk/vhffs-panel/mail/add_account.pl
===================================================================
--- trunk/vhffs-panel/mail/add_account.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/add_account.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -111,4 +111,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/add_forward.pl
===================================================================
--- trunk/vhffs-panel/mail/add_forward.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/add_forward.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -102,4 +102,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/change_forward.pl
===================================================================
--- trunk/vhffs-panel/mail/change_forward.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/change_forward.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -111,4 +111,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/create.pl
===================================================================
--- trunk/vhffs-panel/mail/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -43,9 +43,9 @@
 use Vhffs::Functions;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};
@@ -87,6 +87,7 @@
     $template->param( DESCRIPTION_TEXT => gettext('Tell us for what purpose you want to create this mail domain') );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }
 

Modified: trunk/vhffs-panel/mail/delete.pl
===================================================================
--- trunk/vhffs-panel/mail/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -105,4 +105,5 @@
 
 $template->param( MESSAGE => $message );
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/delete_box.pl
===================================================================
--- trunk/vhffs-panel/mail/delete_box.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/delete_box.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -108,4 +108,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/delete_forward.pl
===================================================================
--- trunk/vhffs-panel/mail/delete_forward.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/delete_forward.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -103,4 +103,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/index.pl
===================================================================
--- trunk/vhffs-panel/mail/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::Mail;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/mail/password_box.pl
===================================================================
--- trunk/vhffs-panel/mail/password_box.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/password_box.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -111,4 +111,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/prefs.pl
===================================================================
--- trunk/vhffs-panel/mail/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -219,4 +219,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/save_catchall.pl
===================================================================
--- trunk/vhffs-panel/mail/save_catchall.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/save_catchall.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -102,4 +102,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/spambox.pl
===================================================================
--- trunk/vhffs-panel/mail/spambox.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/spambox.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,10 +49,11 @@
 use Vhffs::Constants;
 
 my $panel = new Vhffs::Panel::Main();
-exit 0 unless defined $panel;
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -116,4 +117,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mail/spamvirus.pl
===================================================================
--- trunk/vhffs-panel/mail/spamvirus.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mail/spamvirus.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Mail;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -117,4 +117,5 @@
 }
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mail/prefs.pl?name=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/add_sub.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/add_sub.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/add_sub.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -51,9 +51,10 @@
 
 my $panel = new Vhffs::Panel::Main();
 exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -116,4 +117,5 @@
 
 $template->param( MESSAGE => $message );
 set_refresh_url Vhffs::Panel::Main($panel, "/mailinglist/prefs.pl?local=$lpart&domain=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/change_right.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/change_right.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/change_right.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,13 +49,13 @@
 use Vhffs::Services::MailingList;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -115,4 +115,5 @@
 
 $template->param( MESSAGE => $message );
 set_refresh_url Vhffs::Panel::Main($panel, "/mailinglist/prefs.pl?local=$lpart&domain=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/create.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -45,9 +45,9 @@
 use Vhffs::Panel::Mail;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs           = $panel->{vhffs};
 my $user            = $panel->{user};
@@ -85,19 +85,18 @@
     }
 }
 
+my $template;
+
 if(!$submitted || $panel->has_errors()) {
     my $domains = Vhffs::Panel::MailingList::getall_mdomains_per_group( $vhffs, $group->get_gid );
     push(@$domains, { domain => $default_domain }) if(defined $default_domain);
 
-    my $template;
-
     my $templatedir = $vhffs->get_config->get_templatedir;
 
     $panel->set_title( gettext("Create a new mailing list") );
 
     if( ( !@$domains ) && ( ! defined $default_domain ) ) {
         $panel->add_error( gettext('There is no default mail domain on this platform, you have to create a mail domain before creating a mailing list') );
-        display Vhffs::Panel::Main($panel, '');
     } else {
 	    $template = new HTML::Template::Expr( filename => $templatedir."/panel/mailinglist/create.tmpl", global_vars => 1 );
 
@@ -112,7 +111,8 @@
         $template->param( LOCALPART_VALUE => $localpart );
         $template->param( DOMAIN_VALUE => $domain );
         $template->param( DESCRIPTION_VALUE => $description );
-        display Vhffs::Panel::Main($panel, $template->output);
     }
 }
 
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/del_member.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/del_member.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/del_member.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Services::MailingList;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -110,4 +110,5 @@
 
 $template->param( MESSAGE => $message );
 set_refresh_url Vhffs::Panel::Main($panel, "/mailinglist/prefs.pl?local=$lpart&domain=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/delete.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,13 +48,13 @@
 use Vhffs::Services::MailingList;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -112,4 +112,5 @@
 
 $template->param( MESSAGE => $message );
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/index.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::MailingList;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/mailinglist/prefs.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,11 +47,13 @@
 use Vhffs::Services::MailingList;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
 exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -229,4 +231,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/save_options.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/save_options.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/save_options.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,11 +47,13 @@
 use Vhffs::Services::MailingList;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
 exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -132,4 +134,5 @@
 
 $template->param( MESSAGE => $message );
 set_refresh_url Vhffs::Panel::Main($panel, "/mailinglist/prefs.pl?local=$lpart&domain=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mailinglist/save_sig.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/save_sig.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mailinglist/save_sig.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::MailingList;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -100,4 +100,5 @@
 
 $template->param( MESSAGE => $message );
 set_refresh_url Vhffs::Panel::Main($panel, "/mailinglist/prefs.pl?local=$lpart&domain=$domain", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mysql/create.pl
===================================================================
--- trunk/vhffs-panel/mysql/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mysql/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,9 +46,9 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
@@ -104,5 +104,6 @@
     $template->param( DESCRIPTION => gettext("Description") );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }

Modified: trunk/vhffs-panel/mysql/delete.pl
===================================================================
--- trunk/vhffs-panel/mysql/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mysql/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,12 +48,11 @@
 use Vhffs::Services::Mysql;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -102,4 +101,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mysql/prefs.pl?name=$dbname", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mysql/index.pl
===================================================================
--- trunk/vhffs-panel/mysql/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mysql/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::Mysql;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/mysql/prefs.pl
===================================================================
--- trunk/vhffs-panel/mysql/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mysql/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,12 +46,11 @@
 use Vhffs::Panel::Menu;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -120,4 +119,5 @@
 	$template->param( TEXT_DELETE => gettext("Delete") );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/mysql/prefs_save.pl
===================================================================
--- trunk/vhffs-panel/mysql/prefs_save.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/mysql/prefs_save.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,12 +48,11 @@
 use Vhffs::Services::Mysql;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -112,4 +111,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/mysql/prefs.pl?name=$dbname", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/object/upavatar.pl
===================================================================
--- trunk/vhffs-panel/object/upavatar.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/object/upavatar.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,12 +48,13 @@
 use Vhffs::Panel::Avatar;
 
 my $panel = new Vhffs::Panel::Main();
-exit 0 unless defined $panel;
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $data;
 			   
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $cgi = $panel->{'cgi'};
@@ -132,4 +133,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/panel.pl", 0);
-display Vhffs::Panel::Main($panel, $template->output );
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/panel.pl
===================================================================
--- trunk/vhffs-panel/panel.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/panel.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -45,8 +45,9 @@
 use Vhffs::Panel::Menu;
 
 my $panel = new Vhffs::Panel::Main();
-exit 0 unless defined $panel;
+exit 0 unless $panel;
 my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
 my $maintemplate = $panel->{'template'};

Modified: trunk/vhffs-panel/pgsql/create.pl
===================================================================
--- trunk/vhffs-panel/pgsql/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/pgsql/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,9 +46,9 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
@@ -104,5 +104,6 @@
     $template->param( DESCRIPTION => gettext("Description") );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }

Modified: trunk/vhffs-panel/pgsql/delete.pl
===================================================================
--- trunk/vhffs-panel/pgsql/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/pgsql/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,12 +48,11 @@
 use Vhffs::Services::Pgsql;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -103,4 +102,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/pgsql/prefs.pl?name=$dbname", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/pgsql/index.pl
===================================================================
--- trunk/vhffs-panel/pgsql/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/pgsql/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::Pgsql;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/pgsql/prefs.pl
===================================================================
--- trunk/vhffs-panel/pgsql/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/pgsql/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,12 +46,11 @@
 use Vhffs::Panel::Menu;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -113,4 +112,5 @@
 	$template->param( TEXT_DELETE => gettext("Delete") );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/pgsql/prefs_save.pl
===================================================================
--- trunk/vhffs-panel/pgsql/prefs_save.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/pgsql/prefs_save.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,12 +48,11 @@
 use Vhffs::Services::Pgsql;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -106,4 +105,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/pgsql/prefs.pl?name=$dbname", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/repository/create.pl
===================================================================
--- trunk/vhffs-panel/repository/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/repository/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,9 +47,9 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
@@ -92,6 +92,7 @@
     $template->param( DESCRIPTION => gettext("Description") );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }
 

Modified: trunk/vhffs-panel/repository/delete.pl
===================================================================
--- trunk/vhffs-panel/repository/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/repository/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,12 +49,11 @@
 use Vhffs::Services::Repository;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -107,4 +106,5 @@
 my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 $template->param( MESSAGE => $message );
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/repository/index.pl
===================================================================
--- trunk/vhffs-panel/repository/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/repository/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::Repository;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/repository/prefs.pl
===================================================================
--- trunk/vhffs-panel/repository/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/repository/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,12 +47,11 @@
 use Vhffs::Panel::Menu;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -113,4 +112,5 @@
     $template->param( ADMIN_ACL => "Ok, go to ACL admin" );
 }
 
-display Vhffs::Panel::Main($panel, $template->output );
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/repository/prefs_save.pl
===================================================================
--- trunk/vhffs-panel/repository/prefs_save.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/repository/prefs_save.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,12 +49,11 @@
 use Vhffs::Services::Repository;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -105,4 +104,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/panel.pl?project=".$repo->get_group->get_groupname, 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/subscribe.pl
===================================================================
--- trunk/vhffs-panel/subscribe.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/subscribe.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -53,6 +53,8 @@
 use Vhffs::Panel::Main;
 
 my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+
 my $vhffs = $panel->{'vhffs'};
 my $templatedir = $panel->{'templatedir'};
 my $cgi = $panel->{'cgi'};

Modified: trunk/vhffs-panel/svn/create.pl
===================================================================
--- trunk/vhffs-panel/svn/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/svn/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,9 +46,9 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $templatedir = $panel->{templatedir};
@@ -95,6 +95,7 @@
 	$template->param( SEND => gettext("Send") );
 	$template->param( DESCRIPTION => gettext("Description") );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }
 

Modified: trunk/vhffs-panel/svn/delete.pl
===================================================================
--- trunk/vhffs-panel/svn/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/svn/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -48,12 +48,11 @@
 use Vhffs::Services::Cvs;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -106,4 +105,5 @@
 my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 $template->param( MESSAGE => $message );
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/svn/index.pl
===================================================================
--- trunk/vhffs-panel/svn/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/svn/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::Svn;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/svn/prefs.pl
===================================================================
--- trunk/vhffs-panel/svn/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/svn/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,12 +46,11 @@
 use Vhffs::Panel::Menu;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -159,4 +158,5 @@
 
 }
 
-display Vhffs::Panel::Main($panel, $template->output );
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/svn/prefs_save.pl
===================================================================
--- trunk/vhffs-panel/svn/prefs_save.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/svn/prefs_save.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,12 +49,11 @@
 use Vhffs::Services::Svn;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -139,4 +138,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/panel.pl?project=".$svn->get_group->get_groupname, 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/user/delete.pl
===================================================================
--- trunk/vhffs-panel/user/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/user/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,12 +49,11 @@
 use Vhffs::Acl;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -99,4 +98,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/panel.pl?project=$groupname", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/user/prefs.pl
===================================================================
--- trunk/vhffs-panel/user/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/user/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,7 +47,10 @@
 use Vhffs::Services::MailUser;
 
 my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
 my $session = $panel->get_session;
+exit 0 unless $session;
+
 my $cgi = $panel->{cgi};
 my $vhffs = $panel->{vhffs};
 my $maintemplate = $panel->{template};

Modified: trunk/vhffs-panel/user/projects.pl
===================================================================
--- trunk/vhffs-panel/user/projects.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/user/projects.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,7 +41,9 @@
 use Vhffs::Panel::User;
 
 my $panel = new Vhffs::Panel::Main();
-$panel->get_session;
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $cgi = $panel->{cgi};
 my $vhffs = $panel->{vhffs};

Modified: trunk/vhffs-panel/web/create.pl
===================================================================
--- trunk/vhffs-panel/web/create.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/web/create.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -46,9 +46,9 @@
 use Vhffs::Panel::Group;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-    exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $groupname = $panel->{groupname};
@@ -96,5 +96,6 @@
     $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;
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    display Vhffs::Panel::Main($panel, $template->output);
+    $panel->build( $template );
+$panel->display;
 }

Modified: trunk/vhffs-panel/web/delete.pl
===================================================================
--- trunk/vhffs-panel/web/delete.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/web/delete.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,12 +49,11 @@
 use Vhffs::Acl;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -108,4 +107,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/panel.pl?project=$groupname", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/web/index.pl
===================================================================
--- trunk/vhffs-panel/web/index.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/web/index.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -41,9 +41,9 @@
 use Vhffs::Panel::Web;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
 my $group = $panel->{group};

Modified: trunk/vhffs-panel/web/prefs.pl
===================================================================
--- trunk/vhffs-panel/web/prefs.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/web/prefs.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -47,13 +47,13 @@
 use Vhffs::Services::Web;
 use Vhffs::Acl;
 use Vhffs::Constants;
+
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -113,4 +113,5 @@
 	$template->param( TEXT_DELETE => gettext("Delete") );
 }
 
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;

Modified: trunk/vhffs-panel/web/prefs_save.pl
===================================================================
--- trunk/vhffs-panel/web/prefs_save.pl	2007-09-06 03:41:55 UTC (rev 865)
+++ trunk/vhffs-panel/web/prefs_save.pl	2007-09-06 18:07:30 UTC (rev 866)
@@ -49,12 +49,11 @@
 use Vhffs::Acl;
 
 my $panel = new Vhffs::Panel::Main();
-if(!$panel)  {
-        exit 0;
-}
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $session = $panel->{'session'};
 my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
@@ -97,4 +96,5 @@
 $template->param( MESSAGE => $message );
 
 set_refresh_url Vhffs::Panel::Main($panel, "/web/prefs.pl?name=$servername", 0);
-display Vhffs::Panel::Main($panel, $template->output);
+$panel->build( $template );
+$panel->display;


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