1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-03 10:49:12 +02:00

4173 Commits

Author SHA1 Message Date
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
0c1ab45835 Form Handler Fixed drop-down 'empty' value check. 2018-05-23 18:47:34 -07:00
Cameron
d7e3caae83 Admin-ui: Improved adminMenu highlighting when custom uri in use.
Plugin Builder: added menu divider example.
2018-05-23 16:29:37 -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
b1473ed919 removed orphaned variable 2018-05-15 22:56:13 +02:00
Achim Ennenbach
fc2873f46b closes e107inc/e107#3063
added option be able to set a different pattern
added additional options do define step, min, max value and decimals
2018-05-15 22:21:05 +02: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
ac4b505ceb Issue #3104 Library CSS fix for late calls. (eg. bootstrap-switch ) 2018-05-12 11:46:28 -07:00
Cameron
6b925a6f76 Issue #3104 - Library CSS order fix. 2018-05-11 17:39:26 -07: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
a3092e1d42
Merge pull request #3121 from yesszus/patch-2
Issue #6  Update userposts.php
2018-05-09 15:47:15 -07:00
Cameron
c7c3c49daf Support for 'IGNORE' duplicate key on INSERT. 2018-05-09 11:13:05 -07:00
Gábor
1109854538
Update news_class.php 2018-05-08 08:26:17 +02:00
Cameron
ed36008286 Non-standard arg_separator.output value fix. 2018-05-04 17:58:25 -07: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
Cameron
3e1feac04d Improved loading time of admin area navigation. 2018-04-17 14:48:39 -07: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
Cameron
9726a70d2d Issue #3076 - session handler. 2018-03-19 11:20:35 -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
968965e561 Removed session debug info 2018-03-10 19:23:06 -08:00
Cameron
8f91e42c40 Changed makeClickable to public, for testing. 2018-03-10 19:17:13 -08:00
Cameron
79fbf4273c Issue #2996 Admin-ui type=layout inline editing issue. 2018-03-10 18:15:45 -08:00
Cameron
15345afb89 #1517 Tracing of the 'unauthorized access' issue. 2018-03-09 17:52:14 -08:00
Cameron
de69b07318 Basic Bootstrap 4 library support. Bootstrap4 theme added for testing purposes only. 2018-03-08 13:45:08 -08:00
Cameron
0aab273723 Admin-ui: Throw error if $pluginName does not match an installed plugin. 2018-03-07 11:42:30 -08: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
Cameron
1494c18660 Admin-UI: Added "Is Empty" option to type=number when filter is true. 2018-03-05 17:15:49 -08:00
Cameron
48b3318ecb Admin-UI: $field 'filter' attribute now accepts 'future' and 'both', defaults to 'past' when set to true. ie. search future dates, past/future dates or past dates. 2018-03-05 14:37:56 -08:00
Cameron
f1460787a1 Admin-ui Fix date filter. 2018-03-05 13:45:11 -08: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
56ffaad39e Fixed 'after submit' default. Added writeParm['empty'] for type 'dropdown' when a default value on empty is required. 2018-03-04 11:59:59 -08: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
Cameron
d462a1bfa2 Fix formhandler flipswitch defaults. 2018-02-23 12:01:08 -08:00
Cameron
e92c6789c5 Fix path of e_SYSTEM_BASE and e_MEDIA_BASE 2018-02-19 13:46:09 -08: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
d1a69b0c16
Defers SITEURL and dependencies until SQL loaded
This is the least intrusive solution I could come up with.

Anything else I tried to reduce technical debt would break the very
tangled dependency web, so I settled for this.

Fixes: #3033
2018-02-12 06:54:15 -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
2167a69a50
Record count no longer depends on subclass impl.
Subclasses may forget to run code to do a total record count, which
leads to output showing "Total Records: 0" on some pages with lists,
like `/e107_admin/links.php`.

This commit cuts out the record counting from the getList() method of
any e_admin_form_ui subclasses and the base class so that subclasses do
not have to reimplement record counting.

The caveat with this implementation is that it violates the Law of
Demeter, as evidenced by the new chained method call:

    $this->getController()->getTreeModel()->getTotal()

Jumping through two objects to get a value is not ideal, but this is the
code we have to work with at the moment.
2018-02-09 04:57:01 -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
Cameron
986aabb062
Merge pull request #3028 from Deltik/fix-3027
Fixes #3026. PHP 7.2 consistency hack in xmlClass::xml2array()
2018-02-06 11:24:15 -08:00