git subrepo clone https://github.com/mailcow/mailcow-dockerized.git mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "a832becb"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "a832becb"
git-subrepo: version: "0.4.3"
origin: "???"
commit: "???"
Change-Id: If5be2d621a211e164c9b6577adaa7884449f16b5
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/ajax/syncjob_logs.php b/mailcow/src/mailcow-dockerized/data/web/inc/ajax/syncjob_logs.php
new file mode 100644
index 0000000..9c521ae
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/ajax/syncjob_logs.php
@@ -0,0 +1,14 @@
+<?php
+require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
+header('Content-Type: text/plain');
+if (!isset($_SESSION['mailcow_cc_role'])) {
+ exit();
+}
+
+if (isset($_GET['id']) && is_numeric($_GET['id'])) {
+ if ($details = mailbox('get', 'syncjob_details', intval($_GET['id']))) {
+ echo (empty($details['log'])) ? '-' : $details['log'];
+ }
+}
+
+?>