Commit Graph

9753 Commits

Author SHA1 Message Date
Guy Brand d0fffb7922 Release 2018-04-22 "Greebo" 2018-04-22 13:17:57 +02:00
Guy Brand a08ab6e8bb Merge branch 'master' into stable 2018-04-22 13:15:03 +02:00
Guy Brand 8ca3665ea1 Release preparation 2018-04-22 13:14:09 +02:00
Andreas Gohr 6273596f37
Merge pull request #2323 from splitbrain/recenttypefix
Honor type setting for recent changes. fixes #2322
2018-04-20 17:54:22 +02:00
Phy 8b05b1f0c2
Merge pull request #2324 from dokuwiki-translate/lang_update_811_1524231868
Translation update (fr)
2018-04-20 22:46:20 +08:00
Schplurtz le Déboulonné 8591ce1627 translation update 2018-04-20 15:46:37 +02:00
Andreas Gohr e009a94f2a Honor type setting for recent changes. fixes #2322 2018-04-20 12:28:32 +02:00
Andreas Gohr 6ea61f3919
Merge pull request #2314 from splitbrain/fix-html
Fix invalid HTML
2018-04-20 11:59:18 +02:00
Michael Große 8225e1abb8
fix(search): don't start result position with 2
Also, for consistency this initializes also $num with 0, while ensuring
that the first FT_SNIPPET_NUMBER results with a $cnt>0 have a snippet.
2018-04-20 11:26:02 +02:00
Michael Große f0861d1ffe
refactor(search): clearer data flow 2018-04-20 11:24:01 +02:00
Anika Henke b12bcb7787 Change spacing in search meta data to punctuation
Punctuation is more natural, makes sense with CSS switched off
and makes screenreaders add a little pause.
2018-04-19 23:38:05 +01:00
Andreas Gohr d438841c57
Merge pull request #2319 from dokuwiki-translate/lang_update_807_1524003427
Translation update (de)
2018-04-18 08:43:38 +02:00
Michael Bohn ad75ad5897 translation update 2018-04-18 00:21:27 +02:00
Phy 184e067aa8
Merge pull request #2318 from dokuwiki-translate/lang_update_806_1523983618
Translation update (es)
2018-04-18 01:30:37 +08:00
Domingo Redal 58332f92e5 translation update 2018-04-17 18:51:47 +02:00
Michael Große 6d55fda7de
Fix(search): restore valid heading hierarchy
In #2286 the 2nd level heading in the intro was removed, so the h3
should be promoted to h2.
2018-04-17 10:49:07 +02:00
Michael Große 78d786c9ee
fix(search): add position to fulltext results event 2018-04-17 10:47:51 +02:00
Michael Große 5d06a1e4c8
fix(search): ensure consistent html in search results
This implements some of the changes discussed in #2314:

1. last mod and number of hits are on the same line and always shown
2. There is a class around the last mod string so it can be
hidden/replaced by an icon
3. All items in the resultBody returned by the event are wrapped in
`<dd>` tags to ensure validity. They get their array key as class
4. There is still a wrapper div around each result for styling purposes
2018-04-17 10:41:03 +02:00
Phy 85aeb206fd
Merge pull request #2316 from dokuwiki-translate/lang_update_804_1523948226
Translation update (ru)
2018-04-17 15:11:35 +08:00
Yuriy Skalko 85d672d0ac translation update 2018-04-17 09:01:20 +02:00
Anika Henke 7c15eaa296 Fix invalid HTML in search results
Recent changes to the search results page added various divs
to the pre-existing description list, which is invalid.
This fixes that by a) removing a couple of unnecessary elements
and b) interpret the 'last modified' line as another 'dd'.
2018-04-15 15:40:38 +01:00
Anika Henke 5d021066fe Fix links with invalid empty target attributes
The advanced search options list links with an invalid empty target
attribute. This fixes that by skipping empty parameters.
2018-04-15 15:40:31 +01:00
Andreas Gohr 0387686cd6
Merge pull request #2307 from splitbrain/geshi_features
Geshi Option parsing
2018-04-15 15:47:31 +02:00
Andreas Gohr 8a005008a6
Merge pull request #2312 from splitbrain/seceditfallback
fallback for new section editing. fixes #2311
2018-04-15 15:46:52 +02:00
Anika Henke 7dfce4513e Fix buttons with invalid empty name attributes
The search buttons from the search form on the top of the page
as well as the search page both produce invalid HTML
due to the name attribute being empty.
As the name is required for each of the PHP functions
producing the buttons and is passed as an empty string,
this makes sure that parameters with empty strings get skipped.
2018-04-15 14:45:56 +01:00
Andreas Gohr 5ae261c2d0
Merge pull request #2313 from splitbrain/secedit_escaping
Prevent HTML and JS injection in section names
2018-04-15 15:45:41 +02:00
Michael Hamann ada0d779ee Prevent HTML and JS injection in section names
Before this change, HTML and some JS code (as far as it was not escaped
by json_encode) could be injected into the output as the closing pattern
that is checked by the regex is not escaped in JSON (see test case).
2018-04-15 13:44:17 +02:00
Andreas Gohr ac025fdf5b fallback for new section editing. fixes #2311
The displayed message now shows the target that was passed, which should
help identifying the troubling plugin.

