[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
Changelog handling functions
Author: | Andreas Gohr |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
File Size: | 372 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
parseChangelogLine($line) X-Ref |
parses a changelog line into it's components param: string $line changelog line author: Ben Coburn <btcoburn@silicodon.net> return: array|bool parsed line or false |
addLogEntry($date,$id,$type = DOKU_CHANGE_TYPE_EDIT,$summary = '',$extra = '',$flags = null,$sizechange = null) X-Ref |
Adds an entry to the changelog and saves the metadata for the page Note: timestamp of the change might not be unique especially after very quick repeated edits (e.g. change checkbox via do plugin) param: int $date Timestamp of the change param: String $id Name of the affected page param: String $type Type of the change see DOKU_CHANGE_TYPE_* param: String $summary Summary of the change param: mixed $extra In case of a revert the revision (timestamp) of the reverted page param: array $flags Additional flags in a key value array. param: null|int $sizechange Change of filesize author: Andreas Gohr <andi@splitbrain.org> author: Esther Brunner <wikidesign@gmail.com> author: Ben Coburn <btcoburn@silicodon.net> |
addMediaLogEntry($date,$id,$type = DOKU_CHANGE_TYPE_EDIT,$summary = '',$extra = '',$flags = null,$sizechange = null) X-Ref |
Adds an entry to the media changelog param: int $date Timestamp of the change param: String $id Name of the affected page param: String $type Type of the change see DOKU_CHANGE_TYPE_* param: String $summary Summary of the change param: mixed $extra In case of a revert the revision (timestamp) of the reverted page param: array $flags Additional flags in a key value array. param: null|int $sizechange Change of filesize author: Michael Hamann <michael@content-space.de> author: Andreas Gohr <andi@splitbrain.org> author: Esther Brunner <wikidesign@gmail.com> author: Ben Coburn <btcoburn@silicodon.net> |
getRecents($first, $num, $ns = '', $flags = 0) X-Ref |
returns an array of recently changed files using the changelog The following constants can be used to control which changes are included. Add them together as needed. RECENTS_SKIP_DELETED - don't include deleted pages RECENTS_SKIP_MINORS - don't include minor changes RECENTS_ONLY_CREATION - only include new created pages and media RECENTS_SKIP_SUBSPACES - don't include subspaces RECENTS_MEDIA_CHANGES - return media changes instead of page changes RECENTS_MEDIA_PAGES_MIXED - return both media changes and page changes param: int $first number of first entry returned (for paginating param: int $num return $num entries param: string $ns restrict to given namespace param: int $flags see above author: Ben Coburn <btcoburn@silicodon.net> author: Kate Arzamastseva <pshns@ukr.net> return: array recently changed files |
getRecentsSince($from, $to = null, $ns = '', $flags = 0) X-Ref |
returns an array of files changed since a given time using the changelog The following constants can be used to control which changes are included. Add them together as needed. RECENTS_SKIP_DELETED - don't include deleted pages RECENTS_SKIP_MINORS - don't include minor changes RECENTS_ONLY_CREATION - only include new created pages and media RECENTS_SKIP_SUBSPACES - don't include subspaces RECENTS_MEDIA_CHANGES - return media changes instead of page changes param: int $from date of the oldest entry to return param: int $to date of the newest entry to return (for pagination, optional) param: string $ns restrict to given namespace (optional) param: int $flags see above (optional) author: Michael Hamann <michael@content-space.de> author: Ben Coburn <btcoburn@silicodon.net> return: array of files |
_handleRecentLogLine($line, $ns, $flags, &$seen) X-Ref |
Internal function used by getRecents Parse a line and checks whether it should be included don't call directly param: string $line changelog line param: string $ns restrict to given namespace param: int $flags flags to control which changes are included param: array $seen listing of seen pages author: Andreas Gohr <andi@splitbrain.org> author: Ben Coburn <btcoburn@silicodon.net> return: array|bool false or array with info about a change see: getRecents() |