Skip to content

Commit 303ae05

Browse files
committed
Ready for registration
1 parent 5c261fe commit 303ae05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

htdocs/captureserver/public/index.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@
102102

103103
print 'Capture server was called with action='.$action;
104104

105-
if ($action == 'dolibarrping') {
105+
if ($action == 'dolibarrping' || $action == 'dolibarrregistration') {
106106
$hash_algo = GETPOST('hash_algo', 'aZ09');
107107
$hash_unique_id = GETPOST('hash_unique_id', 'aZ09');
108108
$version = GETPOST('version', 'aZ09');
109109

110110
if (empty($hash_algo) || empty($hash_unique_id)) {
111111
print "\n".'<br>Bad value for parameter hash_algo or hash_unique_id';
112112
} else {
113-
$maxsize = getDolGlobalInt('CAPTURE_SERVER_MAX_SIZE_OF_CAPTURED_CONTENT', 1024);
113+
$maxsize = getDolGlobalInt('CAPTURE_SERVER_MAX_SIZE_OF_CAPTURED_CONTENT', 4096);
114114
if (is_array($_POST) && strlen(join('', $_POST)) > $maxsize) {
115115
$contenttoinsert = 'Content larger than limit of '.$maxsize;
116116
} else {
@@ -125,6 +125,7 @@
125125
$captureserver->comment = 'Ping received for update at '.dol_print_date(dol_now(), 'dayhourlog').' - from hash '.$hash_unique_id.' - version '.$version;
126126
$captureserver->content = $contenttoinsert;
127127
$captureserver->label = $action.' '.$hash_unique_id.' '.$version;
128+
128129
$captureserver->update($user);
129130

130131
// Send to DataDog (metric + event)

0 commit comments

Comments
 (0)