1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

79 Commits

Author SHA1 Message Date
rica-carv
cd56f08b12 Update download_shortcodes.php 2025-03-27 19:41:58 +00:00
Nick Liu
cf86267e62 #4686: download_shortcodes: Consistency for agreement text alert box
Extract all accesses of the `agree_text` pref and reformat the value
into a JavaScript `alert()` box

Uses the new `e_parse::toAttributes()` method

Fixes: #4686
2022-02-06 17:14:16 +01:00
Nick Liu
55200fe686 #4547: Strip BBCode from download_shortcodes JavaScript alerts
Fixes: #4547

Discussion:
https://github.com/e107inc/e107/pull/4547#issuecomment-917229877
2021-09-15 16:05:31 -05:00
Nick Liu
f6d6d1b185 Deprecate e_parse::toJS()
`e_parse::toJS()`, documented with the description

> Convert text blocks which are to be embedded within JS

, does not protect strings from injections, which appears to be its
primary use.  Additionally, it performs multiple unrelated string
modifications:

* Replace Windows line breaks with a literal `\\n` (which would later be
  parsed as `\n` in JavaScript/JSON)
* Does not modify Unix line breaks (`\n`), which is inconsistent with
  the Windows line break behavior
* Removes HTML tags
* Replaces HTML entities as `htmlentities()` does

This method cannot be fixed because its usages are inconsistent.  Most
notably, some usages surround the method's output in single quotes while
others surround it with double quotes.  Strings cannot be JSON-encoded
without confounding quotation mark styles.

All core usages of `e_parse::toJS()` have been replaced with
alternatives, which are also documented in the method's DocBlock.

Fixes: #4546
2021-08-31 00:11:14 +02: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
340ff05fcd Bootstrap5 markup added to download item pagination. Fallback added to e107.css 2021-02-21 14:13:01 -08:00
Cameron
f055b49d91 PHP8 Plugin code cleanup 2021-01-21 09:38:38 -08:00
Cameron
3d19db894b PHP8 Fixes and shortcode tests for chatbox_menu, download, faqs, forum and forum-post 2021-01-07 09:42:19 -08:00
Cameron
10482b8a89 Solves the duplicate breadcrumb issue. 2020-12-28 09:48:44 -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
e1593de8ee Removed redundant PHP closing tags. 2020-08-10 15:49:44 -07:00
Tijn Kuyper
c96053cbba Closes #3864 - Added raw option for {DOWNLOAD_CAT_SUB_NAME} and {DOWNLOAD_CAT_SUBSUB_NAME} 2019-10-31 12:14:07 +01:00
Tijn Kuyper
23c0f882dc #3864 - Allow class styling to download next/prev shortcodes 2019-10-30 14:40:29 +01:00
Tijn Kuyper
389f08d216 Fixes #2601 - Download plugin round filesize 2019-10-29 15:23:27 +01:00
Tijn Kuyper
45b073eecb Fixes #3865 - Download icons fix
Thanks @jimmi08
2019-06-27 09:26:53 +02:00
Cameron
c4d2752477 Notice removal 2019-06-14 14:44:46 -07:00
Cameron
1d311ff543 Magic Shortcode added for current breadcrumb. {---BREADCRUMB---} e107::breadcrumb() method added for plugins to set/get values. 2019-06-14 14:32:58 -07:00
Cameron
93f4146f03 Issue #2486 - avoid broken downloads. Use experimental code only in debug mode. 2019-04-11 13:27:09 -07:00
Cameron
5dc45298f6 Issue #3559, Fixes #3589, Issue #2982, Issue #2927 Replace all glyphicons with FontAwesome. 2019-02-22 14:56:47 -08:00
Achim Ennenbach
73be7b5d7b Closes #1027 Show thumb of main image instead of plain text link 2018-07-13 23:58:24 +02:00
Cameron
ed36008286 Non-standard arg_separator.output value fix. 2018-05-04 17:58:25 -07:00
Cameron
0671024c79 Issue #2970 btn-default > btn-default btn-secondary 2018-01-10 15:11:12 -08:00
Cameron
b40b1916a3 Issue #2970 btn-default > btn-default btn-secondary 2018-01-10 15:06:40 -08:00
Cameron
c1d23f34c8 Fixes #2923 - URL path issue. 2017-12-17 07:58:27 -08:00
Cameron
963f35ded1 Downloads: Fixes #2576 - Report Broken Download breadcrumb URLs and cleanup. 2017-05-05 10:11:40 -07:00
Cameron
252abfdce6 Downloads: Fix for screenshot links. 2017-04-26 10:03:12 -07:00
Cameron
07062e26e5 Downloads: Can finally have files in the root directory. 2017-04-19 18:58:34 -07:00
Cameron
1b1de9cda7 Issue #2486 - Downloads templatea fix. Breadcrumb fix. Replacement e_url profile added. 2017-04-10 13:29:05 -07:00
Cameron
2977c7b9c3 Download plugin SEF-URLs currently a hybrid of old and new. More work needed. 2017-04-09 18:03:25 -07:00
Cameron
20bb887fd0 Start of e_url upgrade. 2017-04-09 16:03:31 -07:00
Cameron
c581b89aa1 Download breadcrumb fix. 2017-03-27 09:43:21 -07:00
Cameron
0416c97400 Downloads: Fixes #1062 legacy icon path 2017-03-26 16:34:27 -07:00
Cameron
780123f5de Issue #2381 Add other field types to Plugin Builder. 2017-02-06 19:25:43 -08:00
Cameron
8c0646417b {DOWNLOAD_FILENAME} shortcode added. 2017-02-06 15:22:41 -08:00
Cameron
f3d2319f39 Allow {DOWNLOAD_REQUEST_URL} to be overridden. 2017-01-31 17:35:31 -08:00
Cameron
a7d21dbe90 Downloads: Introduced {DOWNLOAD_REQUEST_URL} which is just the file download url. 2017-01-31 17:12:04 -08:00
Cameron
d5af3b9246 BS4 img-fluid 2017-01-20 10:40:05 -08:00
Cameron
03a6a63694 Downloads: Legacy Upgrade image-path fixes. 2016-12-03 14:16:14 -08:00
rica-carv
81e3c81db6 Update download_shortcodes.php 2016-05-04 11:54:55 +01:00
rica-carv
99bb24bc03 Update download_shortcodes.php 2016-04-16 22:43:35 +01:00
MikeyGMT
dd14399829 Duplicate LANS in Upload and Download
Duplicate LANS in Upload and Download
2015-07-02 18:46:36 +01:00
Cameron
1bc43a35ff Comments engine can now be easily replaced by plugins using e_comment.php. Added "facebook comments" to the social plugin as an example. See admin -> manage -> Comments Manager to enable. (plugin scan may be required if upgrading from github) 2015-04-08 14:51:06 -07:00
Cameron
2fef44272e Downloads plugin language file cleanup 2015-01-22 22:05:25 -08:00
SecretR
47b4338ac9 Download search URL fix 2014-11-03 15:41:21 +02:00
Jimako
8903dca612 FIX 479 missing icons on new upload notification
Forgotten shortcode for new icon in subsub category
2014-05-20 09:41:43 +02:00
Cameron
ef4ced985a Fix for broken download links when using SEF Urls. Cleaned up next/prev template. {GLYPH} now uses 2.x format. eg {GLYPH: type=download&size=2x} 2014-02-07 17:57:06 -08:00
Cameron
4dde3652ad Set all download images to img-responsive 2014-01-30 03:22:59 -08:00
Cameron
56b7bdc42b Removed old icons. If you find broken image paths, please post an issue about it. 2014-01-21 06:40:46 -08:00
Cameron
e323418ab2 Fix for Icon paths. 2014-01-15 04:02:05 -08:00