3 Commits

Author SHA1 Message Date
Maurice Preuß
793b91b187 fix PHP 8.4 compatibility problems
Signed-off-by: Maurice Preuß <envoyr@froxlor.org>
2026-05-10 21:14:10 +02:00
563ecefe71 update domain create
Signed-off-by: envoyr <hello@envoyr.com>
2024-12-08 13:42:13 +01:00
66778ea7c4 fix search query
Signed-off-by: envoyr <hello@envoyr.com>
2024-12-08 13:30:02 +01:00
4 changed files with 18 additions and 11 deletions

View File

@@ -13,9 +13,9 @@ class Databases
public function create( public function create(
string $password, string $password,
string $description = null, ?string $description = null,
bool $mail = false, bool $mail = false,
string $suffix = null ?string $suffix = null
): array { ): array {
return $this->customer->server->request('Mysqls.add', [ return $this->customer->server->request('Mysqls.add', [
'customerid' => $this->customer->id, 'customerid' => $this->customer->id,

View File

@@ -11,14 +11,21 @@ class Domains
$this->customer = $customer; $this->customer = $customer;
} }
public function create(string $domain, bool $letsencrypt = false): array public function create(
string $domain,
bool $letsencrypt = false,
?string $description = null,
bool $isemaildomain = true,
bool $caneditdomain = true
): array
{ {
return $this->customer->server->request('Domains.add', [ return $this->customer->server->request('Domains.add', [
'customerid' => $this->customer->id, 'customerid' => $this->customer->id,
'domain' => $domain, 'domain' => $domain,
'letsencrypt' => $letsencrypt, 'letsencrypt' => $letsencrypt,
'isemaildomain' => true, 'isemaildomain' => $isemaildomain,
'caneditdomain' => true, 'caneditdomain' => $caneditdomain,
'description' => $description,
]); ]);
} }
@@ -26,7 +33,7 @@ class Domains
{ {
return $this->customer->server->request('Domains.listing', [ return $this->customer->server->request('Domains.listing', [
'sql_search' => [ 'sql_search' => [
'customerid' => [ 'c.customerid' => [
'op' => '=', 'op' => '=',
'value' => $this->customer->id, 'value' => $this->customer->id,
] ]

View File

@@ -11,7 +11,7 @@ class Emails
$this->customer = $customer; $this->customer = $customer;
} }
public function create(string $email_part, string $domain, string $description = null): array public function create(string $email_part, string $domain, ?string $description = null): array
{ {
return $this->customer->server->request('Emails.add', [ return $this->customer->server->request('Emails.add', [
'customerid' => $this->customer->id, 'customerid' => $this->customer->id,

View File

@@ -11,7 +11,7 @@ class Ftps
$this->customer = $customer; $this->customer = $customer;
} }
public function create(string $password, string $path = '/', string $description = null, bool $mail = false): array public function create(string $password, string $path = '/', ?string $description = null, bool $mail = false): array
{ {
return $this->customer->server->request('Ftps.add', [ return $this->customer->server->request('Ftps.add', [
'customerid' => $this->customer->id, 'customerid' => $this->customer->id,