Skip to content

Commit 37e5852

Browse files
authored
Merge branch 'master' into INTGRTNS-426-WHMCS-Domain-Module-WHMCS-Admin-Home-fails-when-Openprovider-registrar-module-is-deactivated
2 parents 9d96a34 + 79767d0 commit 37e5852

329 files changed

Lines changed: 28748 additions & 6675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,68 @@
11
# Changelog
2+
3+
## v5.13.1
4+
5+
###### Features and improvements
6+
- Improved performance by adding global caching for TLD metadata to reduce repeated API calls.
7+
8+
## v5.13.0
9+
10+
###### Features and improvements
11+
- Added new contact additional data fields for `.ru` and `.рф` (xn--p1ai) for domain registration and transfer.
12+
- Upgraded `openprovider/rest-client-php` library to v2.2.1-beta.
13+
- Updated dependencies (incl. `guzzlehttp/guzzle`, `guzzlehttp/promises`, `guzzlehttp/psr7`, `phpunit/phpunit`, `webmozart/assert`, and Symfony polyfills).
14+
15+
## v5.12.1
16+
17+
###### Features and improvements
18+
- Added German language support for registrar module.
19+
20+
###### Bugfixes
21+
- Fixed: TypeError on DomainTransferSync cron due to PHPStan namespace collision with WHMCS's bundled vendor.
22+
23+
## v5.12.0
24+
25+
###### Features and improvements
26+
- Added .IN nexus declaration fields for all .IN TLD and SLD extensions, including IDN variants, with checkout validation for non-Indian registrants.
27+
- Upgraded openprovider/rest-client-php library to v2.2.0-beta.
28+
- Improved checkout contact creation support for TLDs requiring customer additional data, including more supported TLD extensions.
29+
30+
## v5.11.2
31+
32+
###### Features and improvements
33+
- Upgraded openprovider/rest-client-php library to v2.1.0-beta.
34+
- Updated dependencies (incl. guzzlehttp/promises).
35+
- Added support for latest Openprovider API updates.
36+
37+
## v5.11.1
38+
39+
###### Bugfixes
40+
- Fixed: TXT record values not displaying in DNS Management after page reload.
41+
42+
## v5.11.0
43+
44+
###### Features and improvements
45+
- Improved client area DNS management performance across all key operations, including faster save flows and page loading.
46+
- Removed multiple redundant API calls across client area pages, improving overall client area performance.
47+
48+
## v5.10.0
49+
50+
###### Features and improvements
51+
- Added a promotional admin dashboard widget to highlight Openprovider's Email and Premium DNS products.
52+
- Improved registration flow by displaying the IDN Script field only for actual IDN domains during registration.
53+
- Set the correct locale when creating and updating handles.
54+
55+
## v5.9.4
56+
57+
###### Features and improvements
58+
- Added support for deleting individual DNS records.
59+
- Introduced a dedicated DNSSEC management implementation and removed the dependency between DNS Management and DNSSEC Management client area buttons.
60+
61+
## v5.9.3
62+
63+
###### Bugfixes
64+
- Fixed: Duplicate handle creation when modifying contacts in the Admin Area.
65+
266
## v5.9.2
367

468
###### Features and improvements

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Domain Module for WHMCS 8.x
1+
# Domain Module for WHMCS
22

