Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
fix(aftermarket domains): patched issue with incorrectly displaying a…
Browse files Browse the repository at this point in the history
…nd handling .us cases
  • Loading branch information
KaiSchwarz-cnic committed Sep 14, 2022
1 parent 6f27cc8 commit fcccba5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/addons/ispapidomaincheck/lib/Client/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,13 @@ public function checkdomains($vars, $smarty)
//further handling of specific cases on client-sides
if (
!empty($rs["PREMIUMCHANNEL"][$idx]) //e.g. AFTERNIC, SEDO
&& preg_match("/not available/i", $descr) //taken ones -> aftermarket
&& preg_match("/not available/i", $row["API"]["DESCR"]) //taken ones -> aftermarket
&& isset($rs["PRICE"], $rs["CURRENCY"])
&& !empty($rs["PRICE"][$idx])
) {
$row["statusText"] = SearchResult::STATUS_NOT_REGISTERED;
$row["status"] = "AVAILABLE";
$row["REASON"] = "AFTERMARKET";
// $row["status"] = "AFTERMARKET";
$price = $rs["PRICE"][$idx];
$currency = $rs["CURRENCY"][$idx];
$currencies = DCHelper::getCurrencies();
Expand Down Expand Up @@ -219,6 +218,10 @@ public function checkdomains($vars, $smarty)
}
foreach ($keys as &$key) {
if (!empty($rs[$key][$idx])) {
// DON'T OVERWRITE THE REASON FOR AFTERMARKET DOMAINS
if ($key === "REASON" && $row[$key] === "AFTERMARKET") {
continue;
}
$row[$key] = $rs[$key][$idx];
}
}
Expand Down

0 comments on commit fcccba5

Please sign in to comment.