summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-06-10 11:24:11 +0000
committerfukachan <fukachan>2001-06-10 11:24:11 +0000
commita33aab4318cb9db5b256bde58dde891a562aadfa (patch)
tree5940b92002d985235c9fc1b8f25aacaa6d9701fe
parent02dc1a35784121c632387121810b10100fb80d66 (diff)
downloadfml8-a33aab4318cb9db5b256bde58dde891a562aadfa.tar.gz
fml8-a33aab4318cb9db5b256bde58dde891a562aadfa.tar.bz2
fml8-a33aab4318cb9db5b256bde58dde891a562aadfa.zip
modify to use $ticket_driver. $ticket_driver is class name not model
name.
-rw-r--r--fml/etc/default_config.cf.ja6
-rw-r--r--fml/etc/defaults/tickets.cf.ja6
-rw-r--r--fml/lib/FML/Process/CGI.pm4
-rw-r--r--fml/lib/FML/Process/Distribute.pm4
-rw-r--r--fml/lib/FML/Process/TicketSystem.pm8
-rw-r--r--fml/lib/FML/Ticket/System.pm6
6 files changed, 23 insertions, 11 deletions
diff --git a/fml/etc/default_config.cf.ja b/fml/etc/default_config.cf.ja
index aec002d3..b31a3fb1 100644
--- a/fml/etc/default_config.cf.ja
+++ b/fml/etc/default_config.cf.ja
@@ -454,6 +454,12 @@ use_ticket = yes
# Examples:
ticket_model = minimal_states
+# Descriptions: チケットシステムのドライバ
+# History: fml 5.0 new
+# Value: string
+# Examples:
+ticket_driver = FML::Ticket::Model::minimal_states
+
# Descriptions: チケットにつけるML名
# 複数のMLにまたがったチケットを追跡するために
# 必要
diff --git a/fml/etc/defaults/tickets.cf.ja b/fml/etc/defaults/tickets.cf.ja
index 7bec078f..68d7713d 100644
--- a/fml/etc/defaults/tickets.cf.ja
+++ b/fml/etc/defaults/tickets.cf.ja
@@ -13,6 +13,12 @@ use_ticket = yes
# Examples:
ticket_model = minimal_states
+# Descriptions: チケットシステムのドライバ
+# History: fml 5.0 new
+# Value: string
+# Examples:
+ticket_driver = FML::Ticket::Model::minimal_states
+
# Descriptions: チケットにつけるML名
# 複数のMLにまたがったチケットを追跡するために
# 必要
diff --git a/fml/lib/FML/Process/CGI.pm b/fml/lib/FML/Process/CGI.pm
index 051ae55c..6a0044fa 100644
--- a/fml/lib/FML/Process/CGI.pm
+++ b/fml/lib/FML/Process/CGI.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: CGI.pm,v 1.12 2001/04/03 09:45:43 fukachan Exp $
+# $FML: CGI.pm,v 1.13 2001/05/28 16:17:13 fukachan Exp $
#
package FML::Process::CGI;
@@ -120,7 +120,7 @@ sub run
# model specific ticket object
if ($myname eq 'fmlticket.cgi') {
- my $module = 'FML::Ticket::Model::'.$config->{ ticket_model };
+ my $module = $config->{ ticket_driver };
my $ticket = $curproc->load_module($args, $module);
$ticket->mode({ mode => 'html' });
$ticket->run_cgi($curproc, $args);
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 21b53e9e..b1debe6b 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -4,7 +4,7 @@
# Copyright (C) 2000,2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.45 2001/05/19 03:30:37 fukachan Exp $
+# $FML: Distribute.pm,v 1.46 2001/05/30 14:35:09 fukachan Exp $
#
package FML::Process::Distribute;
@@ -319,7 +319,7 @@ sub _ticket_check
my ($curproc, $args) = @_;
my $config = $curproc->{ config };
my $model = $config->{ ticket_model };
- my $pkg = "FML::Ticket::Model::$model";
+ my $pkg = $config->{ ticket_driver };
# fake use() to do "use FML::Ticket::$model;"
eval qq{ require $pkg; $pkg->import();};
diff --git a/fml/lib/FML/Process/TicketSystem.pm b/fml/lib/FML/Process/TicketSystem.pm
index f69aaee2..ebee156d 100644
--- a/fml/lib/FML/Process/TicketSystem.pm
+++ b/fml/lib/FML/Process/TicketSystem.pm
@@ -4,7 +4,7 @@
# Copyright (C) 2000-2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: TicketSystem.pm,v 1.14 2001/04/03 09:45:44 fukachan Exp $
+# $FML: TicketSystem.pm,v 1.15 2001/05/30 04:03:22 fukachan Exp $
#
package FML::Process::TicketSystem;
@@ -29,8 +29,8 @@ FML::Process::TicketSystem -- primitive fml5 ticket system
use FML::Process::TicketSystem;
... snip ...
- use FML::Ticket::Model::toymodel;
- $ticket = FML::Ticket::Model::toymodel->new($curproc, $args);
+ use FML::Ticket::Model::minimal_states;
+ $ticket = FML::Ticket::Model::minimal_states->new($curproc, $args);
$ticket->$method($curproc, $args);
=head1 DESCRIPTION
@@ -83,7 +83,7 @@ sub run
my ($curproc, $args) = @_;
my $config = $curproc->{ config };
my $model = $config->{ ticket_model };
- my $pkg = "FML::Ticket::Model::". $model;
+ my $pkg = $config->{ ticket_driver };
my $argv = $args->{ ARGV };
my $command = $argv->[ 0 ] || 'list';
diff --git a/fml/lib/FML/Ticket/System.pm b/fml/lib/FML/Ticket/System.pm
index e5f3b597..a7888677 100644
--- a/fml/lib/FML/Ticket/System.pm
+++ b/fml/lib/FML/Ticket/System.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: System.pm,v 1.23 2001/04/08 13:25:39 fukachan Exp $
+# $FML: System.pm,v 1.24 2001/05/30 04:03:22 fukachan Exp $
#
package FML::Ticket::System;
@@ -22,8 +22,8 @@ FML::Ticket::System - ticket system core engine
=head1 SYNOPSIS
- use Ticket::Model::minimal_states;
- $ticket = new Ticket::Model::minimal_states;
+ use FML::Ticket::Model::minimal_states;
+ $ticket = new FML::Ticket::Model::minimal_states;
$ticket->assign($curproc, $args);
$ticket->update_cache($curproc, $args);