33
**If you notice any bugs or lack of functionality or
44
other problems, please report it to [Openprovider Support team](https://support.openprovider.eu/hc/en-us/articles/360001674667-Contact-Openprovider-Support) immediately with all available details (reseller_id, error details, [module logs](https://github.com/openprovider/Openprovider-WHMCS-domains/tree/version-8?tab=readme-ov-file#troubleshooting), WHMCS & PHP & web server version details and screenshot(s)/screen record if possible) so that we can rectify issues accordingly. The more details you can provide about issues, the faster we can reproduce and investigate it for a resolution. Your help in this regard is greatly appreciated!**

docs/DNSSEC_for_clients.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DNSSEC page for end users
22

3-
- Navigate to the **target client profile > domains** select the desired domain and under **Management Tools** activate **"DNS Management"**
4-
<img src="img/DNS Management.png" style="zoom: 67%;" />
3+
- Navigate to the **target client profile > domains** select the desired domain and enable **"DNSSEC Management"** checkbox.
4+
<img src="img/DNSSEC management checkbox.png" style="zoom: 67%;" />
55
- The below option will appear in the domain details page of the chosen domain
66

77
<img src="img/DNSSEC management.png" alt="Screenshot_20210203_183243" style="zoom: 67%;" />

docs/advanced_configurations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Advanced configurations can be found in the file `/modules/registrars/openprovid
1717
| useNewDnsManagerFeature | boolean: false | Set to true to enable the Openprovider [single domain DNS panel](https://support.openprovider.eu/hc/en-us/articles/360014539999-Single-Domain-DNS-panel) for your customers who you have given the right to edit DNS zones for their domain. |
1818
| useNewDnsManagerFeatureInNewWindow | boolean: true | When this option is enabled, the DNS Manager will open in a new window. This requires the "useNewDnsManagerFeature" configuration to be enabled. |
1919
| requestTrusteeService | array: ["ba","co.uk"] | Indicates which TLDs will automatically have the trustee option selected upon registration. |
20-
| idnumbermod | boolean: false | Indicates whether to use the [advanced additional data handling for .es and .pt domains](/docs/advanced_additional_data.md) |
20+
| idnumbermod | boolean: true | Indicates whether to enable [advanced customer additional data handling for .es, .pt, .se, .com.es, .nom.es, .edu.es, .org.es, .it and .fi domains](/docs/advanced_additional_data.md) |
2121

2222

2323

133 KB
Loading

lang/overrides/english.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,14 @@
3535
$_LANG['ptIdentificationVat'] = "NIPC (empresa)";
3636
$_LANG['ptIdentificationSocialSecurityNumber'] = "NIF (particular)";
3737
$_LANG['ptIdentificationCORI'] = 'Tipo de Contribuinte (VAT/TAX ID)';
38+
39+
$_LANG['itIdentificationCompany'] = 'Company Registration Number';
40+
$_LANG['itIdentificationSocialSecurityNumber'] = 'Individual Codice Fiscale';
41+
42+
$_LANG['seIdentificationCompany'] = 'Legal Entity';
43+
$_LANG['seIdentificationSocialSecurityNumber'] = 'Private individual';
44+
45+
$_LANG['fiIdentificationCompany'] = 'Company Registration Number';
46+
$_LANG['fiIdentificationPassport'] = 'Passport/ID number for Individuals';
47+
$_LANG['fiIdentificationSocialSecurityNumber'] = 'Social Security Number for Individuals';
48+
$_LANG['fiIdentificationBirthDate'] = 'Birthday for Foreign Private Individuals (YYYY-MM-DD)';

lang/overrides/german.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
$_LANG['dnssectabname'] = 'DNSSEC Verwaltung';
4+
5+
$_LANG['dnssec']['pagename'] = 'DNSSEC Einträge';
6+
$_LANG['dnssec']['tablename'] = 'DNSSEC Einträge verwalten';
7+
8+
$_LANG['dnssec']['activatednssecbutton'] = 'DNSSEC aktivieren';
9+
$_LANG['dnssec']['deactivatednssecbutton'] = 'DNSSEC deaktivieren';
10+
11+
12+
$_LANG['dnssec']['alertdnssecnotactivated'] = 'DNSSEC ist für diese Domain nicht aktiv.';
13+
$_LANG['dnssec']['alertdnssecactivated'] = 'DNSSEC ist auf dieser Domain aktiv. Wenn Sie DNSSEC deaktivieren, werden alle vorhandenen Schlüssel aus dieser Domain gelöscht.';
14+
15+
16+
$_LANG['dnssec']['tableheaderflags'] = 'Flags';
17+
$_LANG['dnssec']['tableheaderalgorithms'] = 'Algorithmus';
18+
$_LANG['dnssec']['tableheaderpublickeys'] = 'Öffentliche Schlüssel';
19+
$_LANG['dnssec']['tableheaderactions'] = 'Aktionen';
20+
21+
22+
$_LANG['dnssec']['tablebuttonactiondelete'] = 'Löschen';
23+
$_LANG['dnssec']['tablebuttonactionsave'] = 'Speichern';
24+
25+
$_LANG['dnssec']['buttonadddnssecrecord'] = 'Neuen DNSSEC-Eintrag hinzufügen';
26+
27+
$_LANG['esIdentificationType'] = 'Identifizierungstyp';
28+
$_LANG['esIdentificationNumber'] = "Unternehmens- oder Personen-ID";
29+
$_LANG['esIdentificationPassport'] = "Reisepass/Personen-ID";
30+
$_LANG['esIdentificationCompany'] = "Unternehmensregistrierungs-ID";
31+
$_LANG['esIdentificationCORI'] = "Unternehmens- oder Personen-ID";
32+
33+
$_LANG['ptIdentificationType'] = 'Steuertyp (Unternehmen / Privatperson)';
34+
$_LANG['ptIdentificationNumber'] = 'Steueridentifikationsnummer';
35+
$_LANG['ptIdentificationVat'] = "NIPC (Unternehmen)";
36+
$_LANG['ptIdentificationSocialSecurityNumber'] = "NIF (Privatperson)";
37+
$_LANG['ptIdentificationCORI'] = 'Steuernummer (Umsatzsteuer-/Steuer-ID)';

modules/registrars/openprovider/Controllers/Hooks/AdminWidgetController.php

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
namespace OpenProvider\WhmcsRegistrar\Controllers\Hooks;
33

44
use OpenProvider\WhmcsRegistrar\Controllers\Hooks\Widgets\BalanceWidget;
5+
use OpenProvider\WhmcsRegistrar\Controllers\Hooks\Widgets\CrossSellWidget;
6+
use WHMCS\Database\Capsule;
57

68
/**
79
* Class AdminWidgetController
@@ -37,6 +39,112 @@ private function cleanupLegacyBalanceWidget(): void
3739
null,
3840
null
3941
);
42+
public function showCrossSellWidget()
43+
{
44+
return new CrossSellWidget();
45+
}
46+
47+
public function handleCrossSellDismiss($vars)
48+
{
49+
$isAjaxDismiss = isset($_GET['op_crosssell_ajax']) && $_GET['op_crosssell_ajax'] === '1';
50+
51+
if (
52+
!isset($_GET['op_crosssell_action']) || $_GET['op_crosssell_action'] !== 'dismiss'
53+
|| !isset($_GET['crosssell_product'])
54+
) {
55+
return;
56+
}
57+
58+
if (!isset($_GET['token'])) {
59+
return;
60+
}
61+
62+
if (function_exists('\\verify_token')) {
63+
if (!\verify_token('link', $_GET['token'])) {
64+
return;
65+
}
66+
} elseif (function_exists('\\check_token')) {
67+
try {
68+
\check_token('WHMCS.admin.default', true);
69+
} catch (\Throwable $e) {
70+
return;
71+
}
72+
}
73+
74+
$product = (string) $_GET['crosssell_product'];
75+
$validProducts = array_keys(CrossSellWidget::PRODUCTS);
76+
77+
if (!in_array($product, $validProducts, true)) {
78+
if ($isAjaxDismiss) {
79+
header('Content-Type: application/json; charset=utf-8');
80+
http_response_code(400);
81+
echo json_encode(['status' => 'error', 'message' => 'Invalid product']);
82+
exit;
83+
}
84+
header('Location: index.php');
85+
exit;
86+
}
87+
88+
$moduleName = CrossSellWidget::PRODUCTS[$product]['module_name'];
89+
90+
CrossSellWidget::ensureDismissTableExists();
91+
92+
try {
93+
$existing = Capsule::table(CrossSellWidget::DISMISS_TABLE)
94+
->where('module_name', $moduleName)
95+
->first();
96+
97+
$now = date('Y-m-d H:i:s');
98+
99+
if ($existing) {
100+
Capsule::table(CrossSellWidget::DISMISS_TABLE)
101+
->where('module_name', $moduleName)
102+
->update([
103+
'dismissed' => 1,
104+
'updated_at' => $now,
105+
]);
106+
} else {
107+
Capsule::table(CrossSellWidget::DISMISS_TABLE)
108+
->insert([
109+
'module_name' => $moduleName,
110+
'dismissed' => 1,
111+
'created_at' => $now,
112+
'updated_at' => $now,
113+
]);
114+
}
115+
} catch (\Exception $e) {
116+
// Silent fail
117+
}
118+
119+
$this->invalidateCrossSellWidgetCache();
120+
121+
if ($isAjaxDismiss) {
122+
header('Content-Type: application/json; charset=utf-8');
123+
echo json_encode(['status' => 'ok']);
124+
exit;
125+
}
126+
127+
header('Location: index.php');
128+
exit;
129+
}
130+
131+
private function invalidateCrossSellWidgetCache()
132+
{
133+
try {
134+
$schema = Capsule::schema();
135+
if (!$schema->hasTable('tbltransientdata')) {
136+
return;
137+
}
138+
139+
Capsule::table('tbltransientdata')
140+
->where(function ($query) {
141+
$query->where('name', 'like', '%OPCrossSellWidget%')
142+
->orWhere('name', 'like', '%CrossSellWidget%')
143+
->orWhere('name', 'like', '%OpenProvider\\\\WhmcsRegistrar\\\\Controllers\\\\Hooks\\\\Widgets\\\\CrossSellWidget%');
144+
})
145+
->delete();
146+
} catch (\Throwable $e) {
147+
// Silent fail
40148
}
41149
}
42150
}

0 commit comments

Comments
 (0)