[ Index ]

PHP Cross Reference of DokuWiki




/inc/File/ -> PageFile.php (summary)

(no description)

File Size: 330 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PageFile:: (8 methods):

Class: PageFile  - X-Ref

Class PageFile : handles wiki text file and its change management for specific page

__construct($id)   X-Ref
PageFile constructor.

param: string $id

getId()   X-Ref
No description

getPath($rev = '')   X-Ref
No description

rawWikiText($rev = null)   X-Ref
Get raw WikiText of the page, considering change type at revision date
similar to function rawWiki($id, $rev = '')

return: string
param: int|false $rev  timestamp when a revision of wikitext is desired

saveWikiText($text, $summary, $minor = false)   X-Ref
Saves a wikitext by calling io_writeWikiPage.
Also directs changelog and attic updates.

author: Andreas Gohr <andi@splitbrain.org>
author: Ben Coburn <btcoburn@silicodon.net>
return: array|void data of event COMMON_WIKIPAGE_SAVE
param: string $text     wikitext being saved
param: string $summary  summary of text update
param: bool   $minor    mark this saved version as minor update

detectExternalEdit()   X-Ref
Checks if the current page version is newer than the last entry in the page's changelog.
If so, we assume it has been an external edit and we create an attic copy and add a proper
changelog line.

This check is only executed when the page is about to be saved again from the wiki,
triggered in @see saveWikiText()

saveOldRevision()   X-Ref
Moves the current version to the attic and returns its revision date

author: Andreas Gohr <andi@splitbrain.org>
return: int|string revision timestamp

updateMetadata(array $logEntry)   X-Ref
Update metadata of changed page

param: array $logEntry  changelog entry