Admin email address variable substitution.

This commit is contained in:
Chris 2013-05-16 16:41:48 +01:00
parent 1c51df834e
commit 376cbd3274

View File

@ -116,6 +116,7 @@
# paths inside the common template). This will always have a trailing '/'. # paths inside the common template). This will always have a trailing '/'.
# - `{V_[sitename]}` is replaced by the name of the site in the 'site_name' # - `{V_[sitename]}` is replaced by the name of the site in the 'site_name'
# configuration value. # configuration value.
# - `{V_[admin_email]}` is replaced by the site admin email address.
package Webperl::Template; package Webperl::Template;
use POSIX qw(strftime); use POSIX qw(strftime);
@ -540,6 +541,7 @@ sub fix_variables {
$$textref =~ s/{V_\[templatepath\]}/$self->{templatepath}/g; $$textref =~ s/{V_\[templatepath\]}/$self->{templatepath}/g;
$$textref =~ s/{V_\[commonpath\]}/$self->{commonpath}/g; $$textref =~ s/{V_\[commonpath\]}/$self->{commonpath}/g;
$$textref =~ s/{V_\[sitename\]}/$self->{settings}->{config}->{site_name}/g; $$textref =~ s/{V_\[sitename\]}/$self->{settings}->{config}->{site_name}/g;
$$textref =~ s/{V_\[admin_email\]}/$self->{settings}->{config}->{Core:admin_email}/g;
# Do any module marker replacements if we can # Do any module marker replacements if we can
if($self -> {"modules"}) { if($self -> {"modules"}) {