summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Ticket/System.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-01-26 13:12:08 +0000
committerfukachan <fukachan>2001-01-26 13:12:08 +0000
commit01827dfe614436f942f176119ce6f8ffe8d8a0a3 (patch)
treeb67389d185936ed40bdd996e7202fc4c9964ac71 /fml/lib/FML/Ticket/System.pm
parent8c72d379c06bc5a072c42d6be5aa74695dfe6c01 (diff)
downloadfml8-01827dfe614436f942f176119ce6f8ffe8d8a0a3.tar.gz
fml8-01827dfe614436f942f176119ce6f8ffe8d8a0a3.tar.bz2
fml8-01827dfe614436f942f176119ce6f8ffe8d8a0a3.zip
clean up ticket system codes
use DB not text-emulated-db
Diffstat (limited to 'fml/lib/FML/Ticket/System.pm')
-rw-r--r--fml/lib/FML/Ticket/System.pm38
1 files changed, 23 insertions, 15 deletions
diff --git a/fml/lib/FML/Ticket/System.pm b/fml/lib/FML/Ticket/System.pm
index 4292e5bd..d9e4dc93 100644
--- a/fml/lib/FML/Ticket/System.pm
+++ b/fml/lib/FML/Ticket/System.pm
@@ -58,26 +58,18 @@ sub _pcb_get_id
}
-sub _update_cache_init
+sub _init_ticket_db_dir
{
my ($self, $curproc, $args) = @_;
my $config = $curproc->{ config };
my $ml_name = $config->{ ml_name };
- my $db_dir = $config->{ ticket_db_dir } ."/". $ml_name;
-
- unless (-d $db_dir) {
- use FML::Utils qw(mkdirhier);
- mkdirhier($db_dir, $config->{ default_directory_mode }) || do {
- $self->error_reason( FML::Utils->error() );
- return undef;
- };
- }
- if (defined $self->{ _cache_file }) {
- my $cache_file = $self->{ _cache_file };
- unless (-f $cache_file) {
- use FML::Utils qw(touch);
- touch($cache_file) || do {
+ if (defined $self->{ _db_dir }) {
+ my $db_dir = $self->{ _db_dir };
+ unless (-d $db_dir) {
+ use FML::Utils qw(mkdirhier);
+ mkdirhier($db_dir, $config->{ default_directory_mode }) || do {
+ $self->error_reason( FML::Utils->error() );
return undef;
};
}
@@ -87,6 +79,22 @@ sub _update_cache_init
}
+sub _quote_space
+{
+ my ($id) = @_;
+ $id =~ s/\s/_/g;
+ return $id;
+}
+
+
+sub _dequote_space
+{
+ my ($id) = @_;
+ $id =~ s/_/ /g;
+ return $id;
+}
+
+
sub AUTOLOAD
{
my ($self) = @_;