1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

184 Commits

Author SHA1 Message Date
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
0d8f3e9086 PHPDoc fixes and code optimization. 2021-12-03 14:58:33 -08:00
Nick Liu
dc3ac65a70
Fix implementation of e_front_model::sanitize()
Handles recursive data field validation now
2021-04-17 02:57:10 -05:00
Cameron
6d0810af0d Fixes #4468 - quick debugging of json data using type: 'text' and hidden() field fix. 2021-03-31 15:14:58 -07:00
Cameron
c32e5bf1e2 e107::unserialize() will now return the array if the input is an array. Additional form-handler tests added for type: media, file and files. Admin-ui can now manage a change of field type from 'array' to 'json' without additional changes needed. 2021-02-08 08:44:44 -08:00
Cameron
d1f997ee2c Fix for multi-dimensional field saving. 2021-02-02 16:09:22 -08:00
Cameron
ed94389451 Fixes #4369 Reverted model multi-dimensional support for now. Added test for custom-fields scenario. 2021-02-02 07:34:36 -08:00
Cameron
151396b1a3 Admin-ui: Support for multi-dimensional array field-names (useful for prefs). Use with caution, avoid matching field names. 2021-01-30 08:58:40 -08:00
Cameron
94e37f47a1 Issue #4356 - Admin-area login issue. 2021-01-27 16:50:53 -08:00
Cameron
402d1f4126 Closes #1801 Code cleanup. Deprecated method errors added. 2020-12-22 14:48:28 -08:00
Cameron
3f8e043998 Replaced e107::getAdminLog() with e107::getLog(). e107::getAdminLog() will continue as a deprecated alias. 2020-12-22 09:36:02 -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
2b8a3cff60 Code cleanup 2020-12-18 13:24:14 -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
f605ddc552 Code optimization and cleanup. 2020-12-10 15:52:48 -08:00
Cameron
09fb747374 Code cleanup 2020-12-05 14:13:18 -08:00
Cameron
24087bde29 AdminUI: Display ID number in create/update message. 2020-07-23 11:38:23 -07:00
Nick Liu
a1560b1989
Strict fixes for e_tree_model::flattenTree()
- FIX: Null check during child recursion of e_tree_model::flattenTree()
- FIX: TreeModelTest::testTreeParentsAreAssignedCorrectly() apparently never worked until now because the wrong index was used
2020-01-18 16:35:20 +01:00
Cameron
f5317e329f Theme preferences import/export added to 'database' admin area. 2019-07-09 12:08:52 -07:00
Cameron
62863b4934 Issue #2146 PHP 7.3 class compatibility fix. More testing required. 2019-06-03 16:29:38 -07:00
Cameron
99a30594c3 Extended admin-ui error log messages. 2019-04-02 08:44:01 -07:00
Cameron
0956a2162b Extended log error info 2019-04-02 08:38:37 -07:00
Cameron
3fef376cce Extended admin-ui error log messages. 2019-04-02 08:22:53 -07:00
Cameron
6c682dffae Issue #3232 Correct user search of extended fields. (set field 'data' to 'str')
Fixes #3677 Wrong message displayed.
2019-03-19 15:11:36 -07:00
Cameron
037c7c67ff Fixes batch process issue under PHP 7.3 2019-03-03 13:08:02 -08:00
Cameron
a7d047498e PHPDoc fixes. 2019-03-02 10:09:16 -08:00
Cameron
8c73bf1434 Issue #2146 Partial compatibility fix. Testing required. 2018-09-18 17:58:32 -07:00
Nick Liu
b471626fdb
Fixed missing tree nodes for some tree structures
There were two cases that led to missing tree nodes:

* If one node at the same depth as another node had a higher primary
key ID but showed up in the rows before, the lower primary key ID node
will go missing.

* If an unmatching row for the current node in moveRowsToTreeNodes
appeared between a matching row, the matching row would never be
reached and would not be added to the tree.
2018-06-22 14:00:13 -05:00
Cameron
745f9a7c61
Merge pull request #3114 from SimSync/master
Closes #3113 parses a string into a db ready number format
2018-05-04 11:19:23 -07:00
Achim Ennenbach
d01a97816f refactoring toNumber() into e_parse class 2018-05-04 19:27:00 +02:00
Achim Ennenbach
2a1a6d4118 closes e107inc/e107#3113 parses a string into a db ready number format
value returned works also with floatval()
2018-05-01 23:29:50 +02:00
Deltik
b3aa33afb5
Removed pointless second sort in e_tree_model
e_tree_model::prepareSimulatedCustomOrdering() performed an ORDER BY
second sort that doesn't add any benefit at all and causes #3086.

