| Module name |
changes ChangesCgiScript |
| Location |
TWIKIROOT/bin/changes |
| Summary |
Presents to user recent changes made to the current web |
| Primary Author |
NicholasLee |
Purpose
To show what changes have been made. Calculates this by trawling through the
DotChangesFile (.changes) in the
WebDataDirectory.
Note: this is different from the mechanism used by
WebChanges which does not use the
DotChangesFile; instead
WebChanges contains a SEARCH directive that instructs TWiki to sort the files based on their change dates. See
AboutWebChanges.
Used by
- This cgi script is invoked by the user when the detailed Changes link is clicked on.
TWiki Modules used
This
CGI script depends on the following TWiki modules for functionality:
Somewhat unusually, it does not depend on
TWikiDotPm
External Modules used
This
CGI script depends on no external modules
This section lists the methods that can be used by the scripts and by other modules
These do not need to be not documented yet
Please see
CodevDocumentationProject and
CodevDocumentationProjectDev for comments on the format of these pages.
--
MartinCleaver - 23 Jun 2002
Version 1.14 of this
CgiScript is considered a
FatCgiScript because the following code segment is in this script rather than in a backend module where it could be called independently:
foreach( reverse split( /\n/, $changes ) ) {
@bar = split( /\t/ );
if( ( ! %exclude ) || ( ! $exclude{ $bar[0] } ) ) {
next unless TWiki::Store::topicExists( $webName, $bar[0] );
$foo = $text;
$foo =~ s/%TOPICNAME%/$bar[0]/go;
$wikiuser = &TWiki::userToWikiName( $bar[1] );
$foo =~ s/%AUTHOR%/$wikiuser/go;
$foo =~ s/%LOCKED%//go;
$time = &TWiki::formatGmTime( $bar[2] );
$frev = "";
if( $bar[3] ) {
if( $bar[3] > 1 ) {
$frev = "r1.$bar[3]";
} else {
$frev = "<b>NEW</b>";
}
}
$foo =~ s/%TIME%/$time/go;
$foo =~ s/%REVISION%/$frev/go;
$foo = &TWiki::getRenderedVersion( $foo );
$summary = &TWiki::Store::readFileHead( "$dataDir\/$webName\/$bar[0].txt", 16 );
$summary = &TWiki::makeTopicSummary( $summary, $bar[0], $webName );
$foo =~ s/%TEXTHEAD%/$summary/go;
print $foo;
$exclude{ $bar[0] } = "1";
}
}
--
MartinCleaver - 01 Jul 2002