This introduces a logger mechanism and a new data/log directory. This is
a first proof of concept. It's built on top of the new global error
handling mechanism
Things to discuss:
* should we adopt PSR-3 somehow? if yes, how and should plugins be able
to drop-in other psr3 loggers?
* how to configure which facilities shall be logged?
* should we implement a log deletion feature?
* is the log format sensible?
* should we implement a log viewer admin plugin?
* should logging trigger events (it should maybe replace the
deprecation event)
This transfers old style PHP errors into Exceptions and installs a
global exception handler. All exceptions caught by this handler are
logged to an error log and a meassage is shown to the end user. This
should finally get rid of "blank page" bug reports.
The $conf['fperm'] value was checked in multiple files using different methods.
This can cause permission trouble with restricted environments, i.e. when chmod is forbidden and file permissions are non-default.
Now, all checks use implicit cast to boolean which leads to consistent behaviour.
Also, a misleading variable was renamed in context to better understand one of the checks.
* master: (22 commits)
Support "local" subdir when listing the smiley directory
fix zero ID/NS issue with page_findnearest
add ID/NS = '0' test against page_findnearest
fix zero value issue with metadata indexer
add key/value = '0' test to metadata indexer
fix zero ID issue with linkwiz and search indexer
fix zero ID issue with wl() and getID()
add $ID = '0' test against wl() and getID()
cookie.js when setValue‘s value parameter is false delete entry
install.php: respect useacl=0 choice, fixes#2576
cookie.js add def parameter to getValue()
cookie.js convert value type to string
set_doku_pref bugfix, closes#2721
more definition tests of doku_pref, for #1129
add tests for get/set_doku_pref #2721
fix Windows tests for #2702
use absolute URL in index.php when redirecting to doku.php, fixes#2706
Adding "recursive_groups" setting for authad-plugin in configuration-manager
Fix notices when using dw CLI
Fix issue #2396
...
* master:
🐛 (Draft) Fix exception when actually viewing a draft of a page
💡(Draft): Add doc block for constructor
✅ Add unittest for deleteUsers remote API call
fix remote API call dokuwiki.deleteUsers
translation update
🏗 Use json for the response to dw_locktimer
✨(dw_locktimer) plugins may reuse to add fields and callbacks
💄 (editor) draft status is semantically not part of the toolbar
🏗 Create new Draft class and move draft handling there
translation update
correctly avoid notice in init.
avoid creating expensive stacktrace in dbg_deprecated()
add method to EventHandler to check if an event is actually handled
introduce INFO_DEPRECATION_LOG event
There is no need for this check, since these files should not have any
main code that is executed on direct call.
Fixes PSR1.Files.SideEffects.FoundWithSymbols
Exits during testing will break the whole test suite. It makes more
sense to throw an exception in that case. The exception's stack trace
will help to debug the actual problem
The documentation says sessionIDs are between 22 and 256 chars long. A
quick test only showed 26 chars in common configurations, but this
should cover all possibilities.
When an invalid session ID is passed to PHP a warning is thrown, but the
session is still initialized with this invalid ID (throwing additional
warnings on save).
This makes sure such invalid IDs are removed from the cookie array
before initializing the session.
PHP bug references:
https://bugs.php.net/bug.php?id=68063https://bugs.php.net/bug.php?id=73860
Instead of having various function_exists checks all over the place,
this introduces the constants DOKU_HAS_GZIP and DOKU_HAS_BZIP. All
non-3rdparty parts of the code using gz* functions should now check if
zlib is actually available.
In an older version of PHP a file_exists() call would issue a warning
when the file did not exist. This was fixed in later PHP releases. Since
we require PHP 5.3 now, there's no need to supress any error here
anymore. This might even give a minor performance boost.
This commit adds support for X-Forwarded-Proto in case dokuwiki runs
behind a reverse (SSL) proxy, but the connection between the proxy and
the web server running dokuwki is plain HTTP. If an authenticated
user is accidentaly dropped to HTTP from HTTPS the securecookie setting
should be honored and the redirection when saving or canceling a page
edit should point to the correct protocol. This happens every time a
user hits cancel after editing a page, and likely even after saving. If
the webserver doesn't enforce HTTPS the coockie might be sent in clear.