You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (empty($installedVersion) || empty($availableVersion)) {
58
-
logModuleCall('Openprovider', 'module version retrieval', "Failed to retrieve openprovider version", null, null, null);
59
-
}
60
-
61
-
$versionResult = "";
62
-
63
-
// Compare versions
64
-
if (version_compare($availableVersion, $installedVersion, '>')) {
65
-
$versionResult = "<a href=\"https://github.com/openprovider/Openprovider-WHMCS-domains/releases/tag/$availableVersion\" target=\"_blank\" style=\"color:red;\">Update to version $availableVersion</a>";
66
-
} else {
67
-
$versionResult = "<span style=\"color:green;\">Module is up to date {$availableVersion}</span>";
68
-
}
69
-
70
34
$command = 'GetRegistrars';
71
35
$postData = array();
72
36
$results = localAPI($command, $postData);
@@ -107,12 +71,14 @@ public function getData()
107
71
if (isset($messages['results'])) {
108
72
foreach ($messages['results'] as$message) {
109
73
$html .= "<div class=\"row\">
110
-
<div class=\"col-sm-12\">" . $message['html'] . "
111
-
</div>
112
-
</div>";
74
+
<div class=\"col-sm-12\">" . $message['html'] . "
75
+
</div>
76
+
</div>";
113
77
}
114
78
}
115
79
80
+
$versionResult = $this->getModuleVersionStatus();
81
+
116
82
return [
117
83
'balance' => $balance,
118
84
'reservedBalance' => $reservedBalance,
@@ -125,20 +91,93 @@ public function getData()
125
91
return ['error' => "The Openprovider module could not be found, please ensure that you have <a href='https://support.openprovider.eu/hc/en-us/articles/360012991620-Install-and-configure-Openprovider-module-in-WHMCS-8-X'>installed and activated the Openprovider domain registrar module</a>"];
if (empty($installedVersion) || empty($availableVersion)) {
138
+
logModuleCall('OpenProvider NL', 'module version retrieval', "Failed to retrieve openprovider version", null, null, null);
139
+
return$versionResult;
140
+
}
141
+
142
+
// Compare versions
143
+
if (version_compare($availableVersion, $installedVersion, '>')) {
144
+
$versionResult = "<a href=\"https://github.com/openprovider/Openprovider-WHMCS-domains/releases/tag/$availableVersion\" target=\"_blank\" style=\"color:red;\">Update to version $availableVersion</a>";
145
+
} else {
146
+
$versionResult = "<span style=\"color:green;\">Module is up to date {$availableVersion}</span>";
0 commit comments