Skip to content

Commit ffa8bad

Browse files
committed
Enhance module.json with wiki links and release settings; update MAC address handling in WorkerProvisioningServerPnP for better null safety.
1 parent 0f05e87 commit ffa8bad

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Build and Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
uses: mikopbx/.github-workflows/.github/workflows/extension-publish.yml@master
13+
with:
14+
initial_version: "1.62"
15+
secrets: inherit

Lib/WorkerProvisioningServerPnP.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public function getSettings($debug = false):void
5252

5353
$re = '/\w{2}:?\w{2}:?\w{2}:?\w{2}:?\w{2}:?\w{2}/m';
5454

55-
preg_match_all($re, strtolower(str_replace(':', '', $data->mac_white??'')), $this->mac_white, PREG_SET_ORDER);
55+
preg_match_all($re, strtolower(str_replace(':', '', $data->mac_white??'')), $this->mac_white??[], PREG_SET_ORDER);
5656
if (count($this->mac_white) > 0) {
5757
$this->mac_white = array_merge(...$this->mac_white);
5858
}
5959

60-
preg_match_all($re, strtolower(str_replace(':', '', $data->mac_black??'')), $this->mac_black, PREG_SET_ORDER);
60+
preg_match_all($re, strtolower(str_replace(':', '', $data->mac_black??'')), $this->mac_black??[], PREG_SET_ORDER);
6161
if (count($this->mac_black) > 0) {
6262
$this->mac_black = array_merge(...$this->mac_black);
6363
}

module.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,14 @@
33
"moduleUniqueID":"ModuleAutoprovision",
44
"support_email": "help@miko.ru",
55
"version": "%ModuleVersion%",
6-
"min_pbx_version": "2024.1.42"
6+
"min_pbx_version": "2024.1.42",
7+
"wiki_links": {
8+
"ru": {"https://wiki.mikopbx.com/module-autoprovision": "https://docs.mikopbx.com/mikopbx/modules/miko/module-autoprovision"},
9+
"en": {"https://wiki.mikopbx.com/module-autoprovision": "https://docs.mikopbx.com/mikopbx/english/modules/miko/module-autoprovision"}
10+
},
11+
"release_settings": {
12+
"publish_release": true,
13+
"changelog_enabled": true,
14+
"create_github_release": true
15+
}
716
}

0 commit comments

Comments
 (0)