[vhffs-dev] [830] Moved captchadir from <global> to <panel> part |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 830
Author: gradator
Date: 2007-08-30 14:11:14 +0000 (Thu, 30 Aug 2007)
Log Message:
-----------
Moved captchadir from <global> to <panel> part
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Conf.pm
trunk/vhffs-backend/conf/vhffs.conf.dist.in
trunk/vhffs-panel/show_code.pl
trunk/vhffs-panel/subscribe.pl
Modified: trunk/vhffs-api/src/Vhffs/Conf.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Conf.pm 2007-08-30 13:58:31 UTC (rev 829)
+++ trunk/vhffs-api/src/Vhffs/Conf.pm 2007-08-30 14:11:14 UTC (rev 830)
@@ -658,11 +658,6 @@
return 0;
}
-sub get_captcha_dir {
- return $Config{'global'}{'captchadir'} if(defined $Config{'global'}{'captchadir'});
- return '/tmp';
-}
-
sub get_mail_obfuscation {
return $Config{'global'}{'panel'}{'mail_obfuscation'}
if(defined $Config{'global'}{'panel'}{'mail_obfuscation'});
Modified: trunk/vhffs-backend/conf/vhffs.conf.dist.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-30 13:58:31 UTC (rev 829)
+++ trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-30 14:11:14 UTC (rev 830)
@@ -25,11 +25,6 @@
#Directory which contains internationalisation stuff
intldir = @INTLDIR@/
- # Directory used to store captcha files
- # Should be readable for webserver user but not accessible
- # to end users.
- captchadir = /tmp
-
#The default language
default_language = en_US
@@ -76,6 +71,10 @@
#The default theme
default_theme = vhffs
+ # Directory used to store captcha files
+ # Should be readable and writable by webserver user but not accessible to end users.
+ captchadir = /tmp
+
#Obfuscation technique for emails (none, simple, entities or javascript)
mail_obfuscation = simple
Modified: trunk/vhffs-panel/show_code.pl
===================================================================
--- trunk/vhffs-panel/show_code.pl 2007-08-30 13:58:31 UTC (rev 829)
+++ trunk/vhffs-panel/show_code.pl 2007-08-30 14:11:14 UTC (rev 830)
@@ -43,7 +43,7 @@
my $buffer;
exit 0 unless ( defined $code && $code =~ /^[0-9a-fA-F]{32}$/ );
-exit 0 unless ( open(PNG, $vhffs->get_config()->get_captcha_dir()."/$code.png") );
+exit 0 unless ( open(PNG, $vhffs->get_config()->get_panel->{'captchadir'}."/$code.png") );
print CGI->header( -type=>"image/png" );
Modified: trunk/vhffs-panel/subscribe.pl
===================================================================
--- trunk/vhffs-panel/subscribe.pl 2007-08-30 13:58:31 UTC (rev 829)
+++ trunk/vhffs-panel/subscribe.pl 2007-08-30 14:11:14 UTC (rev 830)
@@ -73,7 +73,7 @@
my $template;
my $message;
-my $dir = $vhffs->get_config->get_captcha_dir;
+my $dir = $vhffs->get_config->get_panel->{'captchadir'};
my $captcha = Authen::Captcha->new(
data_folder => $dir,
output_folder => $dir);