Instead of failing, we fix the data ourselves - this code will be
removed in the future.
2018-04-14 08:50:30 +02:00
Andreas Gohr 75c3272ad9
Merge pull request #2309 from splitbrain/fix204HTTPResult
DokuHTTPClient: Add handling for 204: No Content responses
2018-04-14 08:26:50 +02:00
Andreas Gohr 62035cbb5e
Merge pull request #2310 from dokuwiki-translate/lang_update_802_1523641083
Translation update (hr)
2018-04-13 23:10:00 +02:00
Davor Turkalj 7d515db4eb translation update 2018-04-13 19:41:40 +02:00
Michael Große 079e01378e
fix(HTTPClient): add handling for 204: No Content responses
This fixes a bug that would occur if the DokuHTTPClient receives a 204
response, e.g. as a result for a request to delete something. It would
still try to read the body, which fails, thus producing a timeout and
finally throwing an exception.

This fix instructs the HTTPClient to not read the (not existing) body if
it receives a 204.
2018-04-13 15:49:21 +02:00
Andreas Gohr a851f92d60 manual GeSHi patch applied
monkey patched GeSHi/geshi-1.0#104
2018-04-13 10:56:21 +02:00
Andreas Gohr 54f741e882 relax geshi options a bit more
Quotes are now optional, the options are spearated by space
2018-04-13 10:40:01 +02:00
Andreas Gohr 40bf4d4d5b
Merge pull request #2306 from splitbrain/fixPageLookupDisplay
bring back the namespace in braces for pagelookup results
2018-04-13 10:35:14 +02:00
Andreas Gohr a31af5935d Merge branch 'private_testing' into geshi_features
* private_testing: (375 commits)
  make testing of inaccessible methods easier
  updated composer dependencies
  renamed ActionRouter::checkPermissions to checkPreconditions
  shortened new search configs
  Section edit: corrected pattern 'SEC_EDIT_PATTERN'
  fix regex character class. fixes #2301
  fix: switch extensions if stylesheet in style.ini doesn't exist
  refactor: rename and move function to set $JSINFO
  typo. capital P for class name
  fix: add missing global $ACT for $JSINFO
  refactor: use native json_encode for $JSINFO
  refactor: rename JSINFO.DOKU_UHN and JSINFO.DOKU_UHC
  refactor: extract $JSINFO initialization into tpl_ function
  refactor: rename dta and dtb parameters
  doc(search): parameter must be string or false
  doc(search): highlight is expected to be an array
  show adavanced tools with JavaScript only
  adjusted language files to remove outdated string
  removed sub header from all languages
  added aria attributes
  ...
2018-04-13 09:08:58 +02:00
Andreas Gohr 210ff13322 make testing of inaccessible methods easier
While it's generally frowned upon testing privates, it can often be
useful and the easier way to write tests. Eg you want to test something
complicated method that is important, but you do not want to expose it
directly to other classes...

This new method uses reflection to make access to such methods possible
from within tests without the need for intermediate classes.
2018-04-13 09:06:27 +02:00
Andreas Gohr 43d3f077ff updated composer dependencies 2018-04-13 08:37:14 +02:00
Michael Große 5d87aa31a6
fix: bring back the namespace in brace for pagelookup results
This was unintentionally removed in
4eab6f7c40

It also should now be clearer what the code does.

This fixes #2305
2018-04-13 08:35:05 +02:00
Andreas Gohr b2c9cd19ff renamed ActionRouter::checkPermissions to checkPreconditions
As discussed in #1933
2018-04-12 15:36:43 +02:00
Andreas Gohr 13ce475d48 shortened new search configs
shorter names are more in line with what we already use, makes less
layout problems in the documentation and is easier to type when telling
people about it.
2018-04-11 14:39:04 +02:00
LarsDW223 37c80e0e93 Section edit: corrected pattern 'SEC_EDIT_PATTERN'
This fixes broken nested section edit buttons which were causing
invalid HTML code. The pattern has to be 'not greedy'. Fixes #2304.
2018-04-10 20:39:30 +02:00
Andreas Gohr fcbc6130e8
Merge pull request #2300 from splitbrain/cssLessFallback
switch extensions if stylesheet in style.ini doesn't exist (backwards compatibility)
2018-04-05 17:01:27 +02:00
Andreas Gohr 5a1650175a fix regex character class. fixes #2301 2018-04-05 16:58:28 +02:00
Michael Große 432cf0d1b5
fix: switch extensions if stylesheet in style.ini doesn't exist
This should give us some backwards compatibility for changing files in
dokuwiki template from .css to .less

This way template authors get a warning to adjust their template, it
won't break right away.

This should prevent breaking search pages in other templates due to
pull request #2286 .
2018-04-05 11:23:42 +02:00
Andreas Gohr d9e82b09c1
Merge pull request #2190 from splitbrain/betterJSINFO
feat: canonically provide $ACT to javascript
2018-04-05 10:31:27 +02:00
Michael Große 0c39d46cf5
refactor: rename and move function to set $JSINFO
This is a more consistent place relative to pageinfo()
2018-04-05 10:13:08 +02:00
Andreas Gohr 874fc8d335
Merge pull request #2168 from splitbrain/cli
New CLI Plugin Type
2018-04-05 09:58:15 +02:00
Andreas Gohr 7ba28776db typo. capital P for class name 2018-04-05 09:56:20 +02:00
Michael Große 5c0b2e60a2
Merge pull request #2286 from splitbrain/betterCoreSearch
Better core search
2018-04-05 09:51:45 +02:00