History log of /dokuwiki/_test/tests/ChangeLog/PageChangeLogTest.php (Results 1 – 3 of 3)
Revision Date Author Comments
# eab6268c 07-Jun-2026 Andreas Gohr <andi@splitbrain.org>

fix(changelog): keep out-of-order external edits out of recent changes (#4634)

A detected external edit is recorded both in the page's own changelog and in
the global recent-changes feed. When its d

fix(changelog): keep out-of-order external edits out of recent changes (#4634)

A detected external edit is recorded both in the page's own changelog and in
the global recent-changes feed. When its date is older than the most recent
change already in the global changelog — an old file surfacing after the feed
has moved on — appending it placed it at the top of recent changes with an old
date, above genuinely newer entries.

writeLogEntry() now delegates the global-feed append to writeGlobalLogEntry(),
which skips an external edit whose date predates the global changelog's
last-modified time. The entry still lands in the page's own changelog; it is
only kept out of the cross-page feed. Normal edits are always appended.

show more ...


# 0a245329 07-Jun-2026 Andreas Gohr <andi@splitbrain.org>

fix(changelog): don't record an external edit when the content is unchanged (#4634)

A current revision's file mtime can change without its content changing — a
backup restore, a git checkout, an in-

fix(changelog): don't record an external edit when the content is unchanged (#4634)

A current revision's file mtime can change without its content changing — a
backup restore, a git checkout, an in-place rewrite. Such a bump was detected
as an external edit and logged with a 0-byte size change, cluttering history.

getCurrentRevisionInfo() now compares the current content against the last
recorded revision before treating an mtime change as an external edit. When the
content is identical no external edit happened: the file mtime is reset to the
recorded revision date and the last revision is returned. The comparison is an
abstract currentContentMatchesRevision() — pages compare the decompressed text,
media compare file size then md5_file().

show more ...


# 2bde879a 07-Jun-2026 Andreas Gohr <andi@splitbrain.org>

Fix diff view comparing a deleted page with itself (#4635)

When opening the diff of a deleted page without explicit rev parameters
(?do=diff), Diff::handle() resolved the older side via getRevisions

Fix diff view comparing a deleted page with itself (#4635)

When opening the diff of a deleted page without explicit rev parameters
(?do=diff), Diff::handle() resolved the older side via getRevisions(0, 1).
That helper only skips the current revision when the item file still
exists, so for a deleted page it returned the deletion entry itself and
the view ended up comparing the current revision with itself ("no way to
compare when less than two revisions", empty diff).

Use getRelativeRevision($rev2, -1) instead, which returns the revision
immediately before the current one regardless of whether the page file
is still present. This covers both pages deleted through DokuWiki and
externally deleted pages (whose synthesized deletion entry is now
persisted to the changelog).

Add PageDiffTest and PageChangeLogTest covering the resolved revision
pair and the underlying changelog walk-back for both deletion kinds.

show more ...