Commit f15cde9c authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Fixed webui adding & changing of SenderIP in Accounting module

- Robert Anderson <randerson@lbsd.net>
parent 91906a09
......@@ -187,6 +187,14 @@ if ($_POST['frmaction'] == "add") {
<?php
} else {
if ($_POST['accounting_track'] == "SenderIP") {
$accountingTrack = sprintf('%s:%s',$_POST['accounting_track'],$_POST['accounting_trackextra']);
} else {
$accountingTrack = $_POST['accounting_track'];
}
$stmt = $db->prepare("
INSERT INTO ${DB_TABLE_PREFIX}accounting
(
......@@ -202,7 +210,7 @@ if ($_POST['frmaction'] == "add") {
$res = $stmt->execute(array(
$_POST['accounting_policyid'],
$_POST['accounting_name'],
$_POST['accounting_track'],
$accountingTrack,
$_POST['accounting_period'],
$_POST['accounting_messagecountlimit'],
$_POST['accounting_messagecumulativesize'],
......
......@@ -250,7 +250,12 @@ if ($_POST['frmaction'] == "change") {
array_push($updates,"Name = ".$db->quote($_POST['accounting_name']));
}
if (!empty($_POST['accounting_track'])) {
array_push($updates,"Track = ".$db->quote($_POST['accounting_track']));
if ($_POST['accounting_track'] == "SenderIP") {
$accountingTrack = sprintf('%s:%s',$_POST['accounting_track'],$_POST['accounting_trackextra']);
} else {
$accountingTrack = $_POST['accounting_track'];
}
array_push($updates,"Track = ".$db->quote($accountingTrack));
}
if (isset($_POST['accounting_period']) && $_POST['accounting_period'] != "") {
array_push($updates,"AccountingPeriod = ".$db->quote($_POST['accounting_period']));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment