mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Change device_provision_enable to device_enabled to make it consistent with the rest of the fields that are used for to enable and disable something.
This commit is contained in:
@@ -240,8 +240,8 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "device_provision_enable";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "phone_provision_enable";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "device_enabled";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "device_provision_enable";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
|
||||
@@ -1139,17 +1139,17 @@ $text['label-device_setting_description']['de-at'] = "Beschreibung";
|
||||
$text['label-device_setting_description']['ar-eg'] = "";
|
||||
$text['label-device_setting_description']['he'] = "תאור";
|
||||
|
||||
$text['label-device_provision_enable']['en-us'] = "Enabled";
|
||||
$text['label-device_provision_enable']['es-cl'] = "Activado";
|
||||
$text['label-device_provision_enable']['pt-pt'] = "Activado";
|
||||
$text['label-device_provision_enable']['fr-fr'] = "Actif";
|
||||
$text['label-device_provision_enable']['pt-br'] = "Ativado";
|
||||
$text['label-device_provision_enable']['pl'] = "Włączony";
|
||||
$text['label-device_provision_enable']['uk'] = "";
|
||||
$text['label-device_provision_enable']['sv-se'] = "Aktiverad";
|
||||
$text['label-device_provision_enable']['de-at'] = "Ein";
|
||||
$text['label-device_provision_enable']['ar-eg'] = "";
|
||||
$text['label-device_provision_enable']['he'] = "מופעל";
|
||||
$text['label-device_enabled']['en-us'] = "Enabled";
|
||||
$text['label-device_enabled']['es-cl'] = "Activado";
|
||||
$text['label-device_enabled']['pt-pt'] = "Activado";
|
||||
$text['label-device_enabled']['fr-fr'] = "Actif";
|
||||
$text['label-device_enabled']['pt-br'] = "Ativado";
|
||||
$text['label-device_enabled']['pl'] = "Włączony";
|
||||
$text['label-device_enabled']['uk'] = "";
|
||||
$text['label-device_enabled']['sv-se'] = "Aktiverad";
|
||||
$text['label-device_enabled']['de-at'] = "Ein";
|
||||
$text['label-device_enabled']['ar-eg'] = "";
|
||||
$text['label-device_enabled']['he'] = "מופעל";
|
||||
|
||||
$text['label-device_password']['en-us'] = "Password";
|
||||
$text['label-device_password']['es-cl'] = "Contraseña";
|
||||
@@ -2124,18 +2124,18 @@ $text['description-device_template']['de-at'] = "Wählen Sie eine Vorlage.";
|
||||
$text['description-device_template']['ar-eg'] = "";
|
||||
$text['description-device_template']['he'] = "בחר תבנית";
|
||||
|
||||
$text['description-device_provision_enable']['en-us'] = "Enable or disable provisioning for this device.";
|
||||
$text['description-device_provision_enable']['es-cl'] = "Active o desactive el provisionamiento para este dispositivo.";
|
||||
$text['description-device_provision_enable']['pt-pt'] = "Active ou Desactive o aprovisionamento para este dispositivo.";
|
||||
$text['description-device_provision_enable']['fr-fr'] = "";
|
||||
$text['description-device_provision_enable']['pt-br'] = "Ative ou desative o provisionamento para este dispositivo";
|
||||
$text['description-device_provision_enable']['pl'] = "Włącz lub wyłącz automatyczna konfiguracje tego urządzenia";
|
||||
$text['description-device_provision_enable']['uk'] = "";
|
||||
$text['description-device_provision_enable']['sv-se'] = "Aktivera eller av-aktivera provisionerna för denna enhet.";
|
||||
$text['description-device_provision_enable']['ro'] = "";
|
||||
$text['description-device_provision_enable']['de-at'] = "Bereitstellung ein oder ausschalten.";
|
||||
$text['description-device_provision_enable']['ar-eg'] = "";
|
||||
$text['description-device_provision_enable']['he'] = "";
|
||||
$text['description-device_enabled']['en-us'] = "Enable or disable provisioning for this device.";
|
||||
$text['description-device_enabled']['es-cl'] = "Active o desactive el provisionamiento para este dispositivo.";
|
||||
$text['description-device_enabled']['pt-pt'] = "Active ou Desactive o aprovisionamento para este dispositivo.";
|
||||
$text['description-device_enabled']['fr-fr'] = "";
|
||||
$text['description-device_enabled']['pt-br'] = "Ative ou desative o provisionamento para este dispositivo";
|
||||
$text['description-device_enabled']['pl'] = "Włącz lub wyłącz automatyczna konfiguracje tego urządzenia";
|
||||
$text['description-device_enabled']['uk'] = "";
|
||||
$text['description-device_enabled']['sv-se'] = "Aktivera eller av-aktivera provisionerna för denna enhet.";
|
||||
$text['description-device_enabled']['ro'] = "";
|
||||
$text['description-device_enabled']['de-at'] = "Bereitstellung ein oder ausschalten.";
|
||||
$text['description-device_enabled']['ar-eg'] = "";
|
||||
$text['description-device_enabled']['he'] = "";
|
||||
|
||||
$text['description-device_model']['en-us'] = "Enter the model name or number.";
|
||||
$text['description-device_model']['es-cl'] = "Ingrese el nombre o número de modelo";
|
||||
|
||||
@@ -152,7 +152,7 @@ require_once "resources/require.php";
|
||||
$device_uuid_alternate = check_str($_POST["device_uuid_alternate"]);
|
||||
$device_model = check_str($_POST["device_model"]);
|
||||
$device_firmware_version = check_str($_POST["device_firmware_version"]);
|
||||
$device_provision_enable = check_str($_POST["device_provision_enable"]);
|
||||
$device_enabled = check_str($_POST["device_enabled"]);
|
||||
$device_template = check_str($_POST["device_template"]);
|
||||
$device_description = check_str($_POST["device_description"]);
|
||||
//lines
|
||||
@@ -197,7 +197,7 @@ require_once "resources/require.php";
|
||||
//if (strlen($device_vendor) == 0) { $msg .= "Please provide: Vendor<br>\n"; }
|
||||
//if (strlen($device_model) == 0) { $msg .= "Please provide: Model<br>\n"; }
|
||||
//if (strlen($device_firmware_version) == 0) { $msg .= "Please provide: Firmware Version<br>\n"; }
|
||||
//if (strlen($device_provision_enable) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
|
||||
//if (strlen($device_enabled) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
|
||||
//if (strlen($device_template) == 0) { $msg .= "Please provide: Template<br>\n"; }
|
||||
//if (strlen($device_username) == 0) { $msg .= "Please provide: Username<br>\n"; }
|
||||
//if (strlen($device_password) == 0) { $msg .= "Please provide: Password<br>\n"; }
|
||||
@@ -349,7 +349,7 @@ require_once "resources/require.php";
|
||||
$device_uuid_alternate = $row["device_uuid_alternate"];
|
||||
$device_model = $row["device_model"];
|
||||
$device_firmware_version = $row["device_firmware_version"];
|
||||
$device_provision_enable = $row["device_provision_enable"];
|
||||
$device_enabled = $row["device_enabled"];
|
||||
$device_template = $row["device_template"];
|
||||
$device_profile_uuid = $row["device_profile_uuid"];
|
||||
$device_description = $row["device_description"];
|
||||
@@ -1449,17 +1449,17 @@ require_once "resources/require.php";
|
||||
if (permission_exists('device_enable')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-device_provision_enable']."\n";
|
||||
echo " ".$text['label-device_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='device_provision_enable'>\n";
|
||||
if ($device_provision_enable == "true" || strlen($device_provision_enable) == 0) {
|
||||
echo " <select class='formfld' name='device_enabled'>\n";
|
||||
if ($device_enabled == "true" || strlen($device_enabled) == 0) {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($device_provision_enable == "false") {
|
||||
if ($device_enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
@@ -1467,7 +1467,7 @@ require_once "resources/require.php";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-device_provision_enable']."\n";
|
||||
echo $text['description-device_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ else {
|
||||
$sql .= " d.device_mac_address like '%".$search."%' ";
|
||||
$sql .= " or d.device_label like '%".$search."%' ";
|
||||
$sql .= " or d.device_vendor like '%".$search."%' ";
|
||||
$sql .= " or d.device_provision_enable like '%".$search."%' ";
|
||||
$sql .= " or d.device_enabled like '%".$search."%' ";
|
||||
$sql .= " or d.device_template like '%".$search."%' ";
|
||||
$sql .= " or d.device_description like '%".$search."%' ";
|
||||
$sql .= ") ";
|
||||
@@ -131,7 +131,7 @@ else {
|
||||
$sql .= " d.device_mac_address like '%".$search."%' ";
|
||||
$sql .= " or d.device_label like '%".$search."%' ";
|
||||
$sql .= " or d.device_vendor like '%".$search."%' ";
|
||||
$sql .= " or d.device_provision_enable like '%".$search."%' ";
|
||||
$sql .= " or d.device_enabled like '%".$search."%' ";
|
||||
$sql .= " or d.device_template like '%".$search."%' ";
|
||||
$sql .= " or d.device_description like '%".$search."%' ";
|
||||
$sql .= ") ";
|
||||
@@ -202,7 +202,7 @@ else {
|
||||
}
|
||||
echo th_order_by('device_vendor', $text['label-device_vendor'], $order_by, $order);
|
||||
echo th_order_by('device_template', $text['label-device_template'], $order_by, $order);
|
||||
echo th_order_by('device_provision_enable', $text['label-device_provision_enable'], $order_by, $order);
|
||||
echo th_order_by('device_enabled', $text['label-device_enabled'], $order_by, $order);
|
||||
echo th_order_by('device_description', $text['label-device_description'], $order_by, $order);
|
||||
echo "<td class='list_control_icons'>\n";
|
||||
if (permission_exists('device_add')) {
|
||||
@@ -236,7 +236,7 @@ else {
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_vendor']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_template']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['device_provision_enable']]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['device_enabled']]." </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg'>".$row['device_description']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('device_edit')) {
|
||||
|
||||
@@ -240,7 +240,7 @@ else {
|
||||
$sql_insert .= "domain_uuid, ";
|
||||
$sql_insert .= "device_mac_address, ";
|
||||
$sql_insert .= "device_template, ";
|
||||
$sql_insert .= "device_provision_enable ";
|
||||
$sql_insert .= "device_enabled ";
|
||||
$sql_insert .= ") ";
|
||||
$sql_insert .= "values ";
|
||||
$sql_insert .= "(";
|
||||
|
||||
@@ -232,7 +232,7 @@ include "root.php";
|
||||
}
|
||||
$device_model = $row["device_model"];
|
||||
$device_firmware_version = $row["device_firmware_version"];
|
||||
$device_provision_enable = $row["device_provision_enable"];
|
||||
$device_enabled = $row["device_enabled"];
|
||||
$device_template = $row["device_template"];
|
||||
$device_profile_uuid = $row["device_profile_uuid"];
|
||||
$device_description = $row["device_description"];
|
||||
@@ -253,7 +253,7 @@ include "root.php";
|
||||
$device_vendor = strtolower($row["device_vendor"]);
|
||||
$device_model = $row["device_model"];
|
||||
$device_firmware_version = $row["device_firmware_version"];
|
||||
$device_provision_enable = $row["device_provision_enable"];
|
||||
$device_enabled = $row["device_enabled"];
|
||||
$device_template = $row["device_template"];
|
||||
$device_profile_uuid = $row["device_profile_uuid"];
|
||||
$device_description = $row["device_description"];
|
||||
@@ -312,7 +312,7 @@ include "root.php";
|
||||
$sql .= "device_mac_address, ";
|
||||
$sql .= "device_vendor, ";
|
||||
$sql .= "device_model, ";
|
||||
$sql .= "device_provision_enable, ";
|
||||
$sql .= "device_enabled, ";
|
||||
$sql .= "device_template, ";
|
||||
$sql .= "device_description ";
|
||||
$sql .= ") ";
|
||||
@@ -366,7 +366,7 @@ include "root.php";
|
||||
$row = $prep_statement_4->fetch();
|
||||
$device_label = $row["device_label"];
|
||||
$device_firmware_version = $row["device_firmware_version"];
|
||||
$device_provision_enable = $row["device_provision_enable"];
|
||||
$device_enabled = $row["device_enabled"];
|
||||
//keep the original template
|
||||
$device_profile_uuid = $row["device_profile_uuid"];
|
||||
$device_description = $row["device_description"];
|
||||
@@ -956,7 +956,7 @@ include "root.php";
|
||||
$device_vendor = strtolower($row["device_vendor"]);
|
||||
$device_model = $row["device_model"];
|
||||
$device_firmware_version = $row["device_firmware_version"];
|
||||
$device_provision_enable = $row["device_provision_enable"];
|
||||
$device_enabled = $row["device_enabled"];
|
||||
$device_template = $row["device_template"];
|
||||
$device_username = $row["device_username"];
|
||||
$device_password = $row["device_password"];
|
||||
|
||||
@@ -120,16 +120,16 @@
|
||||
$stats['system']['devices']['disabled'] = 0;
|
||||
$stats['domain']['devices']['total'] = 0;
|
||||
$stats['domain']['devices']['disabled'] = 0;
|
||||
$sql = "select domain_uuid, device_provision_enabled from v_devices";
|
||||
$sql = "select domain_uuid, device_enabled from v_devices";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$stats['system']['devices']['total'] = count($result);
|
||||
foreach ($result as $row) {
|
||||
$stats['system']['devices']['disabled'] += ($row['device_provision_enabled'] != 'true') ? 1 : 0;
|
||||
$stats['system']['devices']['disabled'] += ($row['device_enabled'] != 'true') ? 1 : 0;
|
||||
if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
|
||||
$stats['domain']['devices']['total']++;
|
||||
$stats['domain']['devices']['disabled'] += ($row['device_provision_enabled'] != 'true') ? 1 : 0;
|
||||
$stats['domain']['devices']['disabled'] += ($row['device_enabled'] != 'true') ? 1 : 0;
|
||||
}
|
||||
}
|
||||
unset ($sql, $prep_statement, $result);
|
||||
|
||||
Reference in New Issue
Block a user