From a0abb418f5e03ade451cb331575ad791f6dfc1fe Mon Sep 17 00:00:00 2001 From: lat9 Date: Fri, 15 Feb 2019 14:43:27 -0500 Subject: [PATCH] #4: Correct zc156 integration --- README.txt | 10 +++++++++ .../languages/english/stats_sales_report.php | 22 ++----------------- YOUR_ADMIN/stats_sales_report.php | 17 ++++++++++++++ 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/README.txt b/README.txt index 08dae6c..82bcace 100644 --- a/README.txt +++ b/README.txt @@ -326,6 +326,16 @@ Changes in 3.2.0, 2017-10-18 (lat9) [BUGFIX] Manufacturer filter was not being honored [CHANGE] Applied PSR-2 styling to the various modules. [BUGFIX] Correct year display for "Last Year" selection. + +===================================== +Changes in 3.2.1, 2019-02-15 (lat9) +===================================== +[CHANGE] Interoperability with zc156, given that the language-file load order has changed. + +Modified: +/YOUR_ADMIN/stats_sales_report.php +/YOUR_ADMIN/includes/languages/english/stats_sales_report.php + ===================================== Sponsored by Destination ImagiNation, Inc. www.destinationimagination.org diff --git a/YOUR_ADMIN/includes/languages/english/stats_sales_report.php b/YOUR_ADMIN/includes/languages/english/stats_sales_report.php index 8d34811..bbf6942 100644 --- a/YOUR_ADMIN/includes/languages/english/stats_sales_report.php +++ b/YOUR_ADMIN/includes/languages/english/stats_sales_report.php @@ -116,27 +116,9 @@ ////////////////////////////////////////////////////////// // TIMEFRAME DATE DISPLAY -// These control the display format of the start and end -// dates of each timeframe line. Each define corresponds -// to the timeframe of its namesake. See the PHP manual -// entry on the date() function for a table on the accepted -// formatting characters: http://us2.php.net/date +// Note: Other constants moved to the main processing file for v3.2.1. // -if (strtolower(DATE_FORMAT) == 'm/d/y') { - // Use US date format (m/d/Y) - define('TIME_DISPLAY_DAY', 'n-j-Y'); - define('TIME_DISPLAY_WEEK', 'n-j-Y'); - define('TIME_DISPLAY_MONTH', 'n-j-Y'); - define('TIME_DISPLAY_YEAR', 'n-j-Y'); - define('DATE_SPACER', ' thru
   '); -} elseif (strtolower(DATE_FORMAT) == 'd/m/y') { - // Use UK date format (d/m/Y) - define('TIME_DISPLAY_DAY', 'jS-M-y'); - define('TIME_DISPLAY_WEEK', 'jS-M-y'); - define('TIME_DISPLAY_MONTH', 'jS-M-y'); - define('TIME_DISPLAY_YEAR', 'jS-M-y'); - define('DATE_SPACER', ' to
   '); -} +define('DATE_SPACER', ' to
   '); ////////////////////////////////////////////////////////// // EXCLUDE SPECIFIED PRODUCTS diff --git a/YOUR_ADMIN/stats_sales_report.php b/YOUR_ADMIN/stats_sales_report.php index f725d95..d35238b 100644 --- a/YOUR_ADMIN/stats_sales_report.php +++ b/YOUR_ADMIN/stats_sales_report.php @@ -29,6 +29,23 @@ require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); + +////////////////////////////////////////////////////////// +// TIMEFRAME DATE DISPLAY +// These control the display format of the start and end +// dates of each timeframe line. Each define corresponds +// to the timeframe of its namesake. See the PHP manual +// entry on the date() function for a table on the accepted +// formatting characters: http://us2.php.net/date +// +// Moved here from the report's language file for v3.2.1 to provide zc156 interoperation, +// 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); // we ramp up the execution time to make sure those // really big reports don't time out