Searched hist:"6372 bc80cf66844189fb35b36624654d095e5f9b" (Results 1 – 3 of 3) sorted by relevance
| /dokuwiki/_test/tests/ChangeLog/ |
| H A D | PageChangeLogTest.php | 6372bc80cf66844189fb35b36624654d095e5f9b Mon Jul 06 10:54:49 UTC 2026 Andreas Gohr <gohr@cosmocode.de> fix(changelog): detect an externally restored deleted page as a re-creation
A deleted page restored outside DokuWiki with a preserved mtime predating the deletion (cp -p from an old backup, rsync --times) has content matching the delete revision's attic copy. That copy holds the pre-delete content, so the unchanged-content shortcut in getCurrentRevisionInfo() wrongly treated the restore as an unchanged file, touched the mtime back to the delete revision and kept the DELETE as the current revision. The page then stayed "deleted" on every subsequent read.
A last recorded revision of type DELETE means the page did not exist then, so an existing file is an external re-creation regardless of its mtime. getCurrentRevisionInfo() now classifies the external change and delegates to synthesizeExternalDeletion/synthesizeExternalCreate/synthesizeExternalEdit; only the edit path keeps the unchanged-content shortcut. A re-creation records the full file as its size change and, when the restored mtime predates the delete, is dated just after it with an unknown date.
The getCurrentRevisionInfo() method got rather unwieldy, so it was refactored to use three helper methods, for synthesizing the changelog data.
|
| /dokuwiki/_test/tests/inc/ |
| H A D | common_saveWikiText.test.php | 6372bc80cf66844189fb35b36624654d095e5f9b Mon Jul 06 10:54:49 UTC 2026 Andreas Gohr <gohr@cosmocode.de> fix(changelog): detect an externally restored deleted page as a re-creation
A deleted page restored outside DokuWiki with a preserved mtime predating the deletion (cp -p from an old backup, rsync --times) has content matching the delete revision's attic copy. That copy holds the pre-delete content, so the unchanged-content shortcut in getCurrentRevisionInfo() wrongly treated the restore as an unchanged file, touched the mtime back to the delete revision and kept the DELETE as the current revision. The page then stayed "deleted" on every subsequent read.
A last recorded revision of type DELETE means the page did not exist then, so an existing file is an external re-creation regardless of its mtime. getCurrentRevisionInfo() now classifies the external change and delegates to synthesizeExternalDeletion/synthesizeExternalCreate/synthesizeExternalEdit; only the edit path keeps the unchanged-content shortcut. A re-creation records the full file as its size change and, when the restored mtime predates the delete, is dated just after it with an unknown date.
The getCurrentRevisionInfo() method got rather unwieldy, so it was refactored to use three helper methods, for synthesizing the changelog data.
|
| /dokuwiki/inc/ChangeLog/ |
| H A D | ChangeLog.php | 6372bc80cf66844189fb35b36624654d095e5f9b Mon Jul 06 10:54:49 UTC 2026 Andreas Gohr <gohr@cosmocode.de> fix(changelog): detect an externally restored deleted page as a re-creation
A deleted page restored outside DokuWiki with a preserved mtime predating the deletion (cp -p from an old backup, rsync --times) has content matching the delete revision's attic copy. That copy holds the pre-delete content, so the unchanged-content shortcut in getCurrentRevisionInfo() wrongly treated the restore as an unchanged file, touched the mtime back to the delete revision and kept the DELETE as the current revision. The page then stayed "deleted" on every subsequent read.
A last recorded revision of type DELETE means the page did not exist then, so an existing file is an external re-creation regardless of its mtime. getCurrentRevisionInfo() now classifies the external change and delegates to synthesizeExternalDeletion/synthesizeExternalCreate/synthesizeExternalEdit; only the edit path keeps the unchanged-content shortcut. A re-creation records the full file as its size change and, when the restored mtime predates the delete, is dated just after it with an unknown date.
The getCurrentRevisionInfo() method got rather unwieldy, so it was refactored to use three helper methods, for synthesizing the changelog data.
|