Browse Source

fix warnings on Add page

Signed-off-by: r4sas <r4sas@i2pmail.org>
master
R4SAS 2 years ago
parent
commit
c43451e7d0
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 6
      views/add.php

6
views/add.php

@ -170,10 +170,10 @@ if (isset($_POST["record"]) && !empty($_POST["record"])) { @@ -170,10 +170,10 @@ if (isset($_POST["record"]) && !empty($_POST["record"])) {
$STH = $pdo->query("SELECT `host`, `base32`, `base64`, `initial`, `disabled` FROM `hosts` WHERE `host` = '" . $domain . "' LIMIT 1");
$row = $STH->fetch(PDO::FETCH_ASSOC);
if(count($row) && !$row['disabled']) {
if($row && !$row['disabled']) {
$result["error"] = "Error while validating: That domain is already registered.";
} else if(count($row) && $row['disabled'] && $row['initial']) {
} else if($row && $row['disabled'] && $row['initial']) {
$result["error"] = "Error while validating: That domain is reserved and can't be re-registered automatically. Please contact service support team.";
} else {
@ -185,7 +185,7 @@ if (isset($_POST["record"]) && !empty($_POST["record"])) { @@ -185,7 +185,7 @@ if (isset($_POST["record"]) && !empty($_POST["record"])) {
} else {
$result["reregister"] = false;
if(count($row) && $row['disabled']) { /* processing disabled domain */
if($row && $row['disabled']) { /* processing disabled domain */
$log = "[" . date("d-M-Y H:i:s e") . "] Re-registering attempt for " . $row['host'] . "! Next records will be deleted:" . PHP_EOL;
/* print all records, which will be deleted*/

Loading…
Cancel
Save