Multilingualified the Extensions app. Added ability to preset the new extension when the Copy button is clicked.
This commit is contained in:
@@ -35,13 +35,19 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//set the http get/post variable(s) to a php variable
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$extension_uuid = check_str($_REQUEST["id"]);
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//get the v_extensions data
|
||||
$extension_uuid = $_GET["id"];
|
||||
//set the http get/post variable(s) to a php variable
|
||||
if (isset($_REQUEST["id"]) && isset($_REQUEST["ext"])) {
|
||||
$extension_uuid = check_str($_REQUEST["id"]);
|
||||
$extension_new = check_str($_REQUEST["ext"]);
|
||||
}
|
||||
|
||||
//get the v_extensions data
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and extension_uuid = '$extension_uuid' ";
|
||||
@@ -110,11 +116,11 @@ else {
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$extension_uuid', ";
|
||||
$sql .= "'$extension', ";
|
||||
$sql .= "'$extension_new', "; // new extension
|
||||
$sql .= "'$password', ";
|
||||
$sql .= "'$provisioning_list', ";
|
||||
$sql .= "'#".generate_password(4, 1)."', ";
|
||||
$sql .= "'$extension', ";
|
||||
$sql .= "'', ";
|
||||
$sql .= "'$effective_caller_id_name', ";
|
||||
$sql .= "'$effective_caller_id_number', ";
|
||||
$sql .= "'$outbound_caller_id_name', ";
|
||||
@@ -135,14 +141,20 @@ else {
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//synchronize the xml config
|
||||
save_extension_xml();
|
||||
|
||||
//redirect the user
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=extensions.php\">\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Copy Complete\n";
|
||||
echo " <table width='40%'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <th align='left'>".$text['message-message']."</th>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td class='row_style1'><strong>".$text['message-copy']."</strong></td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " <br />\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user