use strict; # Throw errors if there's something wrong.
use warnings; # Write warnings to the HTTP Server Log file.
-use utf8;
-use CGI qw(:standard);
+use utf8 qw();
+use CGI qw(header);
use CGI::Carp('fatalsToBrowser'); # Output errors to the browser.
-use Tie::IxHash;
+use Tie::IxHash qw();
# Declare global variables for Kiriwrite settings and languages.
if ($page_content){
$page_final = $templatefiles{$page_template}{template};
+
+ if (!$page_final){
+ $page_final = "";
+ }
+
$page_final =~ s/<kiriwrite:pagecontent>/$page_content/g;
}
($page_filename) = $page_filename =~ m/^(.*)$/g;
($kiriwrite_config{"directory_data_output"}) = $kiriwrite_config{"directory_data_output"} =~ m/^(.*)$/g;
open($filehandle_page, ">:utf8 ", $kiriwrite_config{"directory_data_output"} . '/' . $page_filename) or ($kiriwrite_presmodule->addtext($error_prefix . kiriwrite_language($kiriwrite_lang->{compile}->{pagenotwritten}, $page_filename, $!)), $kiriwrite_presmodule->addlinebreak(), $error_count++, next);
+
+ if (!$page_final){
+
+ $page_final = "";
+
+ }
+
binmode $filehandle_page, ':utf8';
print $filehandle_page $page_final;
close($filehandle_page);
# Load the required Perl modules.
- use XML::Simple;
+ use XML::Simple qw(XMLin);
my $xsl = XML::Simple->new();
# Check if the Kiriwrite configuration file exists before using it and
# Load the Encode perl module.
- use Encode;
+ use Encode qw(decode_utf8);
# Convert the string.
if ($http_query_confirm eq 1){
# Value is correct, collect the variables to pass onto the database variable.
- # Load the XML::Simple module.
-
- use XML::Simple;
- my $xsl = XML::Simple->new();
-
# Get the variables from the HTTP query.
my $newdatabasename = $query->param('databasename');