Skip to content

Commit

Permalink
Merge pull request #342 from Ubiquiti-App/feature/UCRM-6365-kmz-plugi…
Browse files Browse the repository at this point in the history
…n-fix-deprecated

UCRM 6365 - KMZ plugin - deprecated fix
  • Loading branch information
keksa authored Dec 4, 2024
2 parents 04a8754 + 1804f7d commit 50f38c9
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": "2.1.0"
Expand Down
Binary file modified plugins/kmz-map/kmz-map.zip
Binary file not shown.
9 changes: 3 additions & 6 deletions plugins/kmz-map/src/includes/config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Config

public static $LINK_TWO = null;

public static function initializeStaticProperties($config_path)
public static function initializeStaticProperties($config_path): void
{

// ## Setup user configuration settings, if they exist
Expand All @@ -26,16 +26,13 @@ public static function initializeStaticProperties($config_path)
$config_json = json_decode($config_string);

foreach ($config_json as $key => $value) {

// ## Expect specific key naming convention
$name = false;
$count = false;
if (strpos($key, 'REQUIRED_') !== false) {
$name = str_replace('REQUIRED_', '', $key);
$new_value = $value;
} elseif (strpos($key, 'HYPER_LINK_') !== false) {
$name = str_replace('HYPER_LINK_', '', $key);
$new_value = self::parseLink($value);
$new_value = self::parseLink((string) $value);
} elseif (strpos($key, 'OPTIONAL_') !== false) {
$name = str_replace('OPTIONAL_', '', $key);
$new_value = $value;
Expand All @@ -54,7 +51,7 @@ public static function initializeStaticProperties($config_path)
}
}

private static function parseLink($link_string)
private static function parseLink(string $link_string): array
{
return explode('|', $link_string, 2);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/kmz-map/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.1.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.2.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.3.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.4.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.5.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_3.0.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"displayName": "KMZ Map",
"description": "A UISP CRM plugin that provides a frontend Google Map for clients to view tower coverage.",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/kmz-map",
"version": "1.2.0",
"version": "1.2.1",
"unmsVersionCompliancy": {
"min": "1.0.0",
"max": null
Expand Down

0 comments on commit 50f38c9

Please sign in to comment.