Skip to content

Commit

Permalink
#22: Enable date-formatting overrides, without PHP notices
Browse files Browse the repository at this point in the history
  • Loading branch information
lat9 committed Dec 23, 2019
1 parent a754371 commit be5a5ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,10 @@ Changes in 3.3.3, 2019-12-23 (lat9)
[BUGFIX] Correct 'goods' value when the store doesn't display prices with tax (the tax was incorrectly being removed from the price).
[BUGFIX] Correct suggested CSV-download filename (didn't include the .csv extension).
[BUGFIX] Move admin-menu name to a language-based sub-directory.
[CHANGE] Enable date-format overrides (without throwing PHP notices).

Modified:
/YOUR_ADMIN/stats_sales_report.php
/YOUR_ADMIN/includes/classes/sales_report.php
/YOUR_ADMIN/includes/extra_datafiles/sales_report_filenames.php
/YOUR_ADMIN/includes/functions/extra_functions/stats_sales_report.php
Expand Down
8 changes: 4 additions & 4 deletions YOUR_ADMIN/stats_sales_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
// given that that version has changed the loading order of admin language files.
//
$time_display = (strtolower(DATE_FORMAT) == 'd/m/y') ? 'n-j-Y' : 'jS-M-y';
define('TIME_DISPLAY_DAY', $time_display);
define('TIME_DISPLAY_WEEK', $time_display);
define('TIME_DISPLAY_MONTH', $time_display);
define('TIME_DISPLAY_YEAR', $time_display);
if (!defined('TIME_DISPLAY_DAY')) define('TIME_DISPLAY_DAY', $time_display);
if (!defined('TIME_DISPLAY_WEEK')) define('TIME_DISPLAY_WEEK', $time_display);
if (!defined('TIME_DISPLAY_MONTH')) define('TIME_DISPLAY_MONTH', $time_display);
if (!defined('TIME_DISPLAY_YEAR')) define('TIME_DISPLAY_YEAR', $time_display);

// we ramp up the execution time to make sure those
// really big reports don't time out
Expand Down

0 comments on commit be5a5ca

Please sign in to comment.