X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=cgi-files%2Fkiriwrite.cgi;h=bb13b10ccf457216f194404b5c931d09ada1f7a7;hb=ae7ec57550d2ef5f947954c6cc4e06b4e27769b1;hp=74c16714e7166711953102ec4cd0e9ce41acc7af;hpb=11cedbfb093405bd9c45440398c4dd83e0b49625;p=kiriwrite%2F.git diff --git a/cgi-files/kiriwrite.cgi b/cgi-files/kiriwrite.cgi index 74c1671..bb13b10 100755 --- a/cgi-files/kiriwrite.cgi +++ b/cgi-files/kiriwrite.cgi @@ -24,10 +24,10 @@ 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. @@ -8809,6 +8809,11 @@ sub kiriwrite_compile_makepages{ if ($page_content){ $page_final = $templatefiles{$page_template}{template}; + + if (!$page_final){ + $page_final = ""; + } + $page_final =~ s//$page_content/g; } @@ -8998,6 +9003,13 @@ sub kiriwrite_compile_makepages{ ($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); @@ -11260,7 +11272,7 @@ sub kiriwrite_settings_load{ # 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 @@ -13096,7 +13108,7 @@ sub kiriwrite_utf8convert{ # Load the Encode perl module. - use Encode; + use Encode qw(decode_utf8); # Convert the string. @@ -13501,11 +13513,6 @@ if ($query->param('mode')){ 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');