[ Index ] |
|
Code source de DokuWiki 2006-11-06 |
[Code source] [Imprimer] [Statistiques]
Changelog handling functions
Author: | Andreas Gohr <andi@splitbrain.org> |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
Poids: | 360 lignes (11 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
parseChangelogLine($line) X-Ref |
parses a changelog line into it's components author: Ben Coburn <btcoburn@silicodon.net> |
addLogEntry($date, $id, $type='E', $summary='', $extra='') 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> |
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 author: Ben Coburn <btcoburn@silicodon.net> param: int $first number of first entry returned (for paginating param: int $num return $num entries param: string $ns restrict to given namespace param: bool $flags see above |
_handleRecent($line,$ns,$flags) X-Ref |
Internal function used by getRecents don't call directly author: Andreas Gohr <andi@splitbrain.org> author: Ben Coburn <btcoburn@silicodon.net> |
getRevisionInfo($id, $rev, $chunk_size=8192) X-Ref |
Get the changelog information for a specific page id and revision (timestamp). Adjacent changelog lines are optimistically parsed and cached to speed up consecutive calls to getRevisionInfo. For large changelog files, only the chunk containing the requested changelog line is read. author: Ben Coburn <btcoburn@silicodon.net> |
getRevisions($id, $first, $num, $chunk_size=8192) X-Ref |
Return a list of page revisions numbers Does not guarantee that the revision exists in the attic, only that a line with the date exists in the changelog. By default the current revision is skipped. id: the page of interest first: skip the first n changelog lines num: number of revisions to return The current revision is automatically skipped when the page exists. See $INFO['meta']['last_change'] for the current revision. For efficiency, the log lines are parsed and cached for later calls to getRevisionInfo. Large changelog files are read backwards in chunks untill the requested number of changelog lines are recieved. author: Ben Coburn <btcoburn@silicodon.net> |
Généré le : Tue Apr 3 20:47:31 2007 | par Balluche grâce à PHPXref 0.7 |