瀏覽代碼

Update functions.php

FusionPBX 5 年之前
父節點
當前提交
4e5cbd488a
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      resources/functions.php

+ 6 - 1
resources/functions.php

@@ -1656,7 +1656,12 @@ function number_pad($number,$n) {
 				}
 			//add prefix
 				if (strlen($prefix) > 0) {
-					$prefix = $prefix.'?';
+					if (strlen($prefix) == 1) {
+						$prefix = $prefix.'?';
+					}
+					else {
+						$prefix = '(?:'.$prefix.')?';
+					}
 				}
 			//convert N,X,Z syntax to regex
 				$string = str_ireplace("N", "[2-9]", $string);