1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-24 15:13:04 +02:00
Commit Graph

12639 Commits

Author SHA1 Message Date
Deltik
10019cec74 Better local env config to avoid VCS conflicts
Local environments can now be configured with ./config.yml with a sample
configuration available in ./config.sample.yml
2018-02-16 07:04:03 -06:00
Deltik
ccb108d098 Tests for e_tree_model::prepareSimulatedPagination
https://github.com/e107inc/e107/issues/3034
2018-02-15 14:21:50 -06:00
Cameron
fd7b9e352e Merge pull request #3041 from Deltik/fix-3039
e_tree_model private methods are now protected
2018-02-15 12:18:54 -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
dbaa444977 Generated e107_config.php supports remote SQL 2018-02-15 06:00:07 -06:00
Deltik
a18ca98f9a _beforeSuite() of modules called in \Helper\Base
f080402675 only works when a Deployer is
active, but local developers would not be using a Deployer.

For some reason (still unknown), the Codeception framework doesn't
execute _beforeSuite() for all the active modules, so \Helper\Base has
been coded to pick up the slack.

Actually fixes: #1
2018-02-15 05:35:47 -06:00
Deltik
11817896b4 Blanked out secrets.yml
Those credentials are invalid anyway
2018-02-15 05:09:47 -06:00
Cameron
2f62a522b7 Issue #3034 - Fix language-file not loading. 2018-02-14 14:13:37 -08:00
Deltik
f080402675 Reconfigured modules now run _beforeSuite()
Platform-independent SQL dump importing works now because
Helper\DelayedDb is now running _beforeSuite() after being reconfigured.

Fixes: #1
2018-02-14 13:43:24 -06:00
Cameron
be062da64d Merge pull request #3037 from Deltik/fix-3033
Fixes: #3033 Defers setting the SITEURL constant and dependencies until MySQL is connected
2018-02-13 08:23:52 -08:00
Deltik
d0acabcbe5 Added code coverage support and a unit test 2018-02-13 07:53:31 -06:00
Deltik
954a5bce2d Reordered README.md Quickstart
Should flow a bit more naturally now
2018-02-13 04:43:55 -06:00
Deltik
21acee0d12 Updated README.md with quickstart instructions 2018-02-12 17:42:14 -06:00
Deltik
34c8bf8afb Increased compatibility down to PHP 5.6
Removed dependencies installed by Composer
2018-02-12 15:10:27 -06:00
Deltik
b18ef3f830 Ready for testing!
e107 is now ready for fully automated testing on all three test suites:

* Acceptance
* Functional
* Unit

New features:

* cPanelDeployer adds a cPanel Remote MySQL access host
* e107 database dump importer
* Unit tests now load e107

Fixes:

* Test prefixes now only use characters valid for MySQL/MariaDB without
  escaping
* Refactored a bunch of things
* All existing tests pass now

Changes:

* Deployers now provided by \Helper\DeployerFactory
* Added Twig templating for generating e107_config.php for testing
* cPanelDeployer now outputs to codecept_debug()
2018-02-12 13:17:17 -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
Cameron
de7fb1d1a0 Merge pull request #3032 from Deltik/fix-3029
Fixed critical regression introduced in b3a2740
2018-02-09 12:41:22 -08:00
Deltik
05c418cbda Fixed critical regression introduced in b3a2740
Oops.
2018-02-09 14:39:21 -06:00
Cameron
2823087d46 Merge pull request #3031 from Deltik/fix-3029
Implemented custom sorting for e_tree_model
2018-02-09 10:15:01 -08:00
Cameron
42b7121347 Issue #3030 NewForumPosts "main" BC Fix for top/bottom position. 2018-02-09 10:08:36 -08:00
rica-carv
c7083ef16f Merge pull request #49 from e107inc/master
.
2018-02-09 14:51:36 +00:00
Deltik
495145df61 Added automatic database support to all suites
Refactored by extracting code common to all suites to \Helper\Base

New \Helper\DelayedDb helper to delay initialization so that a new DSN,
username, and password can be loaded in dynamically for automatic
database provisioning.  Should still be compatible with manual database
information in codeception.yml
2018-02-09 06:45:23 -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
e045c6c91c Social plugin now provides social share links in admin after creating/updating a news item. 2018-02-08 15:44:08 -08:00
Deltik
ffadc38a96 Submodules now track their branch from remote 2018-02-08 10:16:37 -06:00
Deltik
fabfc67f1b Refactored cPanel Deployer: Defined components
cPanelDeployer is a bit easier to follow now that there is a concept of
components.
2018-02-08 10:07:03 -06:00
Deltik
a42025c5c6 First working acceptance test
Acceptance test checks the output of e107's /install.php on first load

Also added documentation on acceptance tests to README.md
2018-02-08 05:04:42 -06:00
Deltik
4e779d81de cPanel Deployer can now bring up and tear down app
Also added more debug messages to cPanel Deployer
2018-02-08 03:56:05 -06:00
Deltik
ba9a27787e Partial teardown functionality for cPanel deployer
Also renamed class Prepare_cPanel to cPanelDeployer
2018-02-07 05:28:52 -06:00
Deltik
ee84c3de76 Partial support for cPanel acceptance tests
via lib/prepare_cpanel.php
2018-02-07 05:04:28 -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
Deltik
da69eb4d8c Added submodule N1ghteyes/cpanel-UAPI-php-class
For interacting with cPanel for acceptance tests
2018-02-06 04:40:24 -06:00
Deltik
ec1de555df Bootstrapped Codeception 2018-02-06 04:08:52 -06:00
Deltik
0be41fa7e5 Added Codeception 2018-02-06 03:18:31 -06:00
Deltik
ee19eac05d PHP 7.2 consistency hack in xmlClass::xml2array()
This is a workaround to make the output of xmlClass::xml2array() in PHP
7.2 equal to that of prior PHP versions.

Consider this fix to be a part 2 of #3026.

PHP 7.2 changed the behavior of how we extract tags from
SimpleXMLElement resources.  This hack adds a toleration for either the
PHP 7.2 behavior and the past behavior, which allows consistent parsing
of XML files.

One side effect of this change is the fixing of an innocuous bug that
provided blank values in some "@value" keys that should not have existed
in the first place.  This should hopefully have no practical effect on
current uses of the modified method.

Fixes: #3027
2018-02-05 09:28:57 -06:00
Cameron
e689212e9e Some basic points 2018-02-04 18:54:22 -08:00
Cameron
c32696ae42 Initial working files. 2018-02-04 18:47:24 -08:00
Cameron
21215da3b8 define e_ROOT early in class2.php and remove extra realpath() calls. 2018-02-04 18:43:20 -08:00
Cameron
49f9240465 Initial commit 2018-02-04 15:45:27 -08:00
Cameron
499712f351 Merge pull request #3026 from Deltik/fix-3018
Fixes: #3018 Sanity check in xmlClass::xml2array() for PHP 7.2
2018-02-04 12:33:32 -08:00
Deltik
b0f6cc8aa1 Sanity check in xmlClass::xml2array() for PHP 7.2
Since PHP 7.2, running get_object_vars() on a SimpleXMLElement object
may return sequential arrays rather than nothing if there were no
children.

This commit introduces a sanity check in xmlClass::xml2array() that
ensures child tags are processed rather than sequential array keys.

This sanity check does not affect past major versions of PHP.

Fixes: #3018
Supersedes: #3019
2018-02-04 05:57:54 -06:00
Cameron
203a2423be Merge pull request #3025 from Deltik/fix-3015
Reimplement e_tree_model sorting in pure PHP (with pagination)
Fixes: #3015
Supersedes: #2929
Supersedes: #3016
2018-02-03 11:58:34 -08:00
Cameron
3b909bd4f5 LandingZero tweaks 2018-02-03 10:34:39 -08:00
Cameron
83622aece3 PHP 7 Fix. 2018-02-03 10:34:18 -08: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
Cameron
2469e7c177 Merge pull request #3022 from Deltik/fix-3021
e_pref::update() accepts existing keys with NULL
2018-02-02 13:42:00 -08:00
Cameron
9048c5a3eb Merge pull request #3023 from Deltik/gitignore_for_vim
Added Vim swap files to .gitignore
2018-02-02 13:40:56 -08:00