This second sort has been removed.

Fixes: #3086
2018-04-03 17:21:45 -05:00
Nick Liu
8a675021ff
Hybrid e_tree_model flat lists or parent-children
e_tree_model is apparently used for flat lists as well as parent-child
relationships (trees). Trees are expected to be far smaller than possible flat
lists. Very large flat lists (10,000+ rows or greater) are rendered very slowly
because of the tree computation overhead.

This change figures out whether a flat list or a tree is requested and chooses
the appropriate code to run based on what is requested. Trees run the more
expensive code while flat lists are returned as-is.

In addition, the tree rendering code has been optimized. Optimizations:

* Unchanging tree node ID is set once instead of inside a foreach() loop
* The parent-child query is now sorted by the sort parent ID so that each move
  rows to tree nodes iteration doesn't have to run through every remaining row

Fixes: #3062
2018-03-06 16:08:11 -06:00
Deltik
80a209cbae
Code Climate fix: e_tree_model::multiFieldCmp()
Reduced cognitive complexity
2018-02-23 16:39:52 -06:00
Deltik
840859a32f
e_tree_model::multiFieldCmp() string sort fields
An untested oversight in e_tree_model::multiFieldCmp() where $sort_field
could be a string has now been corrected.

$sort_field now accepts a string to prevent infinite recursion.

Fixes: #3044
2018-02-23 15:48:23 -06:00
Deltik
0bbaaf4c6c
Loose false check for e_tree_model sim. pagination
e_tree_model::prepareSimulatedPagination() did not correctly handle the
count-only condition because of an incorrectly written emptiness check.

Fixes: #3034
2018-02-15 13:59:13 -06:00
Deltik
a4b972cb9f
e_tree_model private methods are now protected
Fixes: #3039
2018-02-15 13:45:40 -06:00
Deltik
05c418cbda
Fixed critical regression introduced in b3a2740
Oops.
2018-02-09 14:39:21 -06:00
Deltik
b3a274010e
Refactored e_tree_model for Code Climate 2018-02-09 05:40:53 -06:00
Deltik
511bb9eae9
Implemented custom sorting for e_tree_model
In #3025, e_tree_model sorting was reimplemented in pure PHP, but this
broke custom sorting (like `?field=cat_name&asc=desc`).

This commit introduces a hack that simulates a subset of MySQL/MariaDB
ORDER BY clauses, which should be sufficient for all known custom
sorting that can be requested.

Tree formatting is always preserved, but custom sorting will apply for
all items at a certain depth under the same parent.

This commit also contains some minor formatting fixes and makes a minor
change to some regex to make use of non-capturing groups.

Fixes: #3029
2018-02-09 04:37:48 -06:00
Deltik
6d4d7ff688
Added pagination to pure PHP e_tree_model sorting
Implementation parses db_query parameter and extracts the offset and/or
count from `LIMIT {offset} OFFSET {count}` or syntactically similar

Fixes: #3015
Supersedes: #3016
2018-02-03 11:02:28 -06:00
Deltik
8bfa29d2cc
Refactored e_tree_model::setCacheString() 2018-02-02 11:04:21 -06:00
Nick Liu
0a88fd1194
PR #3016: Reduced Cognitive Complexity 2018-01-29 02:47:38 -06:00
Nick Liu
8102917903
PR #3016: Refactored for Code Climate
Some code improvements to pass Code Climate checks that failed in e5a093572635dee7243f7b320e469006e0056424
2018-01-28 14:42:49 -06:00
Nick Liu
e5a0935726
Reimplement e_tree_model sorting in pure PHP
Eliminated e107 dependency on the MySQL/MariaDB CREATE PROCEDURE permission

As a bonus, any attempt to use e107's native custom sorting (e.g.
`?field=cat_name&asc=desc`) will preserve the correct tree hierarchy.  The past
behavior was to sort as requested but keep showing depth, even though the
apparent tree hierarchy would be wrong.

Fixes: #3015
Supercedes: #2929
2018-01-28 12:54:20 -06:00
Cameron
c2048c1c2f Use news_class on print page. 2018-01-16 14:41:51 -08:00
Cameron
a832b8266c Admin-UI: Improved SQL query logging in System logs. 2017-08-02 10:58:00 -07:00
Cameron
0b920163a6 Send field and field-type values to e_parse toDB 2017-01-29 11:08:43 -08:00
Cameron
375d019169 toDB fix. - e_parse hook. 2017-01-29 09:47:54 -08:00