-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.auto-set-agent-as-caller.php
executable file
·75 lines (65 loc) · 1.59 KB
/
module.auto-set-agent-as-caller.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
//
// iTop module definition file
//
// Git commit info
if (file_exists(dirname(__FILE__).'/.git/HEAD'))
{
$sDate = date("d.m.y G:i", filemtime(dirname(__FILE__).'/.git/index'));
$sHead = trim(preg_replace('/ref:/', '', file_get_contents(dirname(__FILE__).'/.git/HEAD'), -1, $iCount));
if ($iCount === 1)
{
$sCommit = '(commit '.file_get_contents(dirname(__FILE__).'/.git/'.$sHead, false, null, 0, 7).' from '.$sDate.')';
}
elseif ($iCount === 0)
{
$sCommit = '(commit '.substr($sHead, 0, 7).' from '.$sDate.')';
}
else
{
$sCommit = '(commit info not found)';
}
}
else
{
$sCommit = '';
}
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'auto-set-agent-as-caller/1.1.0',
array(
// Identification
//
'label' => "Auto set current Agent as ticket Caller $sCommit",
'category' => 'business',
// Setup
//
'dependencies' => array(
),
'mandatory' => false,
'visible' => true,
// Components
//
'datamodel' => array(
'main.auto-set-agent-as-caller.php',
),
'webservice' => array(
),
'data.struct' => array(
),
'data.sample' => array(
// add your sample data XML files here,
),
// Documentation
//
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
'doc.more_information' => '', // hyperlink to more information, if any
// Default settings
//
'settings' => array(
// 'true', 'false' or 'Incident, Problem, Contact, etc' and any other CI which contains 'org_id' attribute
'enabled' => 'Incident, UserRequest',
),
)
);
?>