Commit Graph

11098 Commits

Author SHA1 Message Date
Satoshi Sahara 057cd77551 more narrow jQuery selector to rev2[] checkbox
This fix enables to use disabled checkbox for non-existing revision page or media file in the HTML form of Ui\Revisions.
2020-08-18 14:57:44 +09:00
Giuseppe Di Terlizzi bcdf03d0e0
Optimized pageRestoreConfirm function 2020-08-17 15:49:50 +02:00
Moisés Braga Ribeiro d0fecb18d0 Tests for Portuguese and Spanish
Collations for Portuguese and Spanish; examples for Portuguese; better comments
2020-08-17 09:08:04 -03:00
Moisés Braga Ribeiro 0489c64b7d Changes according to revisions in https://github.com/moisesbr-dw/dokuwiki/pull/2
Many minor details and use of Sort::xyz() instead of intl_xyz() in files outside the "inc" folder.
2020-08-16 18:29:42 -03:00
Moisés Braga Ribeiro ec16ab528f
Merge pull request #2 from splitbrain/pr-3115
Changes for the collator-based sort: sort functions as static methods; better testing
2020-08-16 03:22:17 -03:00
Satoshi Sahara 21b96b634a shorten Ui\Recent::show(), split out sub methods
Requrie *PHP7*, using anonymous class in Ui\Recent::getObjRevInfo()
2020-08-15 09:59:20 +09:00
Andreas Gohr 697ca7e2e1 fixed plugin name output on load error 2020-08-13 20:32:17 +02:00
Andreas Gohr cad4fbf6e2 added logging configuration
Log facitlities can now be disabled. By default only debug is disabled.
It might make sense to by default disable deprecated as well?

Debug logging is now independend of the allowdebug method. allowdebug
was often used in two ways: for displaying errors directly to the user
and for logging to the debug log. Now it only controls the former.
2020-08-13 20:28:52 +02:00
Andreas Gohr 31667ec678 replaced out calls to dbglog with new Logger calls 2020-08-13 20:04:34 +02:00
Andreas Gohr c205039322 added convenience methods to log to our default facilities 2020-08-13 20:03:41 +02:00
Andreas Gohr 70cc2cbf41 added logviwer admin plugin
This allows for easy viewing of the available logs.

The log format was sligthly adjusted again for easier parsing.
2020-08-13 19:48:45 +02:00
Andreas Gohr b97865bf6f adjust callstack depth for deprecation message further 2020-08-13 16:52:17 +02:00
Andreas Gohr 5b784a2b83 added log dir to git 2020-08-13 13:52:35 +02:00
Andreas Gohr e4aa0139d5 better deprecation messages for self required plugin base files 2020-08-13 13:40:39 +02:00
Andreas Gohr 0ecde6ce23 central logging mechanism
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)
2020-08-13 13:28:40 +02:00
Satoshi Sahara 83f8872c29 use $INPUT instead of $_SERVER 2020-08-13 13:54:48 +09:00
Satoshi Sahara 2c210ad72a split out two form creation methods of ResendPwd
we can use prefillInput feature of InputElement class, no need to refer $INPUT in formResendPassword()
2020-08-13 12:34:10 +09:00
Andreas Gohr 51c1fbb36b no need to convert Errors to Exceptions
we handle Throwables anyway
2020-08-12 17:42:26 +02:00
Andreas Gohr dbe0790d4c FatalException and proper plugin detection
Using our own Exception makes it easier to differentiate fatal errors
from others in the log
2020-08-12 17:42:26 +02:00
Andreas Gohr cb4cefebb3 add shutdown handler to even manage fatal errors
We can't catch some errors and they are not passed to the error_handler
either. But we can at least react to them in a shutdown function to show
a friendly message to the user and write our log.
2020-08-12 17:42:26 +02:00
Andreas Gohr 03e8a69a1e reflow overlong line 2020-08-12 17:42:26 +02:00
Andreas Gohr ffa84f8121 better exception handling on plugin loading
Now all important places where plugins are loaded are guarded by a
try/except. We're catching Throwables here to be able to catch stuff
like syntax errors early on (otherwise they will only be caught by our
ErrorConverter much too late). This means that this change requires PHP
7.0 minimum!
2020-08-12 17:42:26 +02:00
Andreas Gohr 0e69c9aff9 log stacktrace to error log
Ultimately the one responsible for fixing the problem will need this
anyway. Better log it right away for (hopefully) better bug reports
2020-08-12 17:42:26 +02:00
Andreas Gohr 7e0b27f2ad guess which plugin was the source of an exception
This looks at filenames and classes involved in the stacktrace to see if
a plugin is referenced.

