From 7b872c2e45edec2227d180ba225e86e037f16bcf Mon Sep 17 00:00:00 2001 From: wjcheers Date: Tue, 9 Jan 2018 02:14:41 +0800 Subject: [PATCH] Fix two minor bugs (#340) * Fix list default sortBy 'description' This is a typo and results in sortBy errors. * Time format error when editing activity there is a bug in the time format while editing activity. strtotime("9:0 AM"); output nothing. It lead the new date of activity to 00:00:00. --- ajax/editActivity.php | 2 +- modules/lists/dataGrids.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax/editActivity.php b/ajax/editActivity.php index e8beb565..5c41f01f 100755 --- a/ajax/editActivity.php +++ b/ajax/editActivity.php @@ -80,7 +80,7 @@ /* Convert formatted time to UNIX timestamp. */ $time = strtotime( - sprintf('%s:%s %s', $activityHour, $activityMinute, $activityAMPM) + sprintf('%02d:%02d %s', $activityHour, $activityMinute, $activityAMPM) ); /* Create MySQL date string w/ 24hr time (YYYY-MM-DD HH:MM:SS). */ diff --git a/modules/lists/dataGrids.php b/modules/lists/dataGrids.php index 325771c4..01add2a7 100644 --- a/modules/lists/dataGrids.php +++ b/modules/lists/dataGrids.php @@ -42,7 +42,7 @@ public function __construct($siteID, $parameters, $misc) { /* Pager configuration. */ $this->_tableWidth = new Width(100, '%'); - $this->_defaultAlphabeticalSortBy = 'Description'; + $this->_defaultAlphabeticalSortBy = 'description'; $this->ajaxMode = false; $this->showExportCheckboxes = true; //BOXES WILL NOT APPEAR UNLESS SQL ROW exportID IS RETURNED! $this->showActionArea = true;