summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-01-26 09:23:48 +0000
committerfukachan <fukachan>2001-01-26 09:23:48 +0000
commitafd434d9b32eeac12bfb71f46a33181a2e55cbd4 (patch)
tree69a7bfaa7dca91c1df8e31c897e7f9a32e198a61 /fml
parent2048635b41135e6fc212b18f1def2d695e71d138 (diff)
downloadfml8-afd434d9b32eeac12bfb71f46a33181a2e55cbd4.tar.gz
fml8-afd434d9b32eeac12bfb71f46a33181a2e55cbd4.tar.bz2
fml8-afd434d9b32eeac12bfb71f46a33181a2e55cbd4.zip
define get_ticket_list()
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Ticket/Model/toymodel.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/fml/lib/FML/Ticket/Model/toymodel.pm b/fml/lib/FML/Ticket/Model/toymodel.pm
index 1b400eb9..e486a76a 100644
--- a/fml/lib/FML/Ticket/Model/toymodel.pm
+++ b/fml/lib/FML/Ticket/Model/toymodel.pm
@@ -178,6 +178,33 @@ sub _dequote_space
}
+sub get_ticket_list
+{
+ my ($self, $header, $config) = @_;
+ my (%db, $k, $v);
+
+ # %db: $article_id => "$ticket_id $unixtime"
+ use Tie::LogFileDB;
+ my $cache_file = $self->{ _cache_file };
+ tie %db, 'Tie::LogFileDB', { file => $cache_file };
+
+ my (@open_list) = ();
+ my (@closed_list) = ();
+ while(($k, $v) = each %db) {
+ if ($v =~ /closed\s+/o) {
+ push(@closed_list, $v);
+ }
+ else {
+ push(@open_list, $v);
+ }
+ }
+
+ untie %db;
+
+ return (\@open_list, \@closed_list);
+}
+
+
=head1 NAME
FML::__HERE_IS_YOUR_MODULE_NAME__.pm - what is this