[ 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: 406 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

author: Ben Coburn <btcoburn@silicodon.net>
return: array|bool parsed line or false
param: string $line changelog line

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

author: Andreas Gohr <andi@splitbrain.org>
author: Esther Brunner <wikidesign@gmail.com>
author: Ben Coburn <btcoburn@silicodon.net>
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

addMediaLogEntry($date,$id,$type=DOKU_CHANGE_TYPE_EDIT,$summary='',$extra='',$flags=null,$sizechange = null)   X-Ref
Add's an entry to the media changelog

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>
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

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_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

author: Ben Coburn <btcoburn@silicodon.net>
author: Kate Arzamastseva <pshns@ukr.net>
return: array recently changed files
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

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_SKIP_SUBSPACES - don't include subspaces
RECENTS_MEDIA_CHANGES  - return media changes instead of page changes

author: Michael Hamann <michael@content-space.de>
author: Ben Coburn <btcoburn@silicodon.net>
return: array of files
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)

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

don't call directly

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