1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-02 02:07:52 +02:00

87 Commits

Author SHA1 Message Date
Moc
1621bfb249
Fixes #4521 - Added %d.%m.%Y date format
Co-Authored-By: Jimako <5429548+Jimmi08@users.noreply.github.com>
2021-12-22 13:57:36 +01:00
Cameron
9d6a9611e2 PHP 8.1 fixes. 2021-11-25 10:18:53 -08:00
Cameron
4aa66c1732 strftime() added to php_compatibility_handler.php and all references updated. README updated. dateAlternativeTest updated to pass on Windows. (TBD) 2021-11-25 08:51:32 -08:00
Cameron
de25bdc898 Closes #4619 - strftime() shim with intl locale support by @Deltik 2021-11-25 07:36:07 -08:00
Nick Liu
20882920a0
Fix all PHP 8.1 test failures
* `strftime()` has been replaced with a polyfill based on `DateTime`.
* Explicit type casts/assertions added where required by PHP 8.1
* `filter_var(…, FILTER_SANITIZE_STRING)` replaced with `strip_tags()`
  or HTML entity encoding of quotation marks, depending on a guess of
  what the intended "sanitization" was
* `http_build_query()` usage type mismatches fixed
* Removed usages of the `FILE_TEXT` constant
* To avoid breaking PHP 5.6 compatibility (function return types),
  `e_session_db` no longer implements `SessionHandlerInterface`.
  Instead, the alternative non-OOP invocation of
  `session_set_save_handler()` is used instead to apply the session
  handler.
* The shim for `strptime()` still calls the native function if available
  but now suppresses the deprecation warning.

* `e_db_pdo` explicitly asks for `PDO::ATTR_STRINGIFY_FETCHES` to
  maintain consistent behavior with past versions of PHP.
* `e_db_mysql` explicitly sets `mysqli_report(MYSQLI_REPORT_OFF)` to
  maintain consistent behavior with past versions of PHP.

* Removed pointless random number generator seed from `banner` plugin
* Workaround for `COUNT(*)` SQL query in
  `validatorClass::dbValidateArray()` without a proper API for avoiding
  SQL injection
2021-09-04 15:06:19 +02:00
Cameron
487c10fc1d Fix for computeLapse() displaying just "in" by itself. 2021-01-08 13:49:23 -08:00
Cameron
ac9c19bae9 PHP8 class cleanup 2021-01-06 11:52:29 -08:00
Cameron
630f3f415f Improved detection of deprecated functions/methods and display in DEBUG mode: deprecated. 2020-12-21 10:00:28 -08:00
Cameron
601df26d51 Code optimization for speed and reduced memory usage. 2020-12-20 11:50:10 -08:00
Cameron
7238743542 Regex fixes and path fix for TinyMce. 2020-12-18 13:07:45 -08:00
Cameron
f605ddc552 Code optimization and cleanup. 2020-12-10 15:52:48 -08:00
Cameron
43d8221340 Fixes #4080 - user profile date issue. 2020-05-02 11:43:00 -07:00
Nick Liu
f23aec7395
Replaced e_date::strptime() with eShims::strptime()
- NEW: Added \e107\Shims\Internal\StrptimeTrait, which implements PHP internal function
       strptime(). On not-Windows, the built-in function is called. If that function fails
       or if the operating system is Windows, the alternative pure PHP implementation is
       attempted. The first successful call is returned, or false if none are successful.
- MOD: Deprecated e_date::strptime() in favor of eShims::strptime()
- FIX: License misatributed for e_date::strptime() (now eShims::strptime()). The library
       used was public domain, not CC BY-NC-SA 2.0 FR by Lionel Sauron.
- MOD: Removed STRPTIME_COMPAT constant now that eShims::strptime() exists
- MOD: Removed support for calling e_date::strptime() with:
       - a localized full month name
       - a localized abbreviated month name
       - AM or PM
       - am or pm
       because these features were only implemented in Windows mode (STRPTIME_COMPAT).
- MOD: php_compatibility_handler.php now defines global strptime() using the
       eShims::strptime() implementation
- NEW: Test all(?) the possibilities of eShims::strptime()
2020-01-22 09:07:27 +01:00
Cameron
0b26a97217 Revert "Removed useless STRPTIME_COMPAT constant"
This reverts commit ce510159a9913b104e0c0a07d5018e774f47898b.

Added check for 'tm_hour' key.
2020-01-19 12:35:02 -08:00
Nick Liu
ce510159a9
Removed useless STRPTIME_COMPAT constant 2020-01-18 11:05:09 +01:00
Tijn Kuyper
2f67965d1f Closes #3355 - allow for proper translation relative datetime 'ago' and 'in'. 2019-02-11 11:03:15 +01:00
Tijn Kuyper
96a1db0e5c Revert "#3101 - Add optional flags to e107_config.php"
This reverts commit 16b298ea51d63de101e0da676ca2f09488251a9f.
2019-02-09 17:24:49 +01:00
Tijn Kuyper
16b298ea51 #3101 - Add optional flags to e107_config.php 2019-02-09 17:24:14 +01:00
Tijn Kuyper
4f90105419 #3605 - set 'show secs' parameter to true by default
Used in relative datestamp. This makes sure "just now" is properly displayed".
2019-02-09 16:15:32 +01:00
Achim Ennenbach
4ef97f2812 issue #3625: 'Z' and 'z' formats excluded on windows systems 2019-01-17 12:44:33 +01:00
Cameron
58efb74d4d Issue #3605 Date handler computeLapse() method rewrite. 2019-01-15 20:30:18 -08:00
Tijn Kuyper
e8f8b692e3 #3605 - date handler LAN fix 2019-01-11 11:47:00 +01:00
Tijn Kuyper
01263ef497 Fixes #3605 - Check for past/future difference in toDate()
and code clean-up
2019-01-11 11:39:20 +01:00
Achim Ennenbach
8a6f1f5199 Fix for missing entries in strptime result array on Windows 2018-05-24 21:25:51 +02:00
Cameron
b06d67d0a1 Date handler. Reduce usage of strptime(). Date format conversion from strftime() > DateTime added to toMask() method. 2018-05-24 07:39:54 -07:00
Cameron
d512035eb6
Merge pull request #3130 from SimSync/master
Fixed smaller issues in date_handler.php
2018-05-16 14:07:34 -07:00
Achim Ennenbach
6203233f30 fixed issue in strptime with wrong monthname on windows 2018-05-15 22:00:47 +02:00
Achim Ennenbach
34b422ff58 fixed orphaned . (dot) in convert_date 2018-05-15 21:54:43 +02:00
Cameron
bf9cf05b0e Renamed date handler to e_date. BC support added. 2018-05-11 14:58:04 -07:00
Cameron
129ac9436d Renamed date class and included BC fix. 2018-05-11 08:39:01 -07:00
Cameron
75ff5fc36d Revert Datehandler changes for now. 2018-03-15 22:27:25 -07:00
Cameron
3bb77c6d0c Date handler am/pm code fix. 2018-03-12 18:08:46 -07:00
Cameron
a96049c88c Date issue work-around. 2018-03-04 20:01:55 -08:00
Cameron
6490b6d315 Added missing 'd' (day of the month - no leading zero) mask to date handler. 2018-03-04 16:41:35 -08:00
Cameron
c377050945 Make sure livestamp' is only active when 'relative' is selected in toDate(). 2018-03-04 13:03:29 -08:00
Cameron
ecef1f6ffa Date Class terms() method corrected. 'months' now uses the correct key. terms() method usage updated throughout.
Chart Class debug() method added
2017-04-06 11:02:54 -07:00
Cameron
43d0211590 Code cleanup: deprecated include_lan() 2017-01-23 09:41:23 -08:00
Cameron
bb357b2035 Issue: #1885 #1866 - Moved utf8 detection method to parser class. 2016-09-28 10:26:39 -07:00
lonalore
4ca9aa9a3f Fix for issue #1866. 2016-09-20 11:28:17 +02:00
durandalwoz
f15078d321 Encoding fix
Fixes problems with accented weekdays in Spanish other languages
2016-06-28 03:24:18 -03:00
Cameron
048ab169da Note added to $gen->convert() which should be replaced by $tp->toDate() in all plugins. 2016-05-31 13:25:43 -07:00
Cameron
e0b1d87acc Relative Date format changed from "0 mins" to "Just now". Newsfeed admin area now displays last feed refresh time. 2016-05-21 09:45:15 -07:00
Lóna Lore
0781acf17e Replaced hardcoded "ago" string with constant. 2015-12-12 14:49:13 +01:00
Miroslav Yovchev
748ffc8f6e Merge branch 'master' of github.com:e107inc/e107 2015-10-30 09:28:39 +02:00
Cameron
cffb369751 Issue #1109, Fixes #830, Fixes #731, Fixes #710, Fixes #608, Fixes #1012 : v1 -> v2 Upgrade-Routine fixes (including forum plugin) 2015-08-24 17:39:28 -07:00
Miroslav Yovchev
a145318f6a wrong docblock type hinting 2015-07-31 22:30:26 +03:00
Cameron
03fb11dfc0 Issue #1157 - Should fix datepicker locale issue. 2015-07-26 17:33:15 -07:00
Cameron
027a74f5b0 Code cleanup 2015-02-15 02:37:36 -08:00
Cameron
c65359e444 Removed Months and Days from language files. Replaced with strftime() functions. New 'terms' method added to Date handler.
eg. e107::getDate()->terms('month'); returns an array of month names in the current language.
2014-06-02 17:07:02 -07:00
Cameron
6a8e57bb05 Fixes #509 - Date (month) conversion issue on Windows machines. 2014-02-18 05:41:58 -08:00