mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-01 08:33:22 +02:00
Bugfix in date/time management
This commit is contained in:
parent
adf0c37174
commit
283de11c85
1 changed files with 4 additions and 4 deletions
|
@ -931,8 +931,8 @@ class SystemController extends Controller
|
||||||
$sData['tldid'] = filter_var($data['tldid'], FILTER_SANITIZE_NUMBER_INT);
|
$sData['tldid'] = filter_var($data['tldid'], FILTER_SANITIZE_NUMBER_INT);
|
||||||
$sData['extension'] = substr(trim($data['extension']), 0, 10);
|
$sData['extension'] = substr(trim($data['extension']), 0, 10);
|
||||||
$sData['promotionName'] = substr(trim($data['promotionName']), 0, 255);
|
$sData['promotionName'] = substr(trim($data['promotionName']), 0, 255);
|
||||||
$sData['promotionStart'] = date('Y-m-d', strtotime($data['promotionStart']));
|
$sData['promotionStart'] = str_replace('T', ' ', $data['promotionStart']) . ':00';
|
||||||
$sData['promotionEnd'] = date('Y-m-d', strtotime($data['promotionEnd']));
|
$sData['promotionEnd'] = str_replace('T', ' ', $data['promotionEnd']) . ':00';
|
||||||
$sData['discountType'] = in_array($data['discountType'], ['percentage', 'amount']) ? $data['discountType'] : 'percentage';
|
$sData['discountType'] = in_array($data['discountType'], ['percentage', 'amount']) ? $data['discountType'] : 'percentage';
|
||||||
$sData['discountValue'] = filter_var($data['discountValue'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
|
$sData['discountValue'] = filter_var($data['discountValue'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
|
||||||
$sData['max_count'] = ($data['max_count'] === "") ? null : filter_var($data['max_count'], FILTER_SANITIZE_NUMBER_INT);
|
$sData['max_count'] = ($data['max_count'] === "") ? null : filter_var($data['max_count'], FILTER_SANITIZE_NUMBER_INT);
|
||||||
|
@ -1011,8 +1011,8 @@ class SystemController extends Controller
|
||||||
$sData['phaseName'] = substr(trim($data['phaseName']), 0, 255);
|
$sData['phaseName'] = substr(trim($data['phaseName']), 0, 255);
|
||||||
$sData['phaseType'] = substr(trim($data['phaseType']), 0, 255);
|
$sData['phaseType'] = substr(trim($data['phaseType']), 0, 255);
|
||||||
$sData['phaseDescription'] = substr(trim($data['phaseDescription']), 0, 1000);
|
$sData['phaseDescription'] = substr(trim($data['phaseDescription']), 0, 1000);
|
||||||
$sData['phaseStart'] = date('Y-m-d', strtotime($data['phaseStart']));
|
$sData['phaseStart'] = str_replace('T', ' ', $data['phaseStart']) . ':00';
|
||||||
$sData['phaseEnd'] = date('Y-m-d', strtotime($data['phaseEnd']));
|
$sData['phaseEnd'] = str_replace('T', ' ', $data['phaseEnd']) . ':00';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$currentDateTime = new \DateTime();
|
$currentDateTime = new \DateTime();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue