From 285504c976879fc6acf39b32265e93cc97b0ecbb Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 20 Nov 2014 02:34:03 +0000 Subject: [PATCH] Set the device line_number default to 1. --- app/extensions/extension_edit.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 5b17b22990..2cf1600e41 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -71,7 +71,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config. $prep_statement_accountcode->execute(); $row_accountcode = $prep_statement_accountcode->fetch(PDO::FETCH_ASSOC); - if ($row_accountcode['count'] > 0) { + if ($row_accountcode['count'] > 0) { $accountcode = $_POST["accountcode"]; } else { @@ -187,6 +187,9 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config. $device_mac_address = strtolower($device_mac_address); $device_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address); + //set a default line number + if (strlen($line_number) == 0) { $line_number = '1'; } + //add the device if it doesn't exist, if it does exist get the device_uuid $sql = "select device_uuid from v_devices "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; @@ -1318,7 +1321,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //echo " ".$row['device_description']." \n"; echo " \n"; echo " $v_link_label_delete\n"; -// echo " $v_link_label_delete\n"; echo " \n"; echo " \n"; }