1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00

163 Commits

Author SHA1 Message Date
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
Cameron
ff38b2ad07 Closes #2309 - AdminUI Batch Export option added. 2017-01-27 18:02:57 -08:00
Cameron
5c3ce83168 Custom Field Fixes. Theme pref default fix. Shortcode updated: {CHAPTER_MENUS: name=chapter-sef-url} 2017-01-25 17:57:38 -08:00
Cameron
4b443bc2c8 Experimental Feature: Page/Menu custom fields. Enable debug to experiment. Usage: {CPAGEFIELD: name=xxxxx} where 'name' is the field name. Currently only functions in edit mode when the chapter is already set. 2017-01-18 17:10:12 -08:00
Cameron
d32acea80c Fix for PHP 7.1 installation issue. 2017-01-13 10:34:03 -08:00
Cameron
160d8522b0 Experimental "code" data format added to adminUI. PHP Notice removal. 2016-11-04 17:49:22 -07:00
Cameron
7fdb27510f PHP Warning Fixes. 2016-06-09 16:43:36 -07:00
Cameron
127271e9fc Issue #595 - Use PHP 5.5+ password methods when available. User password field expanded to 255 chars. Fixes issue with salt password being updated via User > Edit User. 2016-06-06 19:54:48 -07:00
Cameron
638d670183 Fix for Banner insert issue when using PDO. Corrected display of MYSQL error messages when using PDO. 2016-05-29 11:00:37 -07:00
Cameron
09cbf97f3a Issue #1633 - possible fix for record creation problem using admin-ui and LAN_CREATE term. 2016-05-12 19:34:57 -07:00
Cameron
1202c72390 Issue #1378 Fix for XUP avatar check. User audit log for login and logout now functioning correctly. Admin log no longer adds a log when deleting a log! 2016-03-16 13:53:57 -07:00
Cameron
2c50a06517 Deprecated Function cleanup and PHP Notice removal. 2016-02-15 00:56:08 -08:00
Cameron
4e8412b16c Issue #1287 - PHP7 and SSL fixes. 2016-02-14 19:00:12 -08:00
Cameron
1ceabc69f3 PHP Notice fixes. 2016-02-13 12:57:34 -08:00
Cameron
6db8c7ddeb Should fix #1229 - Rebuild userclass tree after adding new class. 2015-11-22 10:00:46 -08:00
Cameron
3102a6cb07 Fix for admin-log of Admin-UI DB-inserts and fix for default userclass value in form element. 2015-04-14 11:59:46 -07:00
Cameron
2b35a583d4 Admin->Userclasses now using the Admin-UI. Admin-UI now supports non-incrementing primary fields being set manually using a hidden form field. Form handler for userclass with checkboxes now working correctly. 2015-03-01 12:43:02 -08:00
Cameron
d7f603ae8b Fixes #713, Fixes #897 - MySQL Strict Mode fixes. 2015-02-20 11:03:14 -08:00
Cameron
027a74f5b0 Code cleanup 2015-02-15 02:37:36 -08:00
Cameron
e576370e57 Remove some references to deprecated functions/methods. 2015-02-14 23:34:15 -08:00
Cameron
cbf69d46c7 Support for admin-xxxx-created, admin-xxxx-updated and admin-xxxx-deleted Events. 2015-02-09 14:15:25 -08:00
Cameron
3ca4734a18 Support for admin-ui multiple images in a single field.
Usage: 'type' => 'images', 'data' => 'array'
2014-08-18 05:22:51 -07:00