[vhffs-dev] [svn] commit: r91 - in /trunk: vhffs-api/src/Vhffs/ vhffs-api/src/Vhffs/Panel/ vhffs-api/src/Vhffs/Robots/ vhffs-api/src/Vhffs/Services/ vhffs-panel/admin/ vhffs-panel/dns/ vhffs-panel/mailinglist/ vhffs-panel/pgsql/ vhffs-panel/svn/ vhffs-panel/templates/admin/misc/ vhffs-panel/templates/dns/ vhffs-panel/templates/group/ vhffs-panel/templates/mailinglist/ vhffs-tools/src/ |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [svn] commit: r91 - in /trunk: vhffs-api/src/Vhffs/ vhffs-api/src/Vhffs/Panel/ vhffs-api/src/Vhffs/Robots/ vhffs-api/src/Vhffs/Services/ vhffs-panel/admin/ vhffs-panel/dns/ vhffs-panel/mailinglist/ vhffs-panel/pgsql/ vhffs-panel/svn/ vhffs-panel/templates/admin/misc/ vhffs-panel/templates/dns/ vhffs-panel/templates/group/ vhffs-panel/templates/mailinglist/ vhffs-tools/src/
- From: vhffs-dev@xxxxxxxxx
- Date: Mon Aug 8 16:34:14 2005 +00
Author: soda
Date: Mon Aug 8 18:34:08 2005
New Revision: 91
Log:
Add links in moderation panel
Improve panel, unified translation string (use Functions::status_str_status_id)
Fix bug in vhffs-groupdel tool
Fix some bugs
Modified:
trunk/vhffs-api/src/Vhffs/Object.pm
trunk/vhffs-api/src/Vhffs/Panel/DNS.pm
trunk/vhffs-api/src/Vhffs/Panel/Group.pm
trunk/vhffs-api/src/Vhffs/Panel/Mail.pm
trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm
trunk/vhffs-api/src/Vhffs/Panel/Main.pm
trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm
trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm
trunk/vhffs-api/src/Vhffs/Panel/Svn.pm
trunk/vhffs-api/src/Vhffs/Panel/Web.pm
trunk/vhffs-api/src/Vhffs/Robots/Mysql.pm
trunk/vhffs-api/src/Vhffs/Robots/Web.pm
trunk/vhffs-api/src/Vhffs/Services/DNS.pm
trunk/vhffs-api/src/Vhffs/Services/Httpd.pm
trunk/vhffs-api/src/Vhffs/User.pm
trunk/vhffs-panel/admin/moderation.pl
trunk/vhffs-panel/dns/prefs.pl
trunk/vhffs-panel/mailinglist/prefs.pl
trunk/vhffs-panel/pgsql/pgsql_submit.pl
trunk/vhffs-panel/svn/prefs.pl
trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl
trunk/vhffs-panel/templates/dns/prefs.tmpl
trunk/vhffs-panel/templates/group/info.tmpl
trunk/vhffs-panel/templates/mailinglist/prefs.tmpl
trunk/vhffs-tools/src/vhffs-groupdel
Modified: trunk/vhffs-api/src/Vhffs/Object.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Object.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Object.pm Mon Aug 8 18:34:08 2005
@@ -308,7 +308,7 @@
{
my $self = shift;
my $message = shift;
-
+ $message = quotemeta( $message );
my $id = 0;
my $query = "SELECT MAX(history_id) FROM vhffs_history";
@@ -326,14 +326,24 @@
# Returns a hashref wich contains all the history
sub get_history
{
- my $self = shift;
+ use Vhffs::Functions;
+ my $self = shift;
+
+ my $result;
+ my $key;
+ my $value;
my $query = "SELECT * FROM vhffs_history WHERE object_id='".$self->{'object_id'}."'";
my $request = $self->{'db'}->{'DB_READ'}->prepare( $query );
return undef if( $request->execute <= 0 );
- return( $request->fetchall_hashref('history_id') );
-
+
+ $temp = $request->fetchall_hashref('history_id');
+ foreach $key ( keys ( %{$temp} ))
+ {
+ $temp->{$key}{'message'} = Vhffs::Functions::stripslashes( $temp->{$key}{'message'} );
+ }
+ return $temp;
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/DNS.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/DNS.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/DNS.pm Mon Aug 8 18:34:08 2005
@@ -118,47 +118,30 @@
my $cgi = $data->{'cgi'};
my $templatesdir = $vhffs->get_config->get_templatedir;
my $template = new HTML::Template( filename => "$templatesdir/dns/menu.tmpl" );
+ my $ns;
$template->param( TEXT_CREATE => gettext("Create") );
$template->param( TEXT_DNS => gettext("DNS") );
my $output = "";
- my $domains = Vhffs::Panel::DNS::getall_dns_per_group( $group , $vhffs );
+ my $domains = Vhffs::Services::DNS::getall( $vhffs , undef , undef , $group );
my $subtemplate;
- foreach( keys ( %{$domains} ) )
+ foreach $ns ( @{$domains} )
{
- if( $domains->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_VALIDATION )
+ if( $ns->get_status == Vhffs::Constants::ACTIVATED )
+ {
+ $subtemplate = new HTML::Template( filename => "$templatesdir/dns/menu_sub.tmpl" );
+ $subtemplate->param( DOMAIN => $ns->get_domain );
+ $subtemplate->param( HISTORY => Vhffs::Functions::status_string_from_status_id( $ns->get_status ) );
+ $subtemplate->param( OID => $ns->get_oid );
+ $output .= $subtemplate->output;
+ }
+ else
{
$subtemplate = new HTML::Template( filename => "$templatesdir/dns/menu_sub_wait.tmpl" );
- $subtemplate->param( DOMAIN => $_ );
- $subtemplate->param( REASON => "(".gettext( "waiting for moderation" ) .")");
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $domains->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $domains->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_CREATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/dns/menu_sub_wait.tmpl" );
- $subtemplate->param( DOMAIN => $_ );
- $subtemplate->param( REASON => "(".gettext( "waiting for creation".")" ) );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $domains->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $domains->{$_}{'state'} == Vhffs::Constants::VALIDATION_REFUSED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/dns/menu_sub_wait.tmpl" );
- $subtemplate->param( DOMAIN => $_ );
- $subtemplate->param( REASON => "(".gettext( "validation refused" ).")" );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $domains->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $domains->{$_}{'state'} == Vhffs::Constants::ACTIVATED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/dns/menu_sub.tmpl" );
- $subtemplate->param( DOMAIN => "$_");
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $domains->{$_}{'object_id'});
+ $subtemplate->param( DOMAIN => $ns->get_domain );
+ $subtemplate->param( HISTORY => gettext("History") );
+ $subtemplate->param( REASON => Vhffs::Functions::status_string_from_status_id( $ns->get_status ) );
+ $subtemplate->param( OID => $ns->get_oid );
$output .= $subtemplate->output;
}
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/Group.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Group.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Group.pm Mon Aug 8 18:34:08 2005
@@ -115,42 +115,23 @@
# projects
- my $groups = getall_groups_per_user( $user , $vhffs );
+# my $groups = getall_groups_per_user( $user , $vhffs );
+ my $groups = $user->get_groups;
+ my $obj;
my $subtemplate;
- foreach( keys %{$groups} )
+ foreach $obj ( @{$groups} )
{
- if( $groups->{$_}{state} == Vhffs::Constants::ACTIVATED )
+ if( $obj->get_status == Vhffs::Constants::ACTIVATED )
{
$subtemplate = new HTML::Template( filename => $templatedir."/group/menu_sub.tmpl" );
- $subtemplate->param( PROJECTNAME => $_ );
+ $subtemplate->param( PROJECTNAME => $obj->get_groupname );
$output .= $subtemplate->output;
}
- elsif( $groups->{$_}{state} == Vhffs::Constants::WAITING_FOR_VALIDATION )
+ else
{
$subtemplate = new HTML::Template( filename => $templatedir."/group/menu_sub_wait.tmpl" );
- $subtemplate->param( PROJECTNAME => $_ );
- $subtemplate->param( REASON => gettext( "Waiting for validation" ));
- $output .= $subtemplate->output;
- }
- elsif( $groups->{$_}{state} == Vhffs::Constants::WAITING_FOR_CREATION )
- {
- $subtemplate = new HTML::Template( filename => $templatedir."/group/menu_sub_wait.tmpl" );
- $subtemplate->param( PROJECTNAME => $_ );
- $subtemplate->param( REASON => gettext( "Waiting for creation" ));
- $output .= $subtemplate->output;
- }
- elsif( $groups->{$_}{state} == Vhffs::Constants::TO_DELETE )
- {
- $subtemplate = new HTML::Template( filename => $templatedir."/group/menu_sub_wait.tmpl" );
- $subtemplate->param( PROJECTNAME => $_ );
- $subtemplate->param( REASON => gettext( "Will be delete" ));
- $output .= $subtemplate->output;
- }
- elsif( $groups->{$_}{state} == Vhffs::Constants::VALIDATION_REFUSED )
- {
- $subtemplate = new HTML::Template( filename => $templatedir."/group/menu_sub_wait.tmpl" );
- $subtemplate->param( PROJECTNAME => $_ );
- $subtemplate->param( REASON => gettext( "Validation refused" ));
+ $subtemplate->param( PROJECTNAME => $obj->get_groupname );
+ $subtemplate->param( REASON => "(". Vhffs::Functions::status_string_from_status_id( $obj->get_status ) .")" );
$output .= $subtemplate->output;
}
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/Mail.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Mail.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Mail.pm Mon Aug 8 18:34:08 2005
@@ -116,55 +116,29 @@
$template->param( TEXT_CREATE => gettext("Create") );
$template->param( TEXT_MAIL => gettext("Mail") );
- my $mails = Vhffs::Panel::Mail::getall_mail_per_group( $group , $vhffs );
+ my $mails = Vhffs::Services::Mail::getall( $vhffs , undef , undef , $group );
+ my $mail;
my $output = "";
my $subtemplate;
- foreach( keys %{$mails} )
+ foreach $mail ( @{$mails} )
{
- if( $mails->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_VALIDATION )
+ if( $mail->get_status == Vhffs::Constants::ACTIVATED )
+ {
+ $subtemplate = new HTML::Template( filename => "$templatesdir/mail/menu_sub.tmpl" );
+ $subtemplate->param( DOMAIN => $mail->get_domain);
+ $subtemplate->param( HISTORY => gettext("History"));
+ $subtemplate->param( OID => $mail->get_oid );
+ $output .= $subtemplate->output;
+ }
+ else
{
$subtemplate = new HTML::Template( filename => "$templatesdir/mail/menu_sub_wait.tmpl" );
- $subtemplate->param( DOMAIN => "$_");
- $subtemplate->param( REASON => gettext( "(waiting for moderation)" ));
+ $subtemplate->param( DOMAIN => $mail->get_domain );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mails->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $mails->{$_}{'state'} == Vhffs::Constants::TO_DELETE )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mail/menu_sub_wait.tmpl" );
- $subtemplate->param( DOMAIN => "$_");
- $subtemplate->param( REASON => gettext( "(to delete)" ));
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mails->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $mails->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_CREATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mail/menu_sub_wait.tmpl" );
- $subtemplate->param( DOMAIN => "$_");
- $subtemplate->param( REASON => gettext( "(waiting for creation)" ));
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mails->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $mails->{$_}{'state'} == Vhffs::Constants::ACTIVATED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mail/menu_sub.tmpl" );
- $subtemplate->param( DOMAIN => "$_");
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mails->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $mails->{$_}{'state'} == Vhffs::Constants::VALIDATION_REFUSED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mail/menu_sub_wait.tmpl" );
- $subtemplate->param( DOMAIN => "$_");
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( REASON => gettext( "(validation refused)" ));
- $subtemplate->param( OID => $mails->{$_}{'object_id'});
+ $subtemplate->param( REASON => Vhffs::Functions::status_string_from_status_id( $mail->get_status ));
+ $subtemplate->param( OID => $mail->get_oid );
$output .= $subtemplate->output;
}
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm Mon Aug 8 18:34:08 2005
@@ -101,61 +101,31 @@
my $subtemplate;
- my $mls = getall_list_per_group( $group , $vhffs );
+ my $mls = Vhffs::Services::Mailing::getall( $vhffs , undef , undef , $group );
+ my $ml;
my $output = "";
if( defined $mls )
{
- foreach( keys( %{$mls} ) )
+ foreach $ml ( @{$mls} )
{
- if( $mls->{$_}{state} == Vhffs::Constants::ACTIVATED )
+ if( $ml->get_status == Vhffs::Constants::ACTIVATED )
{
$subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub.tmpl" );
- $subtemplate->param( NAME => $mls->{$_}{'local_part'} . "\@" . $mls->{$_}{'domain'});
- $subtemplate->param( LOCAL => $mls->{$_}{'local_part'} );
- $subtemplate->param( DOMAIN => $mls->{$_}{'domain'} );
+ $subtemplate->param( NAME => $ml->get_localpart . "\@" . $ml->get_domain);
+ $subtemplate->param( LOCAL => $ml->get_localpart );
+ $subtemplate->param( DOMAIN => $ml->get_domain );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mls->{$_}{'object_id'});
+ $subtemplate->param( OID => $ml->get_oid );
}
- elsif( $mls->{$_}{state} == Vhffs::Constants::WAITING_FOR_MODIFICATION )
+ else
{
- $subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $mls->{$_}{'local_part'} . "\@" . $mls->{$_}{'domain'});
- $subtemplate->param( REASON => gettext("Waiting for modification") );
+ $subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub.tmpl" );
+ $subtemplate->param( NAME => $ml->get_localpart . "\@" . $ml->get_domain);
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mls->{$_}{'object_id'});
+ $subtemplate->param( REASON => Vhffs::Functions::status_string_from_status_id( $ml->get_status ));
+ $subtemplate->param( OID => $ml->get_oid );
}
- elsif( $mls->{$_}{state} == Vhffs::Constants::WAITING_FOR_VALIDATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $mls->{$_}{'local_part'} . "\@" . $mls->{$_}{'domain'});
- $subtemplate->param( REASON => gettext("Waiting for validation") );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mls->{$_}{'object_id'});
- }
- elsif( $mls->{$_}{state} == Vhffs::Constants::VALIDATION_REFUSED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $mls->{$_}{'local_part'} . "\@" . $mls->{$_}{'domain'});
- $subtemplate->param( REASON => gettext("Validation refused") );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mls->{$_}{'object_id'});
- }
- elsif( $mls->{$_}{state} == Vhffs::Constants::WAITING_FOR_CREATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $mls->{$_}{'local_part'} . "\@" . $mls->{$_}{'domain'});
- $subtemplate->param( REASON => gettext("Waiting for creation") );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mls->{$_}{'object_id'});
- }
- elsif( $mls->{$_}{state} == Vhffs::Constants::TO_DELETE )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $mls->{$_}{'local_part'} . "\@" . $mls->{$_}{'domain'});
- $subtemplate->param( REASON => gettext("Will be deleted") );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $mls->{$_}{'object_id'});
- }
+
$output .= $subtemplate->output if( defined $subtemplate );
undef( $subtemplate );
Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm Mon Aug 8 18:34:08 2005
@@ -141,11 +141,187 @@
my ( $class , $vhffs , $session , $user ) = @_;
my $projectname = $session->param("project");
-
- my $templatedir = $vhffs->get_config->get_templatedir;
- my $template = new HTML::Template( filename => $templatedir."/group/info.tmpl" );
- $template->param( TEXT_TITLE => $projectname );
-
+ my $temp;
+ my $object;
+ my $objects;
+ my $group;
+ my $template;
+ my $templatedir;
+
+ $templatedir = $vhffs->get_config->get_templatedir;
+
+ $group = new Vhffs::Group( $vhffs , $projectname , '401' );
+ if( ( ! defined( $group ) ) || ( $group->fetch <= 0 ) )
+ {
+ $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+ $template->param( MESSAGE => gettext("Group error" ) );
+ }
+ else
+ {
+ $template = new HTML::Template( filename => $templatedir."/group/info.tmpl" );
+ $template->param( TEXT_TITLE => sprintf( gettext("Group %s") , $projectname ));
+ if( $vhffs->get_config->use_web == 1 )
+ {
+ $temp = "";
+ $template->param( WEBAREA => gettext("Webarea for this group") );
+ $objects = Vhffs::Services::Httpd::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_servername . "<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No webarea for this group");
+ }
+ $template->param( WEBAREA_VALUES => $temp );
+ }
+ if( $vhffs->get_config->use_mysql == 1 )
+ {
+ $temp = "";
+ $template->param( MYSQL => gettext("Mysql database for this group") );
+ $objects = Vhffs::Services::Mysql::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_dbname ."<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No mysql database for this group");
+ }
+ $template->param( MYSQL_VALUES => $temp );
+ }
+
+
+ if( $vhffs->get_config->use_postgres == 1 )
+ {
+ $temp = "";
+ $template->param( PGSQL => gettext("PostgreSQL database for this group") );
+ $objects = Vhffs::Services::Postgres::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_dbname ."<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No PostgreSQL database for this group");
+ }
+ $template->param( PGSQL_VALUES => $temp );
+ }
+
+
+ if( $vhffs->get_config->use_cvs == 1 )
+ {
+ $temp = "";
+ $template->param( CVS => gettext("CVS repositories for this group") );
+ $objects = Vhffs::Services::Cvs::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_cvsroot ."<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No CVS repository for this group");
+ }
+ $template->param( CVS_VALUES => $temp );
+ }
+
+
+ if( $vhffs->get_config->use_svn == 1 )
+ {
+ $temp = "";
+ $template->param( SVN => gettext("SVN repositories for this group") );
+ $objects = Vhffs::Services::Svn::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_reponame ."<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No SVN repository for this group");
+ }
+ $template->param( SVN_VALUES => $temp );
+ }
+
+
+
+ if( $vhffs->get_config->use_mailing == 1 )
+ {
+ $temp = "";
+ $template->param( MLS => gettext("Mailing-lists for this group") );
+ $objects = Vhffs::Services::Mailing::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_listname ."<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No Mailing-list for this group");
+ }
+ $template->param( MLS_VALUES => $temp );
+ }
+
+
+ if( $vhffs->get_config->use_mail == 1 )
+ {
+ $temp = "";
+ $template->param( MAILS => gettext("Mail domain for this group") );
+ $objects = Vhffs::Services::Mail::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_domain ."<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No Mail domain for this group");
+ }
+ $template->param( MAILS_VALUES => $temp );
+ }
+
+
+
+ if( $vhffs->get_config->use_dns == 1 )
+ {
+ $temp = "";
+ $template->param( DNS => gettext("Domains for this group") );
+ $objects = Vhffs::Services::DNS::getall( $vhffs , undef , undef , $group );
+ if( defined $objects )
+ {
+ foreach $object ( @{$objects} )
+ {
+ $temp .= $object->get_domain ."<br/>";
+ }
+ }
+ else
+ {
+ $temp = gettext("No DNS domain for this group");
+ }
+ $template->param( DNS_VALUES => $temp );
+ }
+
+
+
+ }
return $template;
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm Mon Aug 8 18:34:08 2005
@@ -103,6 +103,7 @@
my $vhffs = $data->{'vhffs'};
my $session = $data->{'session'};
my $user = $data->{'user'};
+ my $group = $data->{'group'};
my $cgi = $data->{'cgi'};
my $templatesdir = $vhffs->get_config->get_templatedir;
my $template = new HTML::Template( filename => "$templatesdir/mysql/menu.tmpl");
@@ -113,45 +114,27 @@
my $output="";
- my $dbs = getall_mysql_per_group( $data->{'group'} , $vhffs );
-
+ my $dbs = Vhffs::Services::Mysql::getall( $vhffs , undef, undef , $group );
+ my $db;
my $subtemplate;
- foreach( keys ( %{$dbs} ) )
+ foreach $db ( @{$dbs} )
{
- if( $dbs->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_VALIDATION )
+ if( $db->get_status == Vhffs::Constants::ACTIVATED )
+ {
+ $subtemplate = new HTML::Template( filename => "$templatesdir/mysql/menu_sub.tmpl" );
+ $subtemplate->param( NAME => $db->get_dbname );
+ $subtemplate->param( HISTORY => gettext("History"));
+ $subtemplate->param( OID => $db->get_oid );
+ $output .= $subtemplate->output;
+ }
+ else
{
$subtemplate = new HTML::Template( filename => "$templatesdir/mysql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext("(waiting for moderation)") );
+ $subtemplate->param( NAME => $db->get_dbname );
+ $subtemplate->param( REASON => "( ".Vhffs::Functions::status_string_from_status_id( $db->get_status ) . " )" );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_CREATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mysql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext("(waiting for creation)") );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::ACTIVATED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mysql/menu_sub.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_MODIFICATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/mysql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext("(waiting for modification)") );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
+ $subtemplate->param( OID => $db->get_oid );
$output .= $subtemplate->output;
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm Mon Aug 8 18:34:08 2005
@@ -78,6 +78,7 @@
my $vhffs = $data->{'vhffs'};
my $session = $data->{'session'};
my $user = $data->{'user'};
+ my $group = $data->{'group'};
my $cgi = $data->{'cgi'};
my $templatesdir = $vhffs->get_config->get_templatedir;
my $template = new HTML::Template( filename => "$templatesdir/pgsql/menu.tmpl" );
@@ -88,62 +89,27 @@
my $output="";
my $subtemplate;
- my $dbs = getall_pgsql_per_group( $data->{'group'} , $vhffs );
+ my $dbs = Vhffs::Services::Postgres::getall( $vhffs , undef , undef , $group );
+ my $db;
- foreach( keys %{$dbs} )
+ foreach $db ( @{$dbs} )
{
- if( $dbs->{$_}{'state'} == Vhffs::Constants::ACTIVATED )
+ if( $db->get_status == Vhffs::Constants::ACTIVATED )
{
$subtemplate = new HTML::Template( filename => "$templatesdir/pgsql/menu_sub.tmpl" );
- $subtemplate->param( NAME => $_);
+ $subtemplate->param( NAME => $db->get_dbname );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
+ $subtemplate->param( OID => $db->get_oid );
$output .= $subtemplate->output;
}
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_CREATION )
+ else
{
$subtemplate = new HTML::Template( filename => "$templatesdir/pgsql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $_);
- $subtemplate->param( REASON => gettext( "Waiting for creation" ) );
+ $subtemplate->param( NAME => $db->get_dbname );
+ $subtemplate->param( REASON => "( ".Vhffs::Functions::status_string_from_status_id( $db->get_status ) . " )" );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_VALIDATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/pgsql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $_);
- $subtemplate->param( REASON => gettext( "Waiting for validation" ) );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_MODIFICATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/pgsql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $_);
- $subtemplate->param( REASON => gettext( "Waiting for modification" ) );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::TO_DELETE )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/pgsql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $_);
- $subtemplate->param( REASON => "(". gettext( "Will be deleted" ).")" );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $dbs->{$_}{'state'} == Vhffs::Constants::VALIDATION_REFUSED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/pgsql/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => $_);
- $subtemplate->param( REASON => "(".gettext( "Validation refused" ).")" );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $dbs->{$_}{'object_id'});
+ $subtemplate->param( OID => $db->get_oid );
$output .= $subtemplate->output;
}
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/Svn.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Svn.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Svn.pm Mon Aug 8 18:34:08 2005
@@ -17,6 +17,7 @@
use Vhffs::Services::Svn;
use Vhffs::Panel::Main;
use Vhffs::Constants;
+use Vhffs::Functions;
sub getall_svn_to_moderate
@@ -117,55 +118,29 @@
$template->param( TEXT_SVN => gettext("Repository Subversion") );
$template->param( TEXT_SVNDOC => gettext("Documentation") );
- my $repos = getall_svn_per_group( $group , $vhffs );
+ my $repos = Vhffs::Services::Svn::getall( $vhffs , undef , undef , $group );
+ my $repo;
my $output = "";
my $subtemplate;
- foreach( keys ( %{$repos} ) )
+ foreach $repo ( @{$repos} )
{
- if( $repos->{$_}{'state'} == Vhffs::Constants::ACTIVATED )
+ if( $repo->get_status == Vhffs::Constants::ACTIVATED )
{
$subtemplate = new HTML::Template( filename => "$templatesdir/svn/menu_sub.tmpl" );
- $subtemplate->param( NAME => "$_");
+ $subtemplate->param( NAME => $repo->get_reponame );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $repos->{$_}{'object_id'});
+ $subtemplate->param( OID => $repo->get_oid );
$output .= $subtemplate->output;
}
- elsif( $repos->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_VALIDATION )
+ else
{
$subtemplate = new HTML::Template( filename => "$templatesdir/svn/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext( "Waiting for validation" ) );
+ $subtemplate->param( NAME => $repo->get_reponame );
+ $subtemplate->param( REASON => Vhffs::Functions::status_string_from_status_id( $repo->get_status ) );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $repos->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $repos->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_CREATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/svn/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext( "Waiting for creation" ) );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $repos->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $repos->{$_}{'state'} == Vhffs::Constants::TO_DELETE )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/svn/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext( "Waiting for delete" ) );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $repos->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $repos->{$_}{'state'} == Vhffs::Constants::VALIDATION_REFUSED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/svn/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext( "Validation refused" ) );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $repos->{$_}{'object_id'});
+ $subtemplate->param( OID => $repo->get_oid );
$output .= $subtemplate->output;
}
Modified: trunk/vhffs-api/src/Vhffs/Panel/Web.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Web.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Web.pm Mon Aug 8 18:34:08 2005
@@ -16,6 +16,7 @@
use Vhffs::Panel::Main;
use Vhffs::Services::Httpd;
use Vhffs::Constants;
+use Vhffs::Functions;
sub getall_web_to_moderate
{
@@ -105,40 +106,32 @@
$template->param( TEXT_CREATE => gettext("Create") );
$template->param( TEXT_WEB => gettext("Web Areas") );
- my $sites = getall_web_per_group( $group , $vhffs );
+ my $sites = Vhffs::Services::Httpd::getall( $vhffs , undef , undef , $group );
+ my $site;
my $output = "";
my $subtemplate;
my $statsurl;
- foreach( sort( keys %{$sites} ) )
+ foreach $site ( @{$sites} )
{
- if( $sites->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_VALIDATION )
+ if( $site->get_status == Vhffs::Constants::ACTIVATED )
+ {
+ $subtemplate = new HTML::Template( filename => "$templatesdir/web/menu_sub.tmpl" );
+ $subtemplate->param( NAME => $site->get_servername);
+ $subtemplate->param( STATSURL => $vhffs->get_config->get_panel_statsurl) if( defined $vhffs->get_config->get_panel_statsurl );
+ $subtemplate->param( HISTORY => gettext("History"));
+ $subtemplate->param( OID => $site->get_oid );
+ $output .= $subtemplate->output;
+ }
+ else
{
$subtemplate = new HTML::Template( filename => "$templatesdir/web/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext("(waiting for moderation)") );
+ $subtemplate->param( NAME => $site->get_servername );
+ $subtemplate->param( REASON => Vhffs::Functions::status_string_from_status_id( $site->get_status) );
$subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $sites->{$_}{'object_id'});
+ $subtemplate->param( OID => $site->get_oid );
$output .= $subtemplate->output;
- }
- elsif( $sites->{$_}{'state'} == Vhffs::Constants::WAITING_FOR_CREATION )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/web/menu_sub_wait.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( REASON => gettext("(waiting for creation)") );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $sites->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
- elsif( $sites->{$_}{'state'} == Vhffs::Constants::ACTIVATED )
- {
- $subtemplate = new HTML::Template( filename => "$templatesdir/web/menu_sub.tmpl" );
- $subtemplate->param( NAME => "$_");
- $subtemplate->param( STATSURL => $vhffs->get_config->get_panel_statsurl) if( defined $vhffs->get_config->get_panel_statsurl );
- $subtemplate->param( HISTORY => gettext("History"));
- $subtemplate->param( OID => $sites->{$_}{'object_id'});
- $output .= $subtemplate->output;
- }
+ }
}
$template->param( SUB_WEB => $output );
Modified: trunk/vhffs-api/src/Vhffs/Robots/Mysql.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Mysql.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Robots/Mysql.pm Mon Aug 8 18:34:08 2005
@@ -62,7 +62,7 @@
my $db = new Vhffs::Services::Mysql( $main , $dbname );
my $query;
-
+
if( $db->fetch > 0 )
{
$db->add_history( "Ok, robots takes the destruction of this database" );
Modified: trunk/vhffs-api/src/Vhffs/Robots/Web.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Web.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Robots/Web.pm Mon Aug 8 18:34:08 2005
@@ -19,20 +19,6 @@
return( $request->fetchall_hashref('servername') );
}
-
-
-sub get_all_web_to_delete
-{
- my( $main ) = @_;
-
- my $query = "SELECT w.servername, w.object_id FROM vhffs_httpd w, vhffs_object o WHERE o.state='".Vhffs::Constants::TO_DELETE."' AND w.object_id = o.object_id";
-
- $request = $main->{'db'}->{'DB_READ'}->prepare( $query ) or return -2;
- return undef if ( $request->execute() <= 0 );
-
- return( $request->fetchall_hashref('servername') );
-}
-
@@ -110,11 +96,10 @@
my $webdir = $main->get_config->get_datadir . "/" . Vhffs::Constants::WEBDIR . "/" . $hash ;
- my $groupname = Vhffs::Group::get_name_by_gid( $main , $web->get_ownergid );
- my $group = new Vhffs::Group( $main , $groupname , 401 );
+ my $group = $web->get_group;
if(Vhffs::Robots::unlink_to_group( $group,$web->get_servername.Vhffs::Constants::WEB_SUFFIX,$main) < 0)
{
- $web->add_history( "Can\'t unlink the webdirectory to the specified group");
+ $web->add_history( "Can't unlink the webdirectory to the specified group");
}
else
{
@@ -130,7 +115,6 @@
system("rm -rf $dir 2>/dev/null");
$web->add_history( "Webdir is now erased.");
-
$web->delete;
}
}
Modified: trunk/vhffs-api/src/Vhffs/Services/DNS.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Services/DNS.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Services/DNS.pm Mon Aug 8 18:34:08 2005
@@ -72,13 +72,13 @@
return undef if( $rows <= 0);
- foreach( $result = $request->fetchrow_hashref() )
- {
- $tmp = new Vhffs::Services::DNS( $vhffs , $result->{'domain'} );
- if( ( defined ( $tmp ) ) && ( $tmp->fetch > 0 ) )
- {
- push @{$objs} , $tmp;
- }
+ while( $result = $request->fetchrow_hashref() )
+ {
+ $tmp = new Vhffs::Services::DNS( $vhffs , $result->{'domain'} );
+ if( ( defined ( $tmp ) ) && ( $tmp->fetch > 0 ) )
+ {
+ push @{$objs} , $tmp;
+ }
}
return $objs;
}
Modified: trunk/vhffs-api/src/Vhffs/Services/Httpd.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Httpd.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Services/Httpd.pm Mon Aug 8 18:34:08 2005
@@ -49,15 +49,11 @@
sub delete
{
my $self = shift;
- print "suppression de la partie web\n";
my $query = "DELETE FROM vhffs_httpd WHERE object_id='".$self->{'object_id'}."'";
my $request = $self->{'db'}->{'DB_WRITE'}->prepare($query);
$request->execute or return -1;
- print "finish\n";
- print "object\n";
return -2 if( $self->SUPER::delete < 0 );
- print "finish\n";
return 1;
}
Modified: trunk/vhffs-api/src/Vhffs/User.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm (original)
+++ trunk/vhffs-api/src/Vhffs/User.pm Mon Aug 8 18:34:08 2005
@@ -812,7 +812,7 @@
return undef if( $self->fetch < 0 );
my @groups;
my $uid = $self->get_uid;
- my $query = "SELECT g.groupname FROM vhffs_groups g, vhffs_user_group ug WHERE ug.uid='".$uid."' AND g.gid=ug.gid";
+ my $query = "SELECT g.groupname FROM vhffs_groups g, vhffs_user_group ug WHERE ug.uid='".$uid."' AND g.gid=ug.gid ORDER BY g.groupname";
my $request = $self->{'db'}->{'DB_READ'}->prepare( $query );
return undef if( $request->execute <= 0 );
while( my $row = $request->fetchrow_arrayref )
Modified: trunk/vhffs-panel/admin/moderation.pl
==============================================================================
--- trunk/vhffs-panel/admin/moderation.pl (original)
+++ trunk/vhffs-panel/admin/moderation.pl Mon Aug 8 18:34:08 2005
@@ -68,7 +68,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
@@ -110,7 +111,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
@@ -150,7 +152,8 @@
my $subtemplate = new HTML::Template( filename => "$templatesdir/admin/misc/moderation_part.tmpl" );
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
@@ -193,7 +196,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
@@ -236,7 +240,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
@@ -279,7 +284,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $svn->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $svn->get_user ) . ")");
+ $subtemplate->param( OWNER => $svn->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $svn->get_user ) );
$subtemplate->param( OID_ASKER => $svn->get_user->get_oid);
}
else
@@ -323,7 +329,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
@@ -364,7 +371,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
@@ -405,7 +413,8 @@
if( $vhffs->get_config->use_notation == 1 )
{
- $subtemplate->param( OWNER => $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ")");
+ $subtemplate->param( OWNER => $temp->get_user->get_username);
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
$subtemplate->param( OID_ASKER => $temp->get_user->get_oid);
}
else
Modified: trunk/vhffs-panel/dns/prefs.pl
==============================================================================
--- trunk/vhffs-panel/dns/prefs.pl (original)
+++ trunk/vhffs-panel/dns/prefs.pl Mon Aug 8 18:34:08 2005
@@ -35,7 +35,8 @@
my $projectname = $session->param("project");
my $templatedir = $vhffs->get_config->get_templatedir;
-
+my $subtemplate;
+my $thirdtemplate;
my $template;
my $output = "";
my $message;
@@ -132,7 +133,7 @@
# $template->param( TEXT_LIST_TYPE_CNAME => gettext("All CNAME for you domain name") );
- my $subtemplate = new HTML::Template( filename =>$templatedir. "/dns/list_sub.tmpl" );
+ $subtemplate = new HTML::Template( filename =>$templatedir. "/dns/list_sub.tmpl" );
if( defined $a )
@@ -159,7 +160,7 @@
$output = "";
foreach( keys ( %{$mx} ) )
{
- my $thirdtemplate = new HTML::Template( filename => $templatedir."/dns/list_mx_sub.tmpl" );
+ $thirdtemplate = new HTML::Template( filename => $templatedir."/dns/list_mx_sub.tmpl" );
$thirdtemplate->param( PRIORITY_VALUE => $_ );
$thirdtemplate->param( TEXT_PRIORITY => gettext("Priority: "));
$thirdtemplate->param( IP_VALUE => $mx->{$_}{data} );
@@ -180,7 +181,7 @@
$output = "";
foreach( keys ( %{$cnames} ) )
{
- my $thirdtemplate = new HTML::Template( filename => $templatedir."/dns/list_cname_sub.tmpl" );
+ $thirdtemplate = new HTML::Template( filename => $templatedir."/dns/list_cname_sub.tmpl" );
$thirdtemplate->param( VALUE_NAME => $_ );
$thirdtemplate->param( VALUE_DESTINATION => $cnames->{$_}{data} );
$thirdtemplate->param( DEL => gettext( "Delete" ) );
@@ -202,7 +203,7 @@
$output = "";
foreach( keys ( %{$ns} ) )
{
- my $thirdtemplate = new HTML::Template( filename => $templatedir."/dns/list_ns_sub.tmpl" );
+ $thirdtemplate = new HTML::Template( filename => $templatedir."/dns/list_ns_sub.tmpl" );
$thirdtemplate->param( IP => $_ );
$thirdtemplate->param( DEL => gettext( "Delete" ) );
$thirdtemplate->param( DOMAIN => $domain_name );
@@ -215,16 +216,14 @@
$template->param( LIST_NS => gettext( "No NS available on this domain") );
}
-
-
-
-# Maxou's code
-# foreach( keys ( %{$ns} ) ){
-# my $subtemplate = new HTML::Template( filename => $templatedir."/dns/list_sub.tmpl" );
-# $subtemplate->param( TYPECNAME => $_ );
-# $output .= $subtemplate->output;
- # }
-
+ if( $user->is_admin == 1 )
+ {
+ $subtemplate = new HTML::Template( filename => $templatedir."/admin/misc/opart.tmpl" );
+ $subtemplate->param( OID => $dns->get_oid );
+ $subtemplate->param( OPART_TEXT => gettext("Go to object-part admin") );
+ $subtemplate->param( OPART_TITLE => gettext("Object part") );
+ $template->param( OPART => $subtemplate->output );
+ }
}
display Vhffs::Panel::Main($panel, $template->output);
Modified: trunk/vhffs-panel/mailinglist/prefs.pl
==============================================================================
--- trunk/vhffs-panel/mailinglist/prefs.pl (original)
+++ trunk/vhffs-panel/mailinglist/prefs.pl Mon Aug 8 18:34:08 2005
@@ -162,6 +162,15 @@
$template->param( EXPLAIN_ADMIN_ACL => "You can Manage rights on this service for each user in the VHFFS database. Please read help before manage it." );
$template->param( ADMIN_ACL => "Ok, go to ACL admin" );
+ if( $user->is_admin == 1 )
+ {
+ $subtemplate = new HTML::Template( filename => $templatedir."/admin/misc/opart.tmpl" );
+ $subtemplate->param( OID => $list->get_oid );
+ $subtemplate->param( OPART_TEXT => gettext("Go to object-part admin") );
+ $subtemplate->param( OPART_TITLE => gettext("Object part") );
+ $template->param( OPART => $subtemplate->output );
+ }
+
}
Modified: trunk/vhffs-panel/pgsql/pgsql_submit.pl
==============================================================================
--- trunk/vhffs-panel/pgsql/pgsql_submit.pl (original)
+++ trunk/vhffs-panel/pgsql/pgsql_submit.pl Mon Aug 8 18:34:08 2005
@@ -51,7 +51,7 @@
}
elsif( ( length( $dbname ) < 3 ) || ( length( $dbname ) >= 16 ) )
{
- $message = gettext( "Database name must contains at least 3 caracters and no more than 16" );
+ $message = gettext( "Database name must contains at least 3 caracters and no more than 16$dbname" );
}
else
{
Modified: trunk/vhffs-panel/svn/prefs.pl
==============================================================================
--- trunk/vhffs-panel/svn/prefs.pl (original)
+++ trunk/vhffs-panel/svn/prefs.pl Mon Aug 8 18:34:08 2005
@@ -32,7 +32,7 @@
my $output;
my $subtemplate;
-my $svn = new Vhffs::Services::Svn( $vhffs , $repo_name , undef , $group);
+my $svn = new Vhffs::Services::Svn( $vhffs , $repo_name , undef , $group );
my $templatedir = $vhffs->get_config->get_templatedir;
Modified: trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl
==============================================================================
--- trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl (original)
+++ trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl Mon Aug 8 18:34:08 2005
@@ -3,10 +3,17 @@
<TMPL_VAR NAME="NAME">
</td>
<td>
- <TMPL_VAR NAME="OWNER">
+
+ <a href="user/edit.pl?NAME=<TMPL_VAR NAME="OWNER">">
+ <TMPL_VAR NAME="OWNER">
+ </a>
+ (<TMPL_VAR NAME="NOTE">)
+
</td>
<td>
+ <a href="group/edit.pl?NAME=<TMPL_VAR NAME="GROUP">">
<TMPL_VAR NAME="GROUP">
+ </a>
</td>
<td class="mainColumn">
<TMPL_VAR NAME="DESCRIPTION">
Modified: trunk/vhffs-panel/templates/dns/prefs.tmpl
==============================================================================
--- trunk/vhffs-panel/templates/dns/prefs.tmpl (original)
+++ trunk/vhffs-panel/templates/dns/prefs.tmpl Mon Aug 8 18:34:08 2005
@@ -25,8 +25,8 @@
<input type="text" name="IP" />
</p>
<fieldset>
- <legend>
- <TMPL_VAR NAME="TEXT_QUESTION_REDIRECTION"> :
+ <legend>
+ <TMPL_VAR NAME="TEXT_QUESTION_REDIRECTION"> :
</legend>
<p>
<input type="radio" name="QUESTION" id="QUESTION_YES" value="1" checked="checked" />
@@ -133,11 +133,11 @@
-<h2><tmpl_var name="TEXT_ACL_ADMIN"></h2>
+<h2><tmpl_var name="TEXT_ACL_ADMIN"></h2>
<form method="post" action="../acl/view.pl">
<p><tmpl_var name="EXPLAIN_ADMIN_ACL"></p>
-
+
<input type="hidden" name="NAME" value="<tmpl_var name="DOMAIN_NAME">" />
<input type="hidden" name="TYPE" value="ns" />
<p class="button" id="buttonAclAdmin">
@@ -147,32 +147,33 @@
<h2><tmpl_var name="TEXT_DELETE_DNS"></h2>
-<form method="post" action="/dns/delete.pl">
+<form method="post" action="/dns/delete.pl">
<fieldset>
- <legend>
- <tmpl_var name="ASK_DELETE_DNS">:
- </legend>
-
- <p class="warning"><tmpl_var name="TEXT_BEFORE_DELETE"></p>
- <p>
- <input type="radio" name="DELETE" id="DELETE_NO" value="0" checked="checked" />
- <label for="DELETE_NO">
- <tmpl_var name="NO">
- </label>
- </p>
- <p>
- <input type="radio" name="DELETE" id="DELETE_YES" value="1" />
- <label for="DELETE_YES">
- <tmpl_var name="YES">
- </label>
- </p>
- </fieldset>
-
- <p class="button" id="buttonDelete">
- <input type="hidden" name="name" value="<tmpl_var name="DOMAIN_NAME">" />
- <input type="submit" value="<tmpl_var name="TEXT_DELETE">" />
- </p>
-
+ <legend>
+ <tmpl_var name="ASK_DELETE_DNS">:
+ </legend>
+
+ <p class="warning"><tmpl_var name="TEXT_BEFORE_DELETE"></p>
+ <p>
+ <input type="radio" name="DELETE" id="DELETE_NO" value="0" checked="checked" />
+ <label for="DELETE_NO">
+ <tmpl_var name="NO">
+ </label>
+ </p>
+ <p>
+ <input type="radio" name="DELETE" id="DELETE_YES" value="1" />
+ <label for="DELETE_YES">
+ <tmpl_var name="YES">
+ </label>
+ </p>
+ </fieldset>
+
+ <p class="button" id="buttonDelete">
+ <input type="hidden" name="name" value="<tmpl_var name="DOMAIN_NAME">" />
+ <input type="submit" value="<tmpl_var name="TEXT_DELETE">" />
+ </p>
+
</form>
+<tmpl_var name="OPART">
Modified: trunk/vhffs-panel/templates/group/info.tmpl
==============================================================================
--- trunk/vhffs-panel/templates/group/info.tmpl (original)
+++ trunk/vhffs-panel/templates/group/info.tmpl Mon Aug 8 18:34:08 2005
@@ -1,1 +1,17 @@
- <h1><tmpl_var name="TEXT_TITLE"></h1>
+<h1><tmpl_var name="TEXT_TITLE"></h1>
+<h2><tmpl_var name="WEBAREA"></h2>
+<tmpl_var name="WEBAREA_VALUES">
+<h2><tmpl_var name="MYSQL"></h2>
+<tmpl_var name="MYSQL_VALUES">
+<h2><tmpl_var name="PGSQL"></h2>
+<tmpl_var name="PGSQL_VALUES">
+<h2><tmpl_var name="CVS"></h2>
+<tmpl_var name="CVS_VALUES">
+<h2><tmpl_var name="SVN"></h2>
+<tmpl_var name="SVN_VALUES">
+<h2><tmpl_var name="DNS"></h2>
+<tmpl_var name="DNS_VALUES">
+<h2><tmpl_var name="MAILS"></h2>
+<tmpl_var name="MAILS_VALUES">
+<h2><tmpl_var name="MLS"></h2>
+<tmpl_var name="MLS_VALUES">
Modified: trunk/vhffs-panel/templates/mailinglist/prefs.tmpl
==============================================================================
--- trunk/vhffs-panel/templates/mailinglist/prefs.tmpl (original)
+++ trunk/vhffs-panel/templates/mailinglist/prefs.tmpl Mon Aug 8 18:34:08 2005
@@ -76,11 +76,11 @@
</p>
</form>
-<h2><tmpl_var name="TEXT_ACL_ADMIN"></h2>
+<h2><tmpl_var name="TEXT_ACL_ADMIN"></h2>
<form method="post" action="../acl/view.pl">
<p><tmpl_var name="EXPLAIN_ADMIN_ACL"></p>
-
+
<input type="hidden" name="NAME" value="<tmpl_var name="VALUE_LIST">" />
<input type="hidden" name="TYPE" value="ml" />
<p class="button" id="buttonAclAdmin">
@@ -88,37 +88,40 @@
</p>
</form>
-
-<h2><tmpl_var name="TEXT_DELETE_LIST"></h2>
-
-<form method="post" action="delete.pl">
+
+<h2><tmpl_var name="TEXT_DELETE_LIST"></h2>
+
+<form method="post" action="delete.pl">
<fieldset>
- <legend>
- <tmpl_var name="ASK_DELETE_WEB">:
- </legend>
-
- <p class="warning"><tmpl_var name="TEXT_BEFORE_DELETE"></p>
- <p>
- <input type="radio" name="DELETE" id="DELETE_NO" value="0" checked="checked" />
- <label for="DELETE_NO">
- <tmpl_var name="NO">
- </label>
- </p>
- <p>
- <input type="radio" name="DELETE" id="DELETE_YES" value="1" />
- <label for="DELETE_YES">
- <tmpl_var name="YES">
- </label>
- </p>
- </fieldset>
-
- <p class="button" id="buttonDelete">
+ <legend>
+ <tmpl_var name="ASK_DELETE_WEB">:
+ </legend>
+
+ <p class="warning"><tmpl_var name="TEXT_BEFORE_DELETE"></p>
+ <p>
+ <input type="radio" name="DELETE" id="DELETE_NO" value="0" checked="checked" />
+ <label for="DELETE_NO">
+ <tmpl_var name="NO">
+ </label>
+ </p>
+ <p>
+ <input type="radio" name="DELETE" id="DELETE_YES" value="1" />
+ <label for="DELETE_YES">
+ <tmpl_var name="YES">
+ </label>
+ </p>
+ </fieldset>
+
+ <p class="button" id="buttonDelete">
<input type="hidden" name="local" value="<tmpl_var name="VALUE_LOCALPART">" />
- <input type="hidden" name="domain" value="<tmpl_var name="VALUE_DOMAIN">" />
- <input type="submit" value="<tmpl_var name="TEXT_DELETE">" />
- </p>
-
+ <input type="hidden" name="domain" value="<tmpl_var name="VALUE_DOMAIN">" />
+ <input type="submit" value="<tmpl_var name="TEXT_DELETE">" />
+ </p>
+
</form>
+
+<tmpl_var name="OPART">
+
Modified: trunk/vhffs-tools/src/vhffs-groupdel
==============================================================================
--- trunk/vhffs-tools/src/vhffs-groupdel (original)
+++ trunk/vhffs-tools/src/vhffs-groupdel Mon Aug 8 18:34:08 2005
@@ -31,6 +31,6 @@
}
else
{
- print "No such group with this username\n";
+ print "No such group with this name\n";
exit( -1 );
}