diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index de63f3440a..a7e4c1a66f 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -77,11 +77,11 @@ else { } else { $sql .= "where domain_uuid = '$domain_uuid' "; if (strlen($search) > 0) { - $sql .= " and "; + $sql .= "and "; } } if (strlen($search) > 0) { - $sql .= " ("; + $sql .= "("; $sql .= " destination_type like '%".$search."%' "; $sql .= " or destination_number like '%".$search."%' "; $sql .= " or destination_context like '%".$search."%' "; diff --git a/app/devices/devices.php b/app/devices/devices.php index 856a31dad6..bd9920e57c 100644 --- a/app/devices/devices.php +++ b/app/devices/devices.php @@ -161,10 +161,10 @@ else { echo "\n"; echo "\n"; - echo th_order_by('device_mac_address', $text['label-device_mac_address'], $order_by, $order); if ($_GET['showall'] && permission_exists('device_show_all')) { echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, $param); } + echo th_order_by('device_mac_address', $text['label-device_mac_address'], $order_by, $order); echo th_order_by('device_label', $text['label-device_label'], $order_by, $order); echo th_order_by('device_vendor', $text['label-device_vendor'], $order_by, $order); echo th_order_by('device_provision_enable', $text['label-device_provision_enable'], $order_by, $order);