line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Labyrinth::Inbox; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
4007
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
67
|
|
4
|
2
|
|
|
2
|
|
6
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
7
|
use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT @EXPORT_OK); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
168
|
|
7
|
|
|
|
|
|
|
$VERSION = '5.30'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Labyrinth::Inbox - Inbox Handler for Labyrinth |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Labyrinth::Inbox; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
MessageSend(%hash); |
18
|
|
|
|
|
|
|
MessageApproval($status,$messageid); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
The Inbox package contains generic functions used for Inbox and Message |
23
|
|
|
|
|
|
|
handling. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Currently the full functionality of this package is unused. It was originally |
26
|
|
|
|
|
|
|
developed to store updates for articles, news, events, etc that were submitted |
27
|
|
|
|
|
|
|
as part of the workflow process. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
At some point this will be reviewed and either deleted or reworked to better |
30
|
|
|
|
|
|
|
fit the workflow process. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 EXPORT |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
MessageSend |
35
|
|
|
|
|
|
|
MessageApproval |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# ------------------------------------- |
40
|
|
|
|
|
|
|
# Export Details |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
require Exporter; |
43
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
44
|
|
|
|
|
|
|
@EXPORT = ( qw( MessageSend MessageApproval ) ); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# ------------------------------------- |
47
|
|
|
|
|
|
|
# Library Modules |
48
|
|
|
|
|
|
|
|
49
|
2
|
|
|
2
|
|
72
|
use Labyrinth::Globals; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
use Labyrinth::DBUtils; |
51
|
|
|
|
|
|
|
use Labyrinth::Variables; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# ------------------------------------- |
54
|
|
|
|
|
|
|
# Variables |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# ------------------------------------- |
57
|
|
|
|
|
|
|
# The Subs |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 FUNCTIONS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=over 4 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item MessageSend(%hash) |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Hash table entries should contain: |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
my %hash = ( |
68
|
|
|
|
|
|
|
folder => $folder, |
69
|
|
|
|
|
|
|
area => $area, |
70
|
|
|
|
|
|
|
item => $item, |
71
|
|
|
|
|
|
|
title => $title, |
72
|
|
|
|
|
|
|
body => $body |
73
|
|
|
|
|
|
|
url => $url |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub MessageSend { |
79
|
|
|
|
|
|
|
my %hash = @_; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
$dbi->DoQuery('AddMessage', $hash{folder}, $hash{area}, |
82
|
|
|
|
|
|
|
$hash{item}, $hash{title}, |
83
|
|
|
|
|
|
|
$hash{body}, $hash{url}, |
84
|
|
|
|
|
|
|
formatDate(0), $tvars{loginid}); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=item MessageApproval($status,$messageid) |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Record informational messages to Inbox Log. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub MessageApproval { |
94
|
|
|
|
|
|
|
my ($status,$messageid) = @_; |
95
|
|
|
|
|
|
|
$tvars{status} = $status; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
my @rows = $dbi->GetQuery('hash','ReadMessage', $messageid); |
98
|
|
|
|
|
|
|
return unless(@rows); |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
my $action = $rows[0]->{area}.'::Approval'; |
101
|
|
|
|
|
|
|
$tvars{message} = $rows[0]; |
102
|
|
|
|
|
|
|
&$action; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
__END__ |