| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
unused css
|
|
|
|
| |
display issues. Also notifications, etc. are not really useful there
|
| |
|
| |
|
|
|
|
| |
censored channels in the public stream
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Add module test helper expectRedirectTo + api docs
See merge request hubzilla/core!2138
|
| | |
|
| |
| |
| |
| |
| | |
Just a shorthand for manually stubbing `goaway` and setting the
expectations on the test case.
|
| | |
|
|\ \
| |/
|/|
| |
| | |
Add tests for create_identity + fixes
See merge request hubzilla/core!2137
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Not an exhaustive test for now, but does at least excercise some of the
code.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes sure that the system knows whether a transaction is active or
not, and ensures automatic cleanup if the transaction is not closed
before the methods return.
It also allows us to run this code in tests. When run within a test, the
transaction will be ignored, as the entire test is run within an
already existing transaction. Also as each test has their own db
connection, this should not have any ill effects, as there should not be
any way in which different simultaneous connections can interfere with
the db updates.
|
|/
|
|
| |
These stubs are no longer needed, as the tests have a db now.
|
|\
| |
| |
| |
| | |
Refactoring and fixed for Module\Rpost
See merge request hubzilla/core!2136
|
| | |
|
| |
| |
| |
| |
| |
| | |
This eliminates a open redirect issue where it was possible to craft a
link that when clicked would take the victim to an external site
controlled by an attacker.
|
| |
| |
| |
| | |
Mainly missing variables for templates, and channel entries.
|
| | |
|
| |
| |
| |
| | |
Also refactor the tests a bit to avoid duplicatng code.
|
| |
| |
| |
| | |
Move to private function for now.
|
| |
| |
| |
| | |
We don't need to call it twice (actually trice in the original code).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Just a basic test to ensure that the module `get()` method behaves
somewhat reasonable when no query params are given.
Had to make a small change to the Rpost module itself. Since the
`$_SESSION` superglobal may not always be set (and is not in the test),
use `isset` instead of `array_key_exists` to check if we have saved
query params in the session.
In general, isset is safer than array_key_exists if there's a chance
that the array itself may not exist.
|
| |
|
|\
| |
| |
| |
| | |
Add config file and rules for PHP Code Sniffer.
See merge request hubzilla/core!2135
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The rules are based on the "Generic" ruleset included by PHP Code
Sniffer, with a significant portion of the rules disabled. This is a
tradeoff between getting some useful feedback, and not being overloaded
by noise.
I've tried to encode a coe style that resembles the existing code as
much as possible, but have included some sniffs that requires code
changes to satisfy the style. This is meant as a starting point, and we
can disable or enable more sniffs as we see fit.
PHPCS also has ready rule sets for other common coding standards we may
want to gravitate towards, e.g. PSR-12. Others are available from the
community.
The best way to run PHPCS is to integrate it with your editor, so that
it will display diacnostics inline when saving or modifying the code. It
can also be run from the command line like this:
./vendor/bin/phpcs -n [<path-to-file-to-check>]
If no file is specified it will try to check the entire project.
The `-n` means don't bother with warnings (I recommend that to begin
with. Enable the warnings when the errors are taken care of.)
|
|\ \
| | |
| | |
| | |
| | | |
Fix test warnings
See merge request hubzilla/core!2134
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Introduce an intermediate variable when extracting the file type from
the file name. Otherwise we would try to pass a returned value as a
reference.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The `field_select` sub template wants five elements in the `field`
array.
|
| | |
| | |
| | |
| | |
| | | |
Referencing undefined array keys are not allowed anymore, so we need to
check whether they exist first.
|
| |/
| |
| |
| |
| |
| | |
Non-existing keys in the array passed to the template causes a warning.
Also make optional parts of the template actually optional by skipping
them if the value is empty.
|