diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index ce4ce4f..b5cd0f2 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -932,7 +932,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { case 'monitor': $btn_t = 'speeddial'; $btn_opt = (string) $get_settings['button' . $it . '_line']; - $db_res = $this-> dbinterface->get_db_SccpTableData('SccpExtension', array('id' => $btn_opt)); + $db_res = $this-> dbinterface->get_db_SccpTableData('SccpExtension', array('name' => $btn_opt)); $btn_n = $db_res[0]['label']; $btn_opt .= ',' . $btn_opt . $this->hint_context; break; diff --git a/Sccp_manager.inc/dbinterface.class.php b/Sccp_manager.inc/dbinterface.class.php index 26915c9..638cc03 100644 --- a/Sccp_manager.inc/dbinterface.class.php +++ b/Sccp_manager.inc/dbinterface.class.php @@ -26,11 +26,11 @@ class dbinterface { } switch ($dataid) { case "SccpExtension": - if (empty($data['id'])) { - $sql = "SELECT * FROM `sccpline` ORDER BY `id`"; + if (empty($data['name'])) { + $sql = "SELECT * FROM `sccpline` ORDER BY `name`"; $raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC); } else { - $sql = "SELECT * FROM `sccpline` WHERE `id`=" . $data['id']; + $sql = "SELECT * FROM `sccpline` WHERE `name`=" . $data['name']; $raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC); } break; diff --git a/views/form.buttons.php b/views/form.buttons.php index f86c75e..f191574 100644 --- a/views/form.buttons.php +++ b/views/form.buttons.php @@ -159,8 +159,8 @@ if (!empty($_REQUEST['new_id'])) { @@ -187,8 +187,8 @@ if (!empty($_REQUEST['new_id'])) { echo ''; echo '';