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

Commit

Permalink
fix(IDNAConvert): switch to new library
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSchwarz-cnic committed Oct 18, 2018
1 parent 231bb55 commit 889746c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions backend/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
date_default_timezone_set('UTC');
require_once dirname(__FILE__).'/../../../../init.php';
require_once dirname(__FILE__).'/../vendor/autoload.php';
//idna_convert class name commonly used class name. The following is to avoid issues when it included in any other module
/*if (!class_exists('idna_convert')) {
require_once dirname(__FILE__).'/../vendor/idna_convert.class.php';
}*/
require_once dirname(__FILE__)."/helper.php"; //HELPER WHICH CONTAINS HELPER FUNCTIONS
use WHMCS\Database\Capsule;
use Mso\IdnaConvert\IdnaConvert;

//############################
//HELPER FUNCTIONS
Expand Down Expand Up @@ -233,7 +230,7 @@ function backorder_api_response($code, $info = "")
//CHECK THE DOMAIN SYNTAX
function backorder_api_check_syntax_domain($domain)
{
$IDN = new idna_convert();
$IDN = new IdnaConvert();
if (strlen($domain) > 223) {
return false;
}
Expand All @@ -248,7 +245,7 @@ function backorder_api_check_valid_tld($domain, $userid)
{
try {
$pdo = Capsule::connection()->getPdo();
$IDN = new idna_convert();
$IDN = new IdnaConvert();
$currencyid = null;

$stmt = $pdo->prepare("SELECT currency FROM tblclients WHERE id=?");
Expand Down

0 comments on commit 889746c

Please sign in to comment.