Commit fc886e65 authored by Franco Fichtner's avatar Franco Fichtner

dyndns: minor tweaks+note that ipv6 missing from widget

parent 1f3e5b1d
......@@ -151,7 +151,7 @@ $main_buttons = array(
}
echo htmlspecialchars($cached_ip);
echo "</font>";
} elseif (file_exists($filename_v6)) {
} elseif (file_exists($filename_v6) && !empty($dyndns['enable'])) {
$ipv6addr = get_interface_ipv6($dyndns['interface']);
$cached_ipv6_s = explode("|", file_get_contents($filename_v6));
$cached_ipv6 = $cached_ipv6_s[0];
......@@ -163,7 +163,7 @@ $main_buttons = array(
echo htmlspecialchars($cached_ipv6);
echo "</font>";
} else {
echo "N/A";
echo gettext('N/A');
}?>
</td>
<td><?=$dyndns['descr'];?></td>
......
......@@ -53,7 +53,7 @@ if ($_REQUEST['getdyndnsstatus']) {
}
$filename = "/conf/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
if (file_exists($filename)) {
if (file_exists($filename) && !empty($dyndns['enable'])) {
$ipaddr = dyndnsCheckIP($dyndns['interface']);
$cached_ip_s = preg_split('/:/', file_get_contents($filename));
$cached_ip = $cached_ip_s[0];
......@@ -64,8 +64,9 @@ if ($_REQUEST['getdyndnsstatus']) {
}
echo htmlspecialchars($cached_ip);
echo "</font>";
/* XXX IPv6 missing */
} else {
echo gettext("N/A ") . date("H:i:s");
echo '<span class="text-muted">' . gettext('N/A') . '</span>';
}
}
exit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment