| #
a5debd11 |
| 14-May-2026 |
Andreas Gohr <andi@splitbrain.org> |
remove valid_input_set(), inline the only remaining callers
The Input::valid() method on $INPUT already provides the cleaner API originally requested in #667. The last two callers in Subscribe.php v
remove valid_input_set(), inline the only remaining callers
The Input::valid() method on $INPUT already provides the cleaner API originally requested in #667. The last two callers in Subscribe.php validated against a local $params array (not $_POST/$_GET) and need to throw a specific exception, so inline a small in_array + throw at those call sites rather than carry the legacy helper.
The class could probably be made cleaner but that's beyond the scope of this change.
Closes #667
show more ...
|
| #
71d1aa00 |
| 06-May-2026 |
Andreas Gohr <andi@splitbrain.org> |
Merge pull request #4626 from dokuwiki/flakytest
refactor(changelog): persist external-edit detection on first read
|
| #
15ed40bb |
| 06-May-2026 |
Andreas Gohr <andi@splitbrain.org> |
Merge branch 'searchIndex-finish'
* searchIndex-finish: (143 commits) SearchIndex: fix comment position Replace deprecated idx_addPage/ft_backlinks calls in ApiCoreTest SearchIndex: fix Integr
Merge branch 'searchIndex-finish'
* searchIndex-finish: (143 commits) SearchIndex: fix comment position Replace deprecated idx_addPage/ft_backlinks calls in ApiCoreTest SearchIndex: fix IntegrityTest not re-indexing between tests SearchIndex: remove write side effect from retrieveRow() SearchIndex: fix TypeError when $QUERY global is null SearchIndex: fix TypeError when $highlight is passed uninitialized SearchIndex: increase index version SearchIndex: rector, phpcs, type hint fixes SearchIndex: review fixes — auto-save MemoryIndex, cast TupleOps counts, style cleanups SearchIndex: document Tokenizer::isValidSearchTerm() in concept.txt SearchIndex: unify CollectionSearch API and optimize search pipeline SearchIndex: updated documentation SearchIndex: use FileIndex for title token index SearchIndex: move search() function tests back to tests/inc/search/ SearchIndex: add backward compatibility wrappers SearchIndex: remove legacy intermediate classes from PR #2943 SearchIndex: add integrity checking to Collection architecture SearchIndex: rewrite MetadataSearch to use Collection classes SearchIndex: reorganize and expand test suite SearchIndex: rewrite FulltextSearch to use FrequencyCollectionSearch ...
show more ...
|
| #
01e8d739 |
| 25-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
refactor(changelog): persist external-edit detection on first read
This addresses the flaky test that makes tests randomly fail (mostly on windows runners).
The flake in common_saveWikiText_test::t
refactor(changelog): persist external-edit detection on first read
This addresses the flaky test that makes tests randomly fail (mostly on windows runners).
The flake in common_saveWikiText_test::test_savesequence5 came from this line in ChangeLog::getCurrentRevisionInfo():
'date' => max($lastRev + 1, time() - 1)
The synthesized "external delete" entry was kept in memory only and only persisted later, when saveWikiText next called detectExternalEdit. That meant the formula was evaluated twice on different ChangeLog instances — once during the test's inspection, and again during the following saveWikiText — and the two evaluations could pick different seconds depending on how long the surrounding I/O took. The test cached the first result in $expectExternal and asserted it against the on-disk entry written during the second call. On the slower Windows runner the second call sometimes crossed a second boundary, producing the off-by-one date mismatch.
The questions I had was, why are we persisting external file deletions (or edits) only when a page is saved when we are obviously already detecting it earlier during the changelog read already?
Instead of recording the external delete at the time a new page is written, it makes sense to record it as soon as we detect it (when the changelog is requested by a user or a bot). This will make the recoded timestamp closer to the actual deletion.
This patch refactors the changelog accordingly, but still tries to be minimal invasive (I think the changelog handling would need much more refactoring, but that's beyond the scope of this change).
To enable proper locking (when logging an external edit and copying the attic file), locking had to be moved to the Changelog class, duplicating some code of io_saveFile.
PageFile::detectExternalEdit() and the deprecated procedural wrapper detectExternalEdit() in inc/common.php are removed. A codesearch.dokuwiki.org check confirmed no plugin calls the method directly; the only external caller of the procedural function is the farmsync plugin, which needs a parallel update.
show more ...
|
| #
85cddb53 |
| 18-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
Merge branch 'client_ip_header'
* client_ip_header: Clean up stale realip references after client_ip_header rename remove realip option, add default in conf/dokuwiki.php convert tests to data
Merge branch 'client_ip_header'
* client_ip_header: Clean up stale realip references after client_ip_header rename remove realip option, add default in conf/dokuwiki.php convert tests to data provider add comment to the real-ip test add custom client_ip_header
show more ...
|
| #
90c2f6e3 |
| 18-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
Clean up stale realip references after client_ip_header rename
Update docblocks in Ip.php and common.php, fix old tests to use the new config key, remove outdated translations, fix method casing in
Clean up stale realip references after client_ip_header rename
Update docblocks in Ip.php and common.php, fix old tests to use the new config key, remove outdated translations, fix method casing in test, and add example to English config description.
show more ...
|
| #
db8be586 |
| 08-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: review fixes — auto-save MemoryIndex, cast TupleOps counts, style cleanups
- MemoryIndex: auto-save dirty data on unlock/destruction to prevent silent index corruption when indexes ar
SearchIndex: review fixes — auto-save MemoryIndex, cast TupleOps counts, style cleanups
- MemoryIndex: auto-save dirty data on unlock/destruction to prevent silent index corruption when indexes are used in tandem - TupleOps::parseTuples(): cast exploded count strings to int - FileIndex::retrieveRow(): document the write-on-read padding behavior - Fix whitespace issues in ApiCore, common.php, Sitemap/Mapper - Update concept.txt to reflect MemoryIndex auto-save behavior
show more ...
|
| #
6734bb8c |
| 07-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
SearchIndex: rewrite MetadataSearch to use Collection classes
Replace MetadataIndex usage in MetadataSearch with the new Collection/Index architecture. This completes the read-path migration so data
SearchIndex: rewrite MetadataSearch to use Collection classes
Replace MetadataIndex usage in MetadataSearch with the new Collection/Index architecture. This completes the read-path migration so data written by the Collection-based Indexer is read back correctly using TupleOps tuple format.
Generalize FrequencyCollectionSearch into CollectionSearch that works with any AbstractCollection type (Frequency, Lookup, Direct) and handles both split-by-length and non-split index layouts transparently. DirectCollection participates via resolveTokenFrequencies() which maps token RID = entity RID.
Key changes: - AbstractCollection gains isSplitByLength(), resolveTokenFrequencies(), getEntitiesWithData(), and groupToSuffix() with validation - Index groups are now int (0 = non-split, positive = token length) - CollectionSearch provides both addTerm()/execute() for fulltext and lookup() for metadata-style search (exact/wildcard/callback) - MetadataSearch delegates entirely to collection APIs - Shared filterPages() replaces duplicated page filtering logic - All callers updated from MetadataIndex to MetadataSearch - Tests moved to Search namespace with full coverage for new APIs
show more ...
|
| #
7f394dd6 |
| 05-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
Merge branch 'master' into searchIndex-finish
* master: (55 commits) Translation update (pt-br) Bump phpseclib/phpseclib from 3.0.49 to 3.0.50 Update deleted files strict value comparison
Merge branch 'master' into searchIndex-finish
* master: (55 commits) Translation update (pt-br) Bump phpseclib/phpseclib from 3.0.49 to 3.0.50 Update deleted files strict value comparison in auth session check. fixes #4602 Translation update (pt-br) Translation update (pt-br) remove utf8_encode() from authad plugin todo checker action: ignore vendor updated rector and applied it removed another php 7.4 workaround removed an old PHP 5 workaround in HTTPClient remove checks for mbstring.func_overload removed php 8 polyfills ignore HTML validation issue with skipped headline levels declare PrefCookie constant visibility update slika which fixes another php 8.5 deprecation issue fix http tests fix destructuring false returns from changelog functions avoid using null as cache key Fix deprecation warning in UTF8/Conversion ...
show more ...
|
| #
093fe67e |
| 07-Mar-2026 |
Andreas Gohr <andi@splitbrain.org> |
updated rector and applied it
|
| #
9df9f0c8 |
| 27-Oct-2025 |
Andreas Gohr <gohr@cosmocode.de> |
Merge branch 'master' into searchIndex-finish
There were a lot of conflicts to resolve. Not all of them may have been resolved correctly...
* master: (1094 commits) Login accessibility improvemen
Merge branch 'master' into searchIndex-finish
There were a lot of conflicts to resolve. Not all of them may have been resolved correctly...
* master: (1094 commits) Login accessibility improvements Translation update (it) translation update translation update translation update translation update translation update translation update translation update translation update translation update translation update translation update translation update Remove HTML from strings based on title and tagline SECURITY: fix XSS vulnerability. fixes #4512 translation update Fix typos in usermanager English strings Replace hardcoded message by localized string set DOKU_INC in rector ...
show more ...
|
| #
3f108b37 |
| 23-Oct-2025 |
Andreas Gohr <gohr@cosmocode.de> |
refactor preference cookie handling. fixes #4544
This refactors the DOKU_PREF cookie handling on the PHP side into a class. It makes encoding/decoding more explicit and easier to understand.
The ne
refactor preference cookie handling. fixes #4544
This refactors the DOKU_PREF cookie handling on the PHP side into a class. It makes encoding/decoding more explicit and easier to understand.
The new class is used in set_doku_pref() and get_doku_pref() which have not been deprecated for now.
show more ...
|
| #
33cb4e01 |
| 03-Jun-2025 |
Andreas Gohr <gohr@cosmocode.de> |
Make is_ssl and baseurl use proper proxy checks
This should not only address #4455 but also ensures that the related headers are only used when they come from a trusted reverse proxy chain.
|
| #
564b5cbf |
| 13-Jan-2025 |
Andreas Gohr <andi@splitbrain.org> |
Merge pull request #4389 from dokuwiki/buildquery
use http_build_query() in buildURLparams()
|
| #
98b599a6 |
| 09-Jan-2025 |
splitbrain <86426+splitbrain@users.noreply.github.com> |
Rector and PHPCS fixes
|
| #
d5dd5d1b |
| 09-Jan-2025 |
Andreas Gohr <andi@splitbrain.org> |
use renamed trustedproxies setting in tests
|
| #
2f828abf |
| 09-Jan-2025 |
Andreas Gohr <andi@splitbrain.org> |
style fix
|
| #
2aba9aed |
| 09-Jan-2025 |
Andreas Gohr <andi@splitbrain.org> |
Merge branch 'pr/3815' into clientIP
* pr/3815: Move IP functions into a class Factor out IP address functions; all proxies must be trusted Fix clientIP() returning the wrong address
|
| #
6cc6a0d2 |
| 09-Jan-2025 |
Andreas Gohr <andi@splitbrain.org> |
use http_build_query() in buildURLparams()
buildURLparams() is used all throughout the code, but its implementation was overly simplistic. This changes it to use the much better builtin http_build_q
use http_build_query() in buildURLparams()
buildURLparams() is used all throughout the code, but its implementation was overly simplistic. This changes it to use the much better builtin http_build_query() function. This allows for correct encoding of array values or deeper nested structures.
show more ...
|
| #
8407f251 |
| 02-Dec-2024 |
splitbrain <86426+splitbrain@users.noreply.github.com> |
Rector and PHPCS fixes
|
| #
53c68e5c |
| 22-Nov-2024 |
Andreas Gohr <andi@splitbrain.org> |
replace deprecated utf8_encode #4354
|
| #
8b19906e |
| 30-Oct-2024 |
Andreas Gohr <andi@splitbrain.org> |
change use order for codesniffer happyness
|
| #
b3894732 |
| 30-Oct-2024 |
splitbrain <86426+splitbrain@users.noreply.github.com> |
Rector and PHPCS fixes
|
| #
db926724 |
| 26-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
Replace strftime with Intl ICU. Fixes #3573
This uses a class that maps strftime placeholders to the appropriate ICU patterns. I am using the fallback-intl branch here which provides an English-only
Replace strftime with Intl ICU. Fixes #3573
This uses a class that maps strftime placeholders to the appropriate ICU patterns. I am using the fallback-intl branch here which provides an English-only fallback when the intl extension is not available.
Core has only two places where strftime is used: dformat() and the SimplePie feed parser. Both are adjusted with this patch. For the latter a custom Item class had to be registered. For better separation all our FeedParser classes have been moved to the Feed namespace where our FeedCreator classes already reside.
Note that this will currently be a degration for users without intl as it will fall back to date and not to the still available strftime.
show more ...
|
| #
5f21556d |
| 26-May-2023 |
Damien Regad <dregad@mantisbt.org> |
Fix undefined array key warning
|