1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

126 Commits

Author SHA1 Message Date
Cameron
d960829532 Issue #4918 - Undefined constants cleanup. 2022-12-10 07:06:47 -08:00
Cameron
55980a29a8 Generated PHPDoc for all classes in e107_handlers where one was missing. toNumber() updated to always return int or float. 2022-04-04 10:54:24 -07:00
Cameron
025ff07aab Fixes #4737 Removal of type="text/javascript" and type="text/css" 2022-03-31 08:24:34 -07:00
Cameron
0d8f3e9086 PHPDoc fixes and code optimization. 2021-12-03 14:58:33 -08: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
d7e4b4a665 Code cleanup and error fixes. 2021-03-03 12:06:24 -08:00
Cameron
176ae86409 Issue #3068 - Added a warning for misconfigured theme layouts.
Moved e_layout class to menumanager_class.php file.
Closes #4030 - Menu Layout detection test.
themeLan() was failing with themes containing hyphens in the folder name.
2021-02-20 12:15:28 -08:00
Cameron
821f2e9c22 Moved e_layout to menumanager_class.php 2021-02-20 11:31:09 -08:00
Cameron
522d71d243 Reduced some memory usage. 2021-01-24 17:00:02 -08:00
Cameron
5c9e04373e Moved methods from e_menu_layout to e_layout. 2021-01-17 09:10:00 -08:00
Cameron
cc5fbe87ef Skip admin path check for now. Correct LAN conflict. 2021-01-16 14:32:55 -08:00
Cameron
04bbad449a Test admin scripts are parsing correctly. 2021-01-16 13:32:35 -08:00
Nick Liu
d7de9d5a28
Menu manager: Legacy themes: Added some magic constant support 2020-12-26 21:08:57 +01:00
Cameron
601df26d51 Code optimization for speed and reduced memory usage. 2020-12-20 11:50:10 -08:00
Cameron
5b82c292b1 Code cleanup 2020-12-18 19:55:12 -08:00
Cameron
7238743542 Regex fixes and path fix for TinyMce. 2020-12-18 13:07:45 -08:00
Cameron
44e260b121 Code cleanup and optimization 2020-12-14 16:21:48 -08:00
Cameron
0e3f87cf25 Fixes #3961 Avoid conflicts with earlier themes that may have a 'layouts' folder. 2020-04-11 11:45:50 -07:00
Cameron
c18edcac43 PHP Notice removal 2020-01-23 13:15:24 -08:00
Cameron
609496ab4c Improved performance on getLayouts when using the new 'layouts' folder in the theme's directory.
Possible fix for missing class in footer_default.php
2019-09-03 05:58:04 -07:00
Cameron
1d45f1e4c4 Fixes #3932 Added support for dynamic header/footer templates controlled by theme_shortcodes class. 2019-08-22 14:28:59 -07:00
Cameron
68e4fd7d03 Support for {MENUAREA} - testing needed. 2019-08-22 13:18:09 -07:00
Cameron
a2c384c57f Fixed <body> tag when using Menu Manager. Stored HTML-theme true/false var for each theme. 2019-06-22 11:43:46 -07:00
Cameron
1cb3f934ea Isse #2308 Remove the need for the BODYTAG constant. 2019-06-21 14:09:10 -07:00
Cameron
6ae0bee2fe Menu-Manager {MENU} count fix for *_layout.html format. 2019-06-17 10:16:27 -07:00
Cameron
36b4c354eb Experimental - Support for theme html templates and layouts. 2019-06-11 15:53:08 -07:00
Cameron
783be29953 PHP 7.3 Notice/Warning Fixes. 2019-05-27 10:45:35 -07:00
Cameron
5e0ddfc36f Fixed #3807 - Menu-Manager parser error on themes with hyphen in folder name. 2019-05-17 12:53:46 -07:00
Cameron
c9aa5e188b Moved e_menu_layout into menumanager_class.php and renamed tablestyle() before eval() parses it. 2019-04-06 15:37:45 -07:00
Cameron
e241435392 Fixes #2496 - generic menu params not saving. 2017-03-06 10:35:38 -08:00
Cameron
aa36466220 Issue #2446 e_menu multilan value fix. 2017-03-02 09:39:50 -08:00
Cameron
4fa8e47247 Issue: #2398 e_menu now supports tabs. 2017-02-13 18:14:51 -08:00
Cameron
57ae0a6cb6 Admin area: Fix for responsive navigation menu. 2017-02-02 08:41:09 -08:00
Cameron
276d4a52f4 Fix for Menu-Manager not display Menu area under some circumstances. 2017-01-12 17:36:00 -08:00
Cameron
069f24e179 Flipped behavior of e_DEBUG_MENUMANAGER. New Menu-Manager is now the default. 2017-01-11 14:19:35 -08:00
Cameron
a37f3217f8 Issue #2245 Menu-Manager css cleanup. 2017-01-04 11:47:07 -08:00
Cameron
8366f3bfc0 Menu-Manager fix for lower-resolution screens. 2017-01-04 11:28:10 -08:00
Cameron
c684a7c3e8 Menu-Manager: render embedded menus. 2017-01-03 19:29:39 -08:00
Cameron
95edb68e60 Include body layout class when menu-manager active. 2017-01-03 18:43:01 -08:00
Cameron
719016e09a menu-manager iframe styling. 2017-01-03 11:16:06 -08:00
Cameron
7c5e0c7544 Option to prevent loading of js/css 2017-01-03 11:03:22 -08:00
Cameron
9dd717cba8 Menu-Manager rewrite complete, debug mode only. 2017-01-02 19:13:48 -08:00
Cameron
d8258e8174 Menu Manager selection re-write. To enable/test add the following to e107_config.php :
define('e_DEBUG_MENUMANAGER', true);
2017-01-02 14:09:02 -08:00
Cameron
836f09a122 Fixes #2183 - Added table-order auto-correcting and reduced database queries. 2016-12-30 12:11:38 -08:00
Cameron
274b822bf3 Menu debug info added. 2016-12-29 17:19:05 -08:00
Cameron
caffecd9f5 Issue #2183 - Fix for lanVars on a non-object. 2016-12-23 08:03:28 -08:00
Cameron
812c50e4f7 Fixes #2183 - Code cleanup symptom. 2016-12-23 08:00:44 -08:00
MikeyGMT
192fd304f2 Menu Manager: Text to Lans and Removal of Unused #6
Menu Manager: Text to Lans and Removal of Unused #6 - and a little bit
in Theme Handler
2016-12-20 20:26:00 +00:00
lonalore
c226e9a10b Code cleanup. Fixed undefined variables. 2016-12-20 10:58:43 +01:00