# Check if there is a page that already exists with the new
# filename.
+ $page_found = 0;
+
if ($page_filename ne $page_newfilename){
$string_handle = $database_handle->prepare('SELECT filename FROM ' . $class->convert($options{"TablePrefix"}) . '_' . $class->convert($database_filename) . '_database_pages WHERE filename = \'' . $class->convert($page_newfilename) . '\' LIMIT 1') or ( $error = "DatabaseError", $errorext = $database_handle->errstr, return );
foreach $database (@data_directory){
- $database =~ s/.db.sqlite$//g;
+ $database =~ s/.db.sqlite$//og;
$database_filename_friendly = $database;
#$database_filename_length = length($database);
- #$database_filename_friendly = substr($database, 0, $database_filename_length - 3);
+ #$database_filename_friendly = substr($database, 0, $database_filename_length - 10);
push(@data_directory_final, $database_filename_friendly);
}
my $page_filename = $passedoptions->{"PageFilename"};
my $page_reduced = $passedoptions->{"Reduced"};
+ if (!$page_reduced){
+
+ $page_reduced = 0;
+
+ }
+
if ($page_reduced eq 1){
$string_handle = $database_handle->prepare('SELECT filename, pagename, pagedescription, lastmodified FROM kiriwrite_database_pages WHERE filename = \'' . $class->convert($page_filename) . '\' LIMIT 1') or ( $error = "DatabaseError", $errorext = $database_handle->errstr, return );
# Check if there is a page that already exists with the new
# filename.
+ $page_found = 0;
+
if ($page_filename ne $page_newfilename){
$string_handle = $database_handle->prepare('SELECT filename FROM kiriwrite_database_pages WHERE filename = \'' . $class->convert($page_newfilename) . '\' LIMIT 1') or ( $error = "DatabaseError", $errorext = $database_handle->errstr, return );
use utf8;
use CGI qw(:standard *table *Tr *td);
-use CGI::Carp('fatalsToBrowser'); # Output errors to the browser.
+#use CGI::Carp('fatalsToBrowser'); # Output errors to the browser.
# Setup strings in specific languages. Style should be no spacing for
# language title and one tabbed spacing for each string.
$test_list{CheckXMLSimple}{Type} = "dependency";
$test_list{CheckXMLSimple}{Code} = "XML::Simple";
+$test_list{CheckXMLParser}{Name} = "XML::Parser";
+$test_list{CheckXMLParser}{Type} = "dependency";
+$test_list{CheckXMLParser}{Code} = "XML::Parser";
+
$test_list{CheckTieHash}{Name} = "Tie::IxHash";
$test_list{CheckTieHash}{Type} = "dependency";
$test_list{CheckTieHash}{Code} = "Tie::IxHash";
use utf8;
use CGI qw(header);
-use CGI::Carp('fatalsToBrowser'); # Output errors to the browser.
use Tie::IxHash;
+# This is commented out because it uses a fair bit of CPU usage.
+
+#use CGI::Carp('fatalsToBrowser'); # Output errors to the browser.
+
# Declare global variables for Kiriwrite settings and languages.
-my ($kiriwrite_config, %kiriwrite_config, $kiriwrite_lang, $kiriwrite_version, %kiriwrite_version, $kiriwrite_env, %kiriwrite_env, $kiriwrite_presmodule, $kiriwrite_dbmodule);
+my ($kiriwrite_config, %kiriwrite_config, $kiriwrite_lang, $kiriwrite_version, %kiriwrite_version, $kiriwrite_env, %kiriwrite_env, $kiriwrite_presmodule, $kiriwrite_dbmodule, $xsl);
# Setup the version information for Kiriwrite.
"script_filename" => $script_filename,
);
+ $ENV{XML_SIMPLE_PREFERRED_PARSER} = "XML::Parser";
+
}
#################################################################################
my $confirm = $passedoptions->{"Confirm"};
- # Load the required Perl modules.
-
- my $xsl = XML::Simple->new();
-
if (!$confirm){
# If the confirm value is blank, then set the confirm
# Load the required Perl modules.
use XML::Simple qw(XMLin);
- my $xsl = XML::Simple->new();
+ $xsl = XML::Simple->new();
# Check if the Kiriwrite configuration file exists before using it and
# return an critical error if it doesn't exist.