Add. Increment number-alias and MWI account number when generates multiple extensions. (#2078)

This commit is contained in:
Alexey Melnichuk
2016-11-17 21:46:25 +03:00
committed by FusionPBX
parent 232ed2857f
commit abba829aae

View File

@@ -241,7 +241,7 @@
break;
}
//add the extension to the database
//add the user to the database
$user_email = '';
if ($_SESSION["user"]["unique"]["text"] != "global") {
if ($autogen_users == "true") {
@@ -415,6 +415,17 @@
//increment the extension number
if ($action != "update") {
$extension++;
if (strlen($number_alias) > 0) {
$number_alias++;
}
if (strlen($mwi_account) > 0) {
$mwi_account_array = explode('@', $mwi_account);
$mwi_account_array[0]++;
$mwi_account = implode('@', $mwi_account_array);
unset($mwi_account_array);
}
}
}