We're only guessing plugins here, because looking for templates may
cause false positives where templates load plugins.
2020-08-12 17:42:26 +02:00
Andreas Gohr 642e976cb6 introduce a global error handler
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.
2020-08-12 17:42:26 +02:00
Andreas Gohr 04225b4a35 don't test on old PHP releases anymore 2020-08-12 17:41:18 +02:00
Andreas Gohr 3f874cb397 increase minimum PHP version to 7.2 2020-08-12 17:39:37 +02:00
Andreas Gohr 24486f8c92 fixed tests for cleanID and romanization for Greeklish 2020-08-12 16:47:08 +02:00
sintoris 1fa01e4a55 Improved the transliteration from greek to latin.
The patched version covers all greek letters and creates "greeklish" filenames
which use only roman letters and which are very readable to greek language
speakers.
2020-08-12 15:47:30 +02:00
Andreas Gohr be15e51634 extension cli: do not try to upgrade bundled plugins
fixes #3227
2020-08-12 12:23:50 +02:00
Andreas Gohr 15b886048c
Merge pull request #3228 from annda/externallink-getter
Public access to patterns in external link parser
2020-08-12 12:05:53 +02:00
Anna Dabrowska 5c99934fa4 Public access to patterns in external link parser 2020-08-12 09:53:38 +02:00
Andreas Gohr f9aa34a374 test the collator fallback always
Now the use of the intl extension can be turned off, allowing for easy
testing of the fallback. The test now inherits from the collator test so
we avoid too much duplicate code
2020-08-11 15:09:56 +02:00
Andreas Gohr 5d9cb4e188 cleanup for collator tests
The proper use of data providers now make it much easier to add
addtional languages to the test
2020-08-11 14:48:56 +02:00
Andreas Gohr 2d85e84158 wrap sorting functions into their own class 2020-08-11 14:06:33 +02:00
Giuseppe Di Terlizzi 7ac45fff3c Merge branch 'revert-confirm' into master 2020-08-10 23:59:47 +02:00
Giuseppe Di Terlizzi a802fe3c55 Added confirmation dialog for page tools Revert action 2020-08-10 23:52:24 +02:00
Andreas Gohr 95b3bb8b3c
Merge pull request #3211 from rojenzaman/patch-1
"ı" character added to loweraccents.php
2020-08-10 15:28:57 +02:00
Henry Pan 78c3ba52a3
Merge pull request #3225 from dokuwiki-translate/lang_update_115_1596951590
Translation update (cs)
2020-08-09 10:36:06 -04:00
Petr Kajzar b0760ac247 translation update 2020-08-09 07:41:12 +02:00
Henry Pan be2e5391a8
Merge pull request #3223 from dokuwiki-translate/lang_update_114_1596786248
Translation update (zh)
2020-08-08 10:53:28 -04:00
Jenxi cce551cd93 translation update 2020-08-07 09:46:12 +02:00
Henry Pan d7fa198e5e
Merge pull request #3220 from dokuwiki-translate/lang_update_112_1596625609
Translation update (sk)
2020-08-05 12:27:38 -04:00
Henry Pan a4f0b56ccf
Merge pull request #3221 from dokuwiki-translate/lang_update_113_1596633038
Translation update (sk)
2020-08-05 12:27:07 -04:00
Martin Michalek 67f1a0c115 translation update 2020-08-05 15:16:44 +02:00
Martin Michalek b9b72303a4 translation update 2020-08-05 13:11:42 +02:00
Henry Pan 9d39854e66
Merge pull request #3219 from dokuwiki-translate/lang_update_111_1596591740
Translation update (zh-tw)
2020-08-04 21:59:22 -04:00
GHSRobert Ciang fa33bdca3c translation update 2020-08-05 03:46:04 +02:00
Henry Pan e44ac5969a
Merge pull request #3213 from dokuwiki-translate/lang_update_109_1596119359
Translation update (ru)
2020-07-30 13:17:14 -04:00
Henry Pan 2db00dfc24
Merge pull request #3214 from dokuwiki-translate/lang_update_110_1596122861
Translation update (pt)
2020-07-30 13:16:09 -04:00