Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
More updates.
authorkirinji <kirinji@b7d4c41f-bb2b-0410-be1d-d0fb2b8774c1>
Wed, 19 Sep 2007 19:06:32 +0000 (19:06 +0000)
committerkirinji <kirinji@b7d4c41f-bb2b-0410-be1d-d0fb2b8774c1>
Wed, 19 Sep 2007 19:06:32 +0000 (19:06 +0000)
cgi-files/Modules/Database/MySQL5.pm
cgi-files/Modules/Database/SQLite.pm
cgi-files/install.cgi
cgi-files/kiriwrite.cgi

index 3a41408..945704a 100644 (file)
@@ -1833,6 +1833,8 @@ sub editpage{
        # 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 );
index 28c7cba..72ae6a5 100644 (file)
@@ -605,11 +605,11 @@ sub getdblist{
 
        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);
 
        }
@@ -1204,6 +1204,12 @@ sub getpageinfo{
        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 );
@@ -1524,6 +1530,8 @@ sub editpage{
        # 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 );
index 0bb18dc..22a08aa 100755 (executable)
@@ -26,7 +26,7 @@ use warnings;                         # Write warnings to the HTTP Server Log file.
 
 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.
@@ -1597,6 +1597,10 @@ $test_list{CheckXMLSimple}{Name}         = "XML::Simple";
 $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";
index bd59725..160f0d1 100755 (executable)
@@ -26,12 +26,15 @@ use warnings;                               # Write warnings to the HTTP Server Log file.
 
 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.
 
@@ -75,6 +78,8 @@ sub BEGIN{
                "script_filename" => $script_filename,
        );
 
+       $ENV{XML_SIMPLE_PREFERRED_PARSER} = "XML::Parser";
+
 }
 
 #################################################################################
@@ -10309,10 +10314,6 @@ sub kiriwrite_settings_edit{
 
        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
@@ -11300,7 +11301,7 @@ sub kiriwrite_settings_load{
        # 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.
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy