r5 - 04 May 2006 - 00:52:34 - SamHaslerYou are here: TWiki >  Codev Web > CodevDocumentationProject > ChangesCgiScript
Tags:
, create new tag
Module name changes ChangesCgiScript
Location TWIKIROOT/bin/changes
Summary Presents to user recent changes made to the current web
Primary Author NicholasLee

CVS history http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/twiki/twiki/bin/changes
CVS alpha http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/twiki/twiki/bin/changes?rev=HEAD&content-type=text/vnd.viewcvs-markup
Contributing authors (see CVS History)
IsClass? NO - is FatCgiScript
First TWikiRelease to be filled out

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:

  • CGI

Somewhat unusually, it does not depend on TWikiDotPm

External Modules used

This CGI script depends on no external modules

PublicMethods?

This section lists the methods that can be used by the scripts and by other modules

  • none

PrivateMethods?

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

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo