Skip to content
Permalink
Browse files

Merge pull request #387 from aj-gh/server-fix-ip-address-display

Fix display of IP addresses in server module; fix binary IP handling in MasterForm
  • Loading branch information...
M4LuZ committed Feb 21, 2019
2 parents 0754a13 + e66aa78 commit fbf4fddc5076683f84baeb906c62c546501581cb
Showing with 19 additions and 3 deletions.
  1. +5 −1 inc/Classes/MasterForm.php
  2. +1 −1 modules/server/search.inc.php
  3. +13 −1 modules/server/show_details.php
@@ -506,7 +506,11 @@ public function SendForm($BaseURL, $table, $idname = '', $id = 0)
$db_query = '';
if ($this->SQLFields) {
foreach ($this->SQLFields as $val) {
$db_query .= ", $val";
if ($SQLFieldTypes[$val] == 'varbinary(16)' and $val == 'ip') {
$db_query .= ', INET6_NTOA('.$val.') AS '.$val;
} else {
$db_query .= ", $val";
}
}
}
@@ -13,7 +13,7 @@
$ms2->AddSelect('u.userid');
$ms2->AddResultField(t('Name'), 's.caption');
$ms2->AddResultField(t('Servertyp'), 's.type', 'ServerType');
$ms2->AddResultField(t('IP-Adresse / Domain'), 's.ip');
$ms2->AddResultField(t('IP-Adresse / Domain'), 'INET6_NTOA(s.ip) AS ip');
$ms2->AddResultField(t('Port'), 's.port');
$ms2->AddResultField(t('Besitzer'), 'u.username', 'UserNameAndIcon');
$ms2->AddResultField('PW', 's.pw', 'PWIcon');
@@ -3,7 +3,19 @@
$server = $db->qry_first("
SELECT
a.*,
a.serverid,
a.owner,
a.caption,
a.text,
INET6_NTOA(a.ip) AS ip,
a.mac,
a.port,
a.os,
a.cpu,
a.ram,
a.hdd,
a.type,
a.pw,
b.userid,
b.username
FROM %prefix%server AS a

0 comments on commit fbf4fdd

Please sign in to comment.
You can’t perform that action at this time.