Skip to content

Commit

Permalink
Fix two minor bugs (#340)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
wjcheers authored and mlespiau committed Jan 8, 2018
1 parent 3f49e28 commit 7b872c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ajax/editActivity.php
Expand Up @@ -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). */
Expand Down
2 changes: 1 addition & 1 deletion modules/lists/dataGrids.php
Expand Up @@ -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;
Expand Down

0 comments on commit 7b872c2

Please sign in to comment.