line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OTRS::OPM::Maker::Utils::OTRS4; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: helper functions for OTRS >= 4 |
4
|
|
|
|
|
|
|
|
5
|
29
|
|
|
29
|
|
249
|
use strict; |
|
29
|
|
|
|
|
79
|
|
|
29
|
|
|
|
|
919
|
|
6
|
29
|
|
|
29
|
|
168
|
use warnings; |
|
29
|
|
|
|
|
78
|
|
|
29
|
|
|
|
|
845
|
|
7
|
|
|
|
|
|
|
|
8
|
29
|
|
|
29
|
|
189
|
use List::Util qw(first); |
|
29
|
|
|
|
|
74
|
|
|
29
|
|
|
|
|
2067
|
|
9
|
29
|
|
|
29
|
|
189
|
use Carp; |
|
29
|
|
|
|
|
88
|
|
|
29
|
|
|
|
|
9745
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 1.43; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub packagesetup { |
14
|
19
|
|
|
19
|
1
|
75
|
my ($class, $type, $version, $function, $runtype, $package) = @_; |
15
|
|
|
|
|
|
|
|
16
|
19
|
100
|
|
|
|
62
|
$version = $version ? ' Version="' . $version . '"' : ''; |
17
|
|
|
|
|
|
|
|
18
|
19
|
|
100
|
|
|
87
|
$runtype //= 'post'; |
19
|
|
|
|
|
|
|
|
20
|
19
|
100
|
|
|
|
39
|
if ( $package ) { |
21
|
2
|
|
|
|
|
5
|
$package = sprintf "'%s'", $package; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
else { |
24
|
17
|
|
|
|
|
30
|
$package = '$Param{Structure}->{Name}->{Content}'; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
19
|
|
|
|
|
114
|
return qq~ <$type Type="$runtype"$version>
|
28
|
|
|
|
|
|
|
\$Kernel::OM->Get('var::packagesetup::' . $package )->$function(); |
29
|
|
|
|
|
|
|
]]>$type>~; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub filecheck { |
33
|
11
|
|
|
11
|
1
|
35
|
my ($class, $files) = @_; |
34
|
|
|
|
|
|
|
|
35
|
11
|
100
|
|
42
|
|
51
|
if ( first{ $_ =~ m{Kernel/Output/HTML/[^/]+/.*?\.dtl\z} }@{$files} ) { |
|
42
|
|
|
|
|
91
|
|
|
11
|
|
|
|
|
48
|
|
36
|
1
|
|
|
|
|
147
|
carp "The old template engine was replaced with Template::Toolkit. Please use bin/otrs.MigrateDTLToTT.pl.\n"; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
11
|
|
|
|
|
86
|
return 1; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |