Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-viewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo M KALINOWSKI <eduardo@kalinowski.com.br>2022-06-06 23:59:18 +0300
committerEduardo M KALINOWSKI <eduardo@kalinowski.com.br>2022-06-07 00:12:05 +0300
commit11c26cd58f2619f02210cb34faceb39012717d5c (patch)
tree4f9a5431f5996c7285c8518cb2e22d2c3522085c /dmarcts-report-viewer-report-data.php
parent90feb3a7b65b840285f0fb7ec46ff47e6480d8ec (diff)
Adjust queries so they work on PostgreSQL
Diffstat (limited to 'dmarcts-report-viewer-report-data.php')
-rw-r--r--dmarcts-report-viewer-report-data.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/dmarcts-report-viewer-report-data.php b/dmarcts-report-viewer-report-data.php
index f60fc6a..09ea80e 100644
--- a/dmarcts-report-viewer-report-data.php
+++ b/dmarcts-report-viewer-report-data.php
@@ -96,6 +96,7 @@ function tmpl_reportData($reportnumber, $reports, $host_lookup = 1) {
$reportdata[] = " </thead>";
$reportdata[] = " <tbody>";
+ global $dbtype;
global $dbh;
$sql = "
@@ -138,6 +139,9 @@ ORDER BY
if ( $row['ip'] ) {
$ip = long2ip($row['ip']);
} elseif ( $row['ip6'] ) {
+ if ( $dbtype == 'pgsql') {
+ $row['ip6'] = stream_get_contents($row['ip6']);
+ }
$ip = inet_ntop($row['ip6']);
} else {
$ip = "-";