[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/ -> changelog.php (summary)

Changelog handling functions

Author: Andreas Gohr
License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
File Size: 403 lines (14 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

  parseChangelogLine()
  addLogEntry()
  addMediaLogEntry()
  getRecents()
  getRecentsSince()
  _handleRecent()

Functions
Functions that are not part of a class:

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
Add's an entry to the changelog and saves the metadata for the page

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 (timestmp) 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
Add's 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 (timestmp) 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

_handleRecent($line,$ns,$flags,&$seen)   X-Ref
Internal function used by getRecents

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
see: getRecents()
author: Andreas Gohr <andi@splitbrain.org>
author: Ben Coburn <btcoburn@silicodon.net>
return: array|bool    false or array with info about a change