X-Git-Url: http://Server1/repobrowser/?p=kiriwrite%2F.git;a=blobdiff_plain;f=cgi-files%2FModules%2FDatabase%2FSQLite.pm;h=6fc34b4e21ad3d8f5ae6288f84a16fcf59b25672;hp=a9bae05e92e2e56bb307a05f366004cd3febc1ea;hb=807fbc25c35ea3cdf16adcb2106fbb63b3511a68;hpb=78f6c5e8ed54c22b470764e2b93c42ef1f6644e8 diff --git a/cgi-files/Modules/Database/SQLite.pm b/cgi-files/Modules/Database/SQLite.pm index a9bae05..6fc34b4 100644 --- a/cgi-files/Modules/Database/SQLite.pm +++ b/cgi-files/Modules/Database/SQLite.pm @@ -21,10 +21,11 @@ # Define the package (perl module) name. -package Kiriwrite::Database::SQLite; +package Modules::Database::SQLite; # Enable strict and use warnings. +use Modules::System::Common; use strict; use warnings; @@ -34,7 +35,7 @@ use DBI qw(:sql_types); # Set the following values. -our $VERSION = "0.2.0"; +our $VERSION = "0.5.0"; my ($options, %options); my $database_handle; my $statement_handle; @@ -1312,14 +1313,14 @@ sub getpageinfo{ # Put the values into the page hash. %database_page = ( - "PageFilename" => $pagefilename, - "PageName" => $pagename, - "PageDescription" => $pagedescription, - "PageSection" => $pagesection, - "PageTemplate" => $pagetemplate, - "PageContent" => $pagedata, - "PageSettings" => $pagesettings, - "PageLastModified" => $class->dateconvert($pagelastmodified), + "PageFilename" => $pagefilename, + "PageName" => $pagename, + "PageDescription" => $pagedescription, + "PageSection" => $pagesection, + "PageTemplate" => $pagetemplate, + "PageContent" => $pagedata, + "PageSettings" => $pagesettings, + "PageLastModified" => $class->dateconvert($pagelastmodified) ); $page_found = 1; @@ -1879,7 +1880,7 @@ sub connectfilter{ # Check if the template database exists. - my $filterdatabase_exists = main::kiriwrite_fileexists("filters.db.sqlite"); + my $filterdatabase_exists = kiriwrite_fileexists("filters.db.sqlite"); if ($filterdatabase_exists eq 1){ @@ -1896,7 +1897,7 @@ sub connectfilter{ # Check if the permission settings for the template database are valid. - my $filterdb_permissions = main::kiriwrite_filepermissions("filters.db.sqlite", 1, 0); + my $filterdb_permissions = kiriwrite_filepermissions("filters.db.sqlite", 1, 0); if ($filterdb_permissions eq 1){ @@ -2143,8 +2144,8 @@ sub addfilter{ # Check if the filter database permissions are valid. - my $filterdb_exists = main::kiriwrite_fileexists("filters.db.sqlite", 1, 1); - my $filterdb_permissions = main::kiriwrite_filepermissions("filters.db.sqlite", 1, 1); + my $filterdb_exists = kiriwrite_fileexists("filters.db.sqlite", 1, 1); + my $filterdb_permissions = kiriwrite_filepermissions("filters.db.sqlite", 1, 1); if ($filterdb_permissions eq 1){ @@ -2188,7 +2189,7 @@ sub addfilter{ } - my $directory_permissions = main::kiriwrite_filepermissions(".", 1, 1, 0); + my $directory_permissions = kiriwrite_filepermissions(".", 1, 1, 0); if ($directory_permissions eq 1 && $filterdb_exists){ @@ -2342,8 +2343,8 @@ sub editfilter{ # Check if the filter database permissions are valid. - my $filterdb_exists = main::kiriwrite_fileexists("filters.db.sqlite", 1, 1); - my $filterdb_permissions = main::kiriwrite_filepermissions("filters.db.sqlite", 1, 1); + my $filterdb_exists = kiriwrite_fileexists("filters.db.sqlite", 1, 1); + my $filterdb_permissions = kiriwrite_filepermissions("filters.db.sqlite", 1, 1); if ($filterdb_permissions eq 1){ @@ -2475,7 +2476,7 @@ sub connecttemplate{ # Check if the template database exists. - my $templatedatabase_exists = main::kiriwrite_fileexists("templates.db.sqlite"); + my $templatedatabase_exists = kiriwrite_fileexists("templates.db.sqlite"); if ($templatedatabase_exists eq 1){ @@ -2492,7 +2493,7 @@ sub connecttemplate{ # Check if the permission settings for the template database are valid. - my $templatedb_permissions = main::kiriwrite_filepermissions("templates.db.sqlite", 1, 0); + my $templatedb_permissions = kiriwrite_filepermissions("templates.db.sqlite", 1, 0); if ($templatedb_permissions eq 1){ @@ -2742,8 +2743,8 @@ sub addtemplate{ # Check if the template database permissions are valid. - my $templatedb_exists = main::kiriwrite_fileexists("templates.db.sqlite", 1, 1); - my $templatedb_permissions = main::kiriwrite_filepermissions("templates.db.sqlite", 1, 1); + my $templatedb_exists = kiriwrite_fileexists("templates.db.sqlite", 1, 1); + my $templatedb_permissions = kiriwrite_filepermissions("templates.db.sqlite", 1, 1); if ($templatedb_permissions eq 1){ @@ -2802,7 +2803,7 @@ sub addtemplate{ } - my $directory_permissions = main::kiriwrite_filepermissions(".", 1, 1, 0); + my $directory_permissions = kiriwrite_filepermissions(".", 1, 1, 0); if ($directory_permissions eq 1 && $templatedb_exists){ @@ -2836,7 +2837,7 @@ sub addtemplate{ # Create a template table. - my $directory_permissions = main::kiriwrite_filepermissions(".", 1, 1, 0); + my $directory_permissions = kiriwrite_filepermissions(".", 1, 1, 0); if ($directory_permissions eq 1){ @@ -2956,8 +2957,8 @@ sub edittemplate{ # Check if the template database permissions are valid. - my $templatedb_exists = main::kiriwrite_fileexists("templates.db.sqlite", 1, 1); - my $templatedb_permissions = main::kiriwrite_filepermissions("templates.db.sqlite", 1, 1); + my $templatedb_exists = kiriwrite_fileexists("templates.db.sqlite", 1, 1); + my $templatedb_permissions = kiriwrite_filepermissions("templates.db.sqlite", 1, 1); if ($templatedb_permissions eq 1){