[vhffs-dev] [832] Moved <help> block to main instead of <global>, moved use_notation to <users> block, renamed <group> block to <groups>, modified avatar configuration |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [832] Moved <help> block to main instead of <global>, moved use_notation to <users> block, renamed <group> block to <groups>, modified avatar configuration
- From: subversion@xxxxxxxxx
- Date: Thu, 30 Aug 2007 18:51:15 +0200
Revision: 832
Author: gradator
Date: 2007-08-30 16:51:14 +0000 (Thu, 30 Aug 2007)
Log Message:
-----------
Moved <help> block to main instead of <global>, moved use_notation to <users> block, renamed <group> block to <groups>, modified avatar configuration
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Conf.pm
trunk/vhffs-api/src/Vhffs/Functions.pm
trunk/vhffs-api/src/Vhffs/Group.pm
trunk/vhffs-api/src/Vhffs/Panel/Commons.pm
trunk/vhffs-api/src/Vhffs/Panel/Main.pm
trunk/vhffs-api/src/Vhffs/Robots/Group.pm
trunk/vhffs-backend/conf/vhffs.conf.dist.in
trunk/vhffs-irc/modobot.pl
trunk/vhffs-panel/admin/moderation.pl
trunk/vhffs-panel/admin/moderation_submit.pl
trunk/vhffs-panel/admin/object/delete_avatar.pl
trunk/vhffs-panel/admin/user/edit.pl
trunk/vhffs-panel/getavatar.pl
trunk/vhffs-panel/group/prefs.pl
trunk/vhffs-panel/mailinglist/prefs.pl
trunk/vhffs-panel/object/upavatar.pl
trunk/vhffs-panel/user/prefs.pl
trunk/vhffs-panel/web/create.pl
trunk/vhffs-public/allgroups.pl
trunk/vhffs-public/allwebsites.pl
trunk/vhffs-public/group.pl
trunk/vhffs-public/index.pl
trunk/vhffs-public/lastgroups.pl
trunk/vhffs-public/lastusers.pl
trunk/vhffs-public/rss/lastgroups.pl
trunk/vhffs-public/rss/lastusers.pl
trunk/vhffs-public/user.pl
trunk/vhffs-tests/conf/vhffs.conf
trunk/vhffs-tools/src/vhffs-moderate
Modified: trunk/vhffs-api/src/Vhffs/Conf.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Conf.pm 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-api/src/Vhffs/Conf.pm 2007-08-30 16:51:14 UTC (rev 832)
@@ -90,7 +90,7 @@
sub get_panel
{
- return $Config{'global'}{'panel'};
+ return $Config{'panel'};
}
sub get_backend
@@ -108,9 +108,9 @@
return $Config{'users'};
}
-sub get_group
+sub get_groups
{
- return $Config{'group'};
+ return $Config{'groups'};
}
sub get_listengine
@@ -139,22 +139,6 @@
}
-
-
-
-sub get_default_apache_domain
-{
- my $self = shift;
- if( defined $Config{"services"}{"apache"}{"default_domain"} )
- {
- return $Config{"services"}{"apache"}{"default_domain"};
- }
- else
- {
- return undef;
- }
-}
-
sub get_default_a
{
my $self = shift;
@@ -367,128 +351,6 @@
}
-sub get_panel_public
-{
- if( $Config{"global"}{"panel"}{use_public} )
- {
- if( $Config{"global"}{"panel"}{use_public} eq "yes" )
- {
- return 1;
- }
- }
- return 0;
-}
-
-sub get_panel_public_url
-{
- return $Config{"global"}{"panel"}{url_public};
-}
-
-sub get_panel_open
-{
- if( $Config{"global"}{"panel"}{"open"} )
- {
- if( $Config{"global"}{"panel"}{"open"} eq "yes" )
- {
- return 1;
- }
- }
- return 0;
-}
-
-sub get_panel_avatar
-{
- if( $Config{"global"}{"panel"}{"use_avatar"} )
- {
- if( $Config{"global"}{"panel"}{'use_avatar'} eq "yes" )
- {
- return 1;
- }
- }
- return 0;
-}
-
-
-
-sub use_notation
-{
- if( $Config{"global"}{"panel"}{use_notation} )
- {
- if( $Config{"global"}{"panel"}{use_notation} eq "yes" )
- {
- return 1;
- }
- }
- return 0;
-}
-
-
-
-sub get_panel_public_users
-{
- if( $Config{"global"}{"panel"}{users} )
- {
- if( $Config{"global"}{"panel"}{users} eq "yes" )
- {
- return 1;
- }
- }
- return 0;
-}
-
-
-sub get_panel_public_groups
-{
- if( $Config{"global"}{"panel"}{groups} )
- {
- if( $Config{"global"}{"panel"}{groups} eq "yes" )
- {
- return 1;
- }
- }
- return 0;
-}
-
-
-sub get_panel_url
-{
- if( $Config{"global"}{"panel"}{url} )
- {
- return $Config{"global"}{"panel"}{url};
- }
- else
- {
- return undef;
- }
-}
-
-
-sub get_panel_helpurl
-{
- if( $Config{"global"}{"panel"}{help_url} )
- {
- return $Config{"global"}{"panel"}{help_url};
- }
- else
- {
- return undef;
- }
-}
-
-
-sub stats_on_home
-{
- if( defined $Config{"global"}{"panel"}{"stats_on_home"} )
- {
- if( $Config{"global"}{"panel"}{"stats_on_home"} eq "yes" )
- {
- return 1;
- }
-
- }
- return 0;
-}
-
sub get_host_name
{
if( defined $Config{"global"}{host_name} )
@@ -632,9 +494,4 @@
return 0;
}
-sub get_mail_obfuscation {
- return $Config{'global'}{'panel'}{'mail_obfuscation'}
- if(defined $Config{'global'}{'panel'}{'mail_obfuscation'});
- return 'none';
-}
1;
Modified: trunk/vhffs-api/src/Vhffs/Functions.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Functions.pm 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-api/src/Vhffs/Functions.pm 2007-08-30 16:51:14 UTC (rev 832)
@@ -283,7 +283,7 @@
sub obfuscate_email($$) {
my ($vhffs, $mail) = @_;
- my $tech = $vhffs->get_config->get_mail_obfuscation;
+ my $tech = $vhffs->get_config->get_panel->{'mail_obfuscation'} || 'none';
return $mail if($tech eq 'none');
if($tech eq 'simple') {
Modified: trunk/vhffs-api/src/Vhffs/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Group.pm 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-api/src/Vhffs/Group.pm 2007-08-30 16:51:14 UTC (rev 832)
@@ -78,7 +78,7 @@
}
}
- my $groupconf = $main->get_config->get_group;
+ my $groupconf = $main->get_config->get_groups;
my $group;
my $dbh = $main->get_db_object;
Modified: trunk/vhffs-api/src/Vhffs/Panel/Commons.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Commons.pm 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-api/src/Vhffs/Panel/Commons.pm 2007-08-30 16:51:14 UTC (rev 832)
@@ -69,7 +69,7 @@
$template->param( LANGS => Vhffs::Panel::Main::select_lang( $vhffs ) );
- if( $vhffs->get_config->stats_on_home == 1 ) {
+ if( $vhffs->get_config->get_panel->{'stats_on_home'} eq 'yes' ) {
use Vhffs::Stats;
my $stats = new Vhffs::Stats( $vhffs );
my $users = $stats->get_user_total;
@@ -78,9 +78,9 @@
$template->param( TEXT_STATS => sprintf( gettext( "Woah, %s users and %s groups already trust %s" ) , $users, $groups , $hosturl ) );
}
- if( $vhffs->get_config->get_panel_public == 1 ) {
+ if( $panel->is_public ) {
$template->param( TEXT_PUBLIC => gettext( "Go to public area" ) );
- $template->param( URL_PUBLIC => $vhffs->get_config->get_panel_public_url );
+ $template->param( URL_PUBLIC => $vhffs->get_config->get_panel->{'url_public'} );
}
$panel->display_light( $template );
Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2007-08-30 16:51:14 UTC (rev 832)
@@ -64,7 +64,7 @@
exit( 0 );
}
- if( $vhffs->get_config->get_panel_open != 1 )
+ if( $vhffs->get_config->get_panel->{'open'} ne 'yes' )
{
$template = new HTML::Template( filename => $templatedir."/panel/main/close.tmpl" );
$template->param( TITLE => gettext("Platform temporary closed") );
@@ -92,7 +92,7 @@
my $self = shift;
my $vhffs = $self->{vhffs};
my $templatedir = $vhffs->get_config->get_templatedir;
- if( $vhffs->get_config->get_panel_public != 1 ) {
+ if( $vhffs->get_config->get_panel->{'use_public'} ne 'yes' ) {
my $template = new HTML::Template( filename => $templatedir.'/panel/main/close.tmpl' );
$template->param( TITLE => gettext('Public area not available') );
$template->param( TEXT_CLOSE => gettext('Public area not available') );
@@ -106,6 +106,24 @@
=pod
+=head2 is_open
+
+ $panel->is_open;
+
+Return 1 if panel is open, else return 0
+
+=cut
+
+sub is_open {
+ my $self = shift;
+ my $vhffs = $self->{vhffs};
+ use Vhffs::Functions;
+ return Vhffs::Functions::strtoboolean( $vhffs->get_config->get_panel->{'open'} );
+}
+
+=pod
+
+
=head2 is_public
$panel->is_public;
@@ -115,13 +133,70 @@
=cut
sub is_public {
- my $self = shift;
- my $vhffs = $self->{vhffs};
- return ( $vhffs->get_config->get_panel_public == 1 );
+ my $self = shift;
+ my $vhffs = $self->{vhffs};
+ use Vhffs::Functions;
+ return Vhffs::Functions::strtoboolean( $vhffs->get_config->get_panel->{'use_public'} );
}
=pod
+
+=head2 use_avatars
+
+ $panel->use_avatars;
+
+Return 1 if either or both users or groups avatars are enabled, else return 0
+
+=cut
+
+sub use_avatars {
+ my $self = shift;
+ my $vhffs = $self->{vhffs};
+ use Vhffs::Functions;
+ return ( Vhffs::Functions::strtoboolean( $vhffs->get_config->get_panel->{'users_avatars'} )
+ || Vhffs::Functions::strtoboolean( $vhffs->get_config->get_panel->{'groups_avatars'} ) );
+}
+
+=pod
+
+
+=head2 use_users_avatars
+
+ $panel->use_users_avatars;
+
+Return 1 if users avatars are enabled, else return 0
+
+=cut
+
+sub use_users_avatars {
+ my $self = shift;
+ my $vhffs = $self->{vhffs};
+ use Vhffs::Functions;
+ return Vhffs::Functions::strtoboolean( $vhffs->get_config->get_panel->{'users_avatars'} );
+}
+
+=pod
+
+
+=head2 use_groups_avatars
+
+ $panel->use_groups_avatars;
+
+Return 1 if groups avatars are enabled, else return 0
+
+=cut
+
+sub use_groups_avatars {
+ my $self = shift;
+ my $vhffs = $self->{vhffs};
+ use Vhffs::Functions;
+ return Vhffs::Functions::strtoboolean( $vhffs->get_config->get_panel->{'groups_avatars'} );
+}
+
+=pod
+
+
=head2 check_modo
$panel->check_modo
@@ -424,11 +499,7 @@
$menutemplate->param( TEXT_HELP => gettext("Help") );
$menutemplate->param( TEXT_SUBMITBUG => gettext("Submit a bug") );
$menutemplate->param( TEXT_LOGOUT => gettext("Logout") );
- if( defined $vhffs->get_config->get_panel_helpurl ) {
- $menutemplate->param( HELP_URL => $vhffs->get_config->get_panel_helpurl );
- } else {
- $menutemplate->param( HELP_URL => 'http://www.vhffs.org/' );
- }
+ $menutemplate->param( HELP_URL => $vhffs->get_config->get_panel->{'url_help'} || 'http://www.vhffs.org/' );
# Current project stuff (TODO stop handle it in session)
if( ( CGI::url( -absolute => 1) =~ /^\/admin\// ) ) {
@@ -529,7 +600,7 @@
$template->param( TEXT_GENERAL => gettext('General') );
$template->param( TEXT_FULLHISTORY => gettext('Full history') );
- my $groupconfig = $config->get_group;
+ my $groupconfig = $config->get_groups;
if( defined $groupconfig && defined ( my $url = $groupconfig->{'url_doc'} ) ) {
$template->param( HELP_TEXT => gettext('Help') );
$template->param( HELP_URL => $url );
Modified: trunk/vhffs-api/src/Vhffs/Robots/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Group.pm 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-api/src/Vhffs/Robots/Group.pm 2007-08-30 16:51:14 UTC (rev 832)
@@ -189,7 +189,7 @@
{
my $vhffs = shift;
my $group = shift;
- my $users = $group->get_users;
+ my $users = $group->get_config->get_users;
my $user;
foreach $user ( @{$users} )
{
Modified: trunk/vhffs-backend/conf/vhffs.conf.dist.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-30 16:51:14 UTC (rev 832)
@@ -43,64 +43,60 @@
#The mail where alert are sent
alert_mail = root@localhost
- #Is the requests moderated or not
+ #Are the requests moderated or not
moderation = yes
#Whether to use vhffsfs or not. vhffsfs allows you to provide a
#virtual home directory depending on the uid of the running process
#in order to avoid using of a virtual chroot to provide ftp, sftp, or a shell
use_vhffsfs = no
+</global>
- ####################
- #Panel configuration
- <panel>
- #Is the panel open or not ?
- open = yes
- #URL of the panel
- url = http://your.panel.url
+######
+# PANEL
+#################################################
+<panel>
+ #Is the panel open or not ?
+ open = yes
- #Use the public section of VHFFS
- use_public = yes
+ #URL of the panel
+ url = http://your.panel.url
- #The URL to the public part
- url_public = http://projects.vhffs.org/
+ #Use the public section of VHFFS
+ use_public = yes
- #Directory which contains themes
- themesdir = @PANELDIR@/themes
+ #The URL to the public part
+ url_public = http://projects.vhffs.org/
- #The default theme
- default_theme = vhffs
+ #Directory which contains themes
+ themesdir = @PANELDIR@/themes
- # Directory used to store captcha files
- # Should be readable and writable by webserver user but not accessible to end users.
- captchadir = /tmp
+ #The default theme
+ default_theme = vhffs
- #Obfuscation technique for emails (none, simple, entities or javascript)
- mail_obfuscation = simple
+ # Directory used to store captcha files
+ # Should be readable and writable by webserver user but not accessible to end users.
+ captchadir = /tmp
- #This is the URL display for the "Help" link in the panel
- help_url = http://help.hoster
+ #Obfuscation technique for emails (none, simple, entities or javascript)
+ mail_obfuscation = simple
- #Use avatar or not ? If yes, you must create a /data/avatar and change owner/permissions
- #so that the webserver can write into this directory
- use_avatar = yes
- users = yes
- groups = yes
+ #This is the URL display for the "Help" link in the panel
+ url_help = http://help.hoster
- #Print statistics in the main page of VHFFS ?
- stats_on_home = yes
+ #Use avatar or not ? If yes, you must create a /data/avatar and change owner/permissions
+ #so that the webserver can write into this directory
+ users_avatars = yes
+ groups_avatars = yes
- #Notation is useful to handle aggressive users
- #If a project is refused by moderation, the note os the user if decreased
- #If a project or service is accepted, the note is increased
- use_notation = yes
+ #Print statistics in the main page of VHFFS ?
+ stats_on_home = yes
- #Use RSS for users and groups ?
- rss_users = yes
- rss_groups = yes
- </panel>
-</global>
+ #Use RSS for users and groups ?
+ rss_users = yes
+ rss_groups = yes
+</panel>
######
@@ -139,15 +135,20 @@
default_shell = /bin/bash
default_quota = 10
+ #Notation is useful to handle aggressive users
+ #If a project is refused by moderation, the note os the user if decreased
+ #If a project or service is accepted, the note is increased
+ use_notation = yes
+
# URL to the documentation (optional)
url_doc = http://help.myhoster.net/user
</users>
-<group>
+<groups>
# URL to the documentation (optional)
url_doc = http://help.myhoster.net/group
default_quota = 100
-</group>
+</groups>
######
@@ -159,6 +160,9 @@
#use this module or not
activate = yes
+ #default domain of website
+ default_domain = vhffs.org
+
# Where to find log from webserver, each webserver should be in a separate directory, example :
# - /data/logs/web/incoming/webserver0
# - /data/logs/web/incoming/webserver1
Modified: trunk/vhffs-irc/modobot.pl
===================================================================
--- trunk/vhffs-irc/modobot.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-irc/modobot.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -88,7 +88,7 @@
GR: foreach $temp ( @{$groups} )
{
map { last GR if (($_->get_oid eq $temp->get_oid) && ($_->get_groupname eq $temp->get_groupname)); } @oldgroup;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("Groupe : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_groupname . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -116,7 +116,7 @@
{
map { last WE if (($_->get_oid eq $temp->get_oid) && ($_->get_servername eq $temp->get_servername)); } @oldweb;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("Web : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_servername . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -144,7 +144,7 @@
DN: foreach $temp ( @{$nss} )
{
map { last DN if (($_->get_oid eq $temp->get_oid) && ($_->get_domain eq $temp->get_domain)); } @olddns;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("DNS : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_domain . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -173,7 +173,7 @@
CV: foreach $temp ( @{$repos} )
{
map { last CV if (($_->get_oid eq $temp->get_oid) && ($_->get_cvsroot eq $temp->get_cvsroot)); } @oldcvs;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("CVS : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_cvsroot . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -201,7 +201,7 @@
ML: foreach $temp ( @{$mls} )
{
map { last ML if (($_->get_oid eq $temp->get_oid) && ($_->get_localpart eq $temp->get_localpart)); } @oldmailing;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("Mailing list : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " . $temp->get_group->get_groupname . " " . $temp->get_localpart . "@" . $temp->get_domain . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -229,7 +229,7 @@
SV: foreach $temp ( @{$repos} )
{
map { last SV if (($_->get_oid eq $temp->get_oid) && ($_->get_reponame eq $temp->get_reponame)); } @oldsvn;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("SVN : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_reponame . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -257,7 +257,7 @@
MA: foreach $temp ( @{$mails} )
{
map { last MA if (($_->get_oid eq $temp->get_oid) && ($_->get_domain eq $temp->get_domain)); } @oldmail;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("Mail : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_domain . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -285,7 +285,7 @@
MY: foreach $temp ( @{$dbs} )
{
map { last MY if (($_->get_oid eq $temp->get_oid) && ($_->get_dbname eq $temp->get_dbname)); } @oldmysql;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("MySql : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_dbname . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -313,7 +313,7 @@
PO: foreach $temp ( @{$dbs} )
{
map { last PO if (($_->get_oid eq $temp->get_oid) && ($_->get_dbname eq $temp->get_dbname)); } @oldpostgres;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("Postgres : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_dbname . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -341,7 +341,7 @@
RP: foreach $temp ( @{$repos} )
{
map { last RP if (($_->get_oid eq $temp->get_oid) && ($_->get_name eq $temp->get_name)); } @oldrepository;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
irc_msg ("REPOSITORY : " . $temp->get_oid . " " . $temp->get_user->get_username . "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") [".$temp->get_user->get_lang."] " . $temp->get_group->get_groupname . " " . $temp->get_name . " " . Vhffs::Functions::stripslashes($temp->get_description));
}
@@ -400,13 +400,13 @@
$mail .= gettext("Cheers,\nThe Moderator and Admin team\n");
$mail .= "-----\n";
$mail .= $vhffs->get_config->get_host_name()."\n";
- $mail .= $vhffs->get_config->get_panel_url();
+ $mail .= $vhffs->get_config->get_panel->{'url'};
my $subject = sprintf(gettext("Your request on %s"), $vhffs->get_config->get_host_name());
Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $userbis->get_mail , $subject , $mail );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
use Vhffs::Note;
Vhffs::Note::inc_note( $vhffs , $userbis , 1 );
@@ -421,7 +421,7 @@
my $userbis = Vhffs::User::get_by_uid( $vhffs , $object->get_owner_uid );
if( defined $userbis )
{
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
use Vhffs::Note;
Vhffs::Note::inc_note( $vhffs , $userbis , -1 );
Modified: trunk/vhffs-panel/admin/moderation.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/admin/moderation.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -97,7 +97,7 @@
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
$subtemplate->param( NAME => $temp->get_groupname );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -140,7 +140,7 @@
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
$subtemplate->param( NAME => $temp->get_servername );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -181,7 +181,7 @@
foreach $temp ( @{$nss} )
{
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -225,7 +225,7 @@
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -269,7 +269,7 @@
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
$subtemplate->param( NAME => $temp->get_localpart ."\@". $temp->get_domain );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -313,7 +313,7 @@
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
$subtemplate->param( NAME => $svn->get_reponame);
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $svn->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $svn->get_user ) );
@@ -358,7 +358,7 @@
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
$subtemplate->param( NAME => $temp->get_domain );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -400,7 +400,7 @@
{
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -442,7 +442,7 @@
{
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
@@ -484,7 +484,7 @@
{
my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
$subtemplate->param( OWNER => $temp->get_user->get_username);
$subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
Modified: trunk/vhffs-panel/admin/moderation_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation_submit.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/admin/moderation_submit.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -105,13 +105,13 @@
$object->get_label(),
$vhffs->get_config->get_host_name(),
$vhffs->get_config->get_host_name(),
- $vhffs->get_config->get_panel_url());
+ $vhffs->get_config->get_panel->{'url'});
$subject = sprintf($subject,
$vhffs->get_config->get_host_name());
Vhffs::Functions::send_mail( $vhffs->get_config->get_moderator_mail , $userbis->get_mail , $subject , $mail );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
use Vhffs::Note;
Vhffs::Note::inc_note( $vhffs , $userbis , 1 );
@@ -124,7 +124,7 @@
my $askeruser = Vhffs::User::get_by_uid($vhffs, $uidasker),
$object->set_description( $reason );
$object->set_status( Vhffs::Constants::VALIDATION_REFUSED );
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
use Vhffs::Note;
Vhffs::Note::inc_note( $vhffs , $askeruser , -1 );
Modified: trunk/vhffs-panel/admin/object/delete_avatar.pl
===================================================================
--- trunk/vhffs-panel/admin/object/delete_avatar.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/admin/object/delete_avatar.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -47,10 +47,9 @@
use Vhffs::Stats;
use Vhffs::Constants;
use Vhffs::Panel::Avatar;
+
my $panel = new Vhffs::Panel::Main();
-if(!$panel) {
- exit 0;
-}
+exit 0 unless defined $panel;
my $vhffs = $panel->{'vhffs'};
my $session = $panel->{'session'};
@@ -68,7 +67,7 @@
my $templatesdir = $vhffs->get_config->get_templatedir;
my $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
-if( $vhffs->get_config->get_panel_avatar == 0 )
+if( $panel->use_avatars == 0 )
{
$message = gettext( "This platform does not support avatar");
}
Modified: trunk/vhffs-panel/admin/user/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/user/edit.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/admin/user/edit.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -250,7 +250,7 @@
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
use Vhffs::Note;
my $subtemplate = new HTML::Template( filename => $templatedir."/panel/admin/user/edit-note.tmpl" );
Modified: trunk/vhffs-panel/getavatar.pl
===================================================================
--- trunk/vhffs-panel/getavatar.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/getavatar.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -81,7 +81,7 @@
binmode STDOUT ;
-if( $vhffs->get_config->get_panel_avatar == 0 )
+if( $vhffs->get_config->get_panel->{'users_avatars'} ne 'yes' && $vhffs->get_config->get_panel->{'groups_avatars'} ne 'yes' )
{
$wp = GD::Text::Wrap->new($gd,
width => 70,
Modified: trunk/vhffs-panel/group/prefs.pl
===================================================================
--- trunk/vhffs-panel/group/prefs.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/group/prefs.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -230,7 +230,7 @@
$template->param( TEXT_JOIN_GROUP => gettext("Add a user in this group") );
$template->param( TEXT_SEND => gettext('Add') );
- if( $vhffs->get_config->get_panel_avatar ) {
+ if( $panel->use_groups_avatars ) {
my $tavatar = new HTML::Template( filename => $templatedir.'/panel/group/prefs_avatar.tmpl', global_vars => 1 );
$tavatar->param( SEND_AVATAR => gettext('Update') );
$tavatar->param( TEXT_AVATAR => gettext('Logo') );
Modified: trunk/vhffs-panel/mailinglist/prefs.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/prefs.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/mailinglist/prefs.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -156,7 +156,7 @@
$template->param( BUTTON_ADD_MEMBERS => gettext("Add them !") );
my $emaillist = "";
- foreach ( @{$group->get_users} ) {
+ foreach ( @{$group->get_config->get_users} ) {
$emaillist .= $_->{'mail'}."\n";
}
$template->param( PROJECT_MEMBERS_LIST => $emaillist );
Modified: trunk/vhffs-panel/object/upavatar.pl
===================================================================
--- trunk/vhffs-panel/object/upavatar.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/object/upavatar.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -48,11 +48,9 @@
use Vhffs::Panel::Avatar;
my $panel = new Vhffs::Panel::Main();
-if(!$panel) {
- exit 0;
-}
-my $data;
+exit 0 unless defined $panel;
+my $data;
my $vhffs = $panel->{'vhffs'};
my $session = $panel->{'session'};
@@ -88,7 +86,7 @@
my $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
# Commit all the changes for the current user
-if( $vhffs->get_config->get_panel_avatar == 0 )
+if( $panel->use_avatars == 0 )
{
$message = gettext( "This platform does not provide avatar support" );
}
Modified: trunk/vhffs-panel/user/prefs.pl
===================================================================
--- trunk/vhffs-panel/user/prefs.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/user/prefs.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -286,7 +286,7 @@
$template->param( NO => gettext("No, I'm not sure, I prefer to keep it.") );
$template->param( TEXT_DELETE => gettext("Delete") );
-if( $vhffs->get_config->get_panel_avatar() ) {
+if( $panel->use_users_avatars ) {
my $ta = new HTML::Template( filename => $templatedir."/panel/user/prefs_avatar.tmpl" );
Modified: trunk/vhffs-panel/web/create.pl
===================================================================
--- trunk/vhffs-panel/web/create.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-panel/web/create.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -78,11 +78,8 @@
$panel->add_error( gettext('Error creating webarea.') );
}
} else {
- my $config = $vhffs->get_config;
- my $default_domain = $config->get_default_apache_domain;
- if( defined $default_domain ) {
- $servername = gettext("<new site>.") . $default_domain;
- }
+ my $webconfig = $vhffs->get_config->get_service('web');
+ $servername = '<'.gettext('new site').'>.'.$webconfig->{'default_domain'} if( defined $webconfig->{'default_domain'} );
}
if(!$submitted || $panel->has_errors()) {
Modified: trunk/vhffs-public/allgroups.pl
===================================================================
--- trunk/vhffs-public/allgroups.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/allgroups.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -86,7 +86,7 @@
my $output = "";
- my $users = $group->get_users;
+ my $users = $group->get_config->get_users;
my $subtemplate;
my $user;
if( ! defined $users )
@@ -108,7 +108,7 @@
$output_final .= $template->output;
}
$subtemplate = new HTML::Template( filename => $templatedir."/public/banner.tmpl" );
-$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel_url );
+$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel->{'url'} );
$subtemplate->param( BACK_PUBLIC => gettext( "Homepage of public area") );
$subtemplate->param( BACK_LOGIN => gettext( "Go on login page" ) );
$subtemplate->param( WEBSITE_LIST => gettext( "List of all websites" ) );
Modified: trunk/vhffs-public/allwebsites.pl
===================================================================
--- trunk/vhffs-public/allwebsites.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/allwebsites.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -96,7 +96,7 @@
$maintemplate->param( VALUES => $output );
$subtemplate = new HTML::Template( filename => $templatedir."/public/banner.tmpl" );
-$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel_url );
+$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel->{'url'} );
$subtemplate->param( BACK_PUBLIC => gettext( "Homepage of public area") );
$subtemplate->param( BACK_LOGIN => gettext( "Go on login page" ) );
$subtemplate->param( WEBSITE_LIST => gettext( "List of all websites" ) );
Modified: trunk/vhffs-public/group.pl
===================================================================
--- trunk/vhffs-public/group.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/group.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -95,7 +95,7 @@
my $output = "";
- my $users = $group->get_users;
+ my $users = $group->get_config->get_users;
my $subtemplate;
my $user;
if( ! defined $users )
@@ -230,7 +230,7 @@
}
$subtemplate = new HTML::Template( filename => $templatedir."/public/banner.tmpl" );
- $subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel_url );
+ $subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel->{'url'} );
$subtemplate->param( BACK_PUBLIC => gettext( "Homepage of public area") );
$subtemplate->param( BACK_LOGIN => gettext( "Go on login page" ) );
$subtemplate->param( WEBSITE_LIST => gettext( "List of all websites" ) );
Modified: trunk/vhffs-public/index.pl
===================================================================
--- trunk/vhffs-public/index.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/index.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -78,7 +78,7 @@
$subtemplate = new HTML::Template( filename => $templatedir."/public/banner.tmpl" );
-$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel_url );
+$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel->{'url'} );
$subtemplate->param( BACK_PUBLIC => gettext( "Homepage of public area") );
$subtemplate->param( BACK_LOGIN => gettext( "Go on login page" ) );
$subtemplate->param( WEBSITE_LIST => gettext( "List of all websites" ) );
Modified: trunk/vhffs-public/lastgroups.pl
===================================================================
--- trunk/vhffs-public/lastgroups.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/lastgroups.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -78,7 +78,7 @@
$template->param( VALUE_DESCRIPTION => CGI::escapeHTML( $group->get_description ) );
my $output = "";
- my $users = $group->get_users;
+ my $users = $group->get_config->get_users;
my $subtemplate;
my $user;
if( ! defined $users )
@@ -100,7 +100,7 @@
$output_final .= $template->output;
}
$subtemplate = new HTML::Template( filename => $templatedir."/public/banner.tmpl" );
-$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel_url );
+$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel->{'url'} );
$subtemplate->param( BACK_PUBLIC => gettext( "Homepage of public area") );
$subtemplate->param( BACK_LOGIN => gettext( "Go on login page" ) );
$subtemplate->param( WEBSITE_LIST => gettext( "List of all websites" ) );
Modified: trunk/vhffs-public/lastusers.pl
===================================================================
--- trunk/vhffs-public/lastusers.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/lastusers.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -82,7 +82,7 @@
$template->param( TEXT_LASTNAME => gettext("Lastname") );
$template->param( VALUE_LASTNAME => $user->get_lastname );
$template->param( TEXT_GROUPS => gettext("Groups") );
- $template->param( IMG_AVATAR => "<img src=\"/getavatar.pl?oid=".$user->get_oid."\" alt=\"".$user->get_firstname." avatar\"/>" ) if( $vhffs->get_config->get_panel_avatar() );
+ $template->param( IMG_AVATAR => "<img src=\"/getavatar.pl?oid=".$user->get_oid."\" alt=\"".$user->get_firstname." avatar\"/>" ) if( $panel->use_users_avatars );
$template->param( VALUE_OID => $user->get_oid );
my $output = "";
@@ -109,7 +109,7 @@
}
$subtemplate = new HTML::Template( filename => $templatedir."/public/banner.tmpl" );
-$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel_url );
+$subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel->{'url'} );
$subtemplate->param( BACK_PUBLIC => gettext( "Homepage of public area") );
$subtemplate->param( BACK_LOGIN => gettext( "Go on login page" ) );
$subtemplate->param( WEBSITE_LIST => gettext( "List of all websites" ) );
Modified: trunk/vhffs-public/rss/lastgroups.pl
===================================================================
--- trunk/vhffs-public/rss/lastgroups.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/rss/lastgroups.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -42,10 +42,10 @@
my $vhffs = init Vhffs::Main;
my $url;
-$url = "" if( ! defined ( $url = $vhffs->get_config->get_panel_public_url ) );
+$url = "" unless defined ( $url = $vhffs->get_config->get_panel->{'url_public'} );
-if( $vhffs->get_config->get_panel->{'rss_groups'} eq 'yes' && $vhffs->get_config->get_panel_public == 1)
+if( $vhffs->get_config->get_panel->{'rss_groups'} eq 'yes' && $vhffs->get_config->get_panel->{'use_public'} eq 'yes' )
{
my $groups = Vhffs::Group::get_last_groups( $vhffs );
Modified: trunk/vhffs-public/rss/lastusers.pl
===================================================================
--- trunk/vhffs-public/rss/lastusers.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/rss/lastusers.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -41,9 +41,9 @@
my $vhffs = init Vhffs::Main;
my $url;
-$url = "" if( ! defined ( $url = $vhffs->get_config->get_panel_public_url ) );
+$url = "" unless defined ( $url = $vhffs->get_config->get_panel->{'url_public'} );
-if( $vhffs->get_config->get_panel->{'rss_users'} eq 'yes' && $vhffs->get_config->get_panel_public == 1 )
+if( $vhffs->get_config->get_panel->{'rss_users'} eq 'yes' && $vhffs->get_config->get_panel->{'use_public'} eq 'yes' )
{
my $users = Vhffs::User::get_last_users( $vhffs );
Modified: trunk/vhffs-public/user.pl
===================================================================
--- trunk/vhffs-public/user.pl 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-public/user.pl 2007-08-30 16:51:14 UTC (rev 832)
@@ -87,7 +87,7 @@
$template->param( TEXT_LASTNAME => gettext("Lastname") );
$template->param( VALUE_LASTNAME => $user->get_lastname );
$template->param( TEXT_GROUPS => gettext("Groups") );
- $template->param( IMG_AVATAR => "<img src=\"/getavatar.pl?oid=".$user->get_oid."\" alt=\"".$user->get_firstname." avatar\"/>" ) if( $vhffs->get_config->get_panel_avatar() );
+ $template->param( IMG_AVATAR => "<img src=\"/getavatar.pl?oid=".$user->get_oid."\" alt=\"".$user->get_firstname." avatar\"/>" ) if( $panel->use_users_avatars );
$template->param( VALUE_OID => $user->get_oid );
@@ -112,7 +112,7 @@
$template->param( VALUE_GROUPS => $output );
}
$subtemplate = new HTML::Template( filename => $templatedir."/public/banner.tmpl" );
- $subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel_url );
+ $subtemplate->param( URL_PANEL => $vhffs->get_config->get_panel->{'url'} );
$subtemplate->param( BACK_PUBLIC => gettext( "Homepage of public area") );
$subtemplate->param( BACK_LOGIN => gettext( "Go on login page" ) );
$subtemplate->param( WEBSITE_LIST => gettext( "List of all websites" ) );
Modified: trunk/vhffs-tests/conf/vhffs.conf
===================================================================
--- trunk/vhffs-tests/conf/vhffs.conf 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-tests/conf/vhffs.conf 2007-08-30 16:51:14 UTC (rev 832)
@@ -35,48 +35,48 @@
alert_mail = root@localhost
moderation = yes
+</global>
- ####################
- #Panel configuration
- <panel>
- #URL to the panel
- url = http://your.panel.url
- #This is the URL display for the "Help" link in the panel
- help_url = http://help.hoster
+####################
+#Panel configuration
+<panel>
+ #URL to the panel
+ url = http://your.panel.url
- #Is the panel open or not ?
- open = yes
+ #This is the URL display for the "Help" link in the panel
+ help_url = http://help.hoster
- #Use the public section of VHFFS
- use_public = yes
+ #Is the panel open or not ?
+ open = yes
- #Use avatar or not ? If yes, you must create a /data/avatars and change owner/permissions
- #so that the webserver can write into this directory
- use_avatar = yes
- users = yes
- groups = yes
+ #Use the public section of VHFFS
+ use_public = yes
- #Print statistics in the main page of VHFFS ?
- stats_on_home = yes
+ #Use avatar or not ? If yes, you must create a /data/avatars and change owner/permissions
+ #so that the webserver can write into this directory
+ use_avatar = yes
+ users = yes
+ groups = yes
- #Directory which contains themes
- themesdir = /usr/share/vhffs/panel/themes/
+ #Print statistics in the main page of VHFFS ?
+ stats_on_home = yes
- #The default theme
- default_theme = vhffs
+ #Directory which contains themes
+ themesdir = /usr/share/vhffs/panel/themes/
- #Notation is useful to handle aggressive users
- #If a project is refused by moderation, the note os the user if decreased
- #If a project or service is accepted, the note is increased
- use_notation = yes
+ #The default theme
+ default_theme = vhffs
- #Use RSS for users and groups ?
- rss_users = yes
- rss_groups = yes
- </panel>
-</global>
+ #Notation is useful to handle aggressive users
+ #If a project is refused by moderation, the note os the user if decreased
+ #If a project or service is accepted, the note is increased
+ use_notation = yes
+ #Use RSS for users and groups ?
+ rss_users = yes
+ rss_groups = yes
+</panel>
Modified: trunk/vhffs-tools/src/vhffs-moderate
===================================================================
--- trunk/vhffs-tools/src/vhffs-moderate 2007-08-30 14:38:24 UTC (rev 831)
+++ trunk/vhffs-tools/src/vhffs-moderate 2007-08-30 16:51:14 UTC (rev 832)
@@ -30,7 +30,7 @@
{
foreach $temp ( @{$groups} )
{
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "owner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;
@@ -71,7 +71,7 @@
{
print "Servername: " . $temp->get_servername;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;
@@ -111,7 +111,7 @@
{
print "Domain: " . $temp->get_domain;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;
@@ -148,7 +148,7 @@
foreach $temp ( @{$repos} )
{
print "Root: " . $temp->get_cvsroot;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;
@@ -185,7 +185,7 @@
{
print "Name: " . $temp->get_localpart ."\@". $temp->get_domain;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;
@@ -223,7 +223,7 @@
{
print "Root: " . $svn->get_reponame;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $svn->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $svn->get_user ) . ") " ;
@@ -262,7 +262,7 @@
{
print "Domain: " . $temp->get_domain;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;
@@ -301,7 +301,7 @@
{
print "Dbname: " . $temp->get_dbname;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;
@@ -339,7 +339,7 @@
{
print "Dbname: " . $temp->get_dbname;
- if( $vhffs->get_config->use_notation == 1 )
+ if( $vhffs->get_users->{'use_notation'} eq 'yes' )
{
print "\towner: " . $temp->get_user->get_username;
print "(" . Vhffs::Note::get_note( $vhffs , $temp->get_user ) . ") " ;