Skip to content

Commit

Permalink
Merge branch 'xa81-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 18, 2024
2 parents 24839e7 + b0ed8dc commit 281ad61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions coremio/modules/Registrars/DomainNameAPI/DomainNameAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ public function domains($test = false) {
return $result;
}

public function domainsdt($pageNumber, $pageLength,$invalidation=0) {
public function domainsdt($pageNumber, $pageLength,$search,$invalidation=0) {
$this->set_credentials();
Helper::Load(["User"]);

Expand All @@ -1105,7 +1105,11 @@ public function domainsdt($pageNumber, $pageLength,$invalidation=0) {
'OrderDirection'=>'DESC',
];

$response = $this->rememberCache("domainsdt_" . $pageNumber . "_" . $pageLength, function () use ($listParams) {
if(strlen($search)>1){
$listParams['DomainName']=$search;
}

$response = $this->rememberCache("domainsdt_" . $pageNumber . "_" . $pageLength.'_'.md5($search), function () use ($listParams) {
return $this->api->GetList($listParams);
}, 180);

Expand Down
2 changes: 1 addition & 1 deletion coremio/modules/Registrars/DomainNameAPI/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [
'meta' => [
'name' => 'DomainNameAPI',
'version' => '1.9',
'version' => '1.10.2',
'logo' => 'logo.png',
],
'settings' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
$start = (int)Filter::POST("start");
$length = (int)Filter::POST("length");
$invalidation = (int)Filter::POST("invalidate");
$search = Filter::POST("search")['value'];

$pageLength = $length;
$pageNumber = $start / $pageLength;

$domains = $module->domainsdt($pageNumber, $pageLength, $invalidation);
$domains = $module->domainsdt($pageNumber, $pageLength,$search, $invalidation);

echo Utility::jencode([
'draw' => $draw,
Expand Down

0 comments on commit 281ad61

Please sign in to comment.