*** lib/TWiki/UI/Edit.pm.orig Thu Dec 30 12:56:15 2004 --- lib/TWiki/UI/Edit.pm Thu Dec 30 12:55:40 2004 *************** *** 232,237 **** --- 232,265 ---- $tmpl =~ s/%FORMFIELDS%//go; } + # Terser signature. ColasNahaboo, v4, see Codev.TerserSignature START + my( $sec, $min, $hour, $day, $mon, $year ) = gmtime( time() ); + my $wikiName = &TWiki::userToWikiName( $userName, 1); + my $homePage = $wikiUserName; + my $initials = $wikiName; + if ( $wikiName ne "TWikiGuest" ) { + $initials =~ s/[a-z0-9]//go; + } else { + $initials="Guest"; + } + if (&TWiki::Store::topicExists($TWiki::mainWebname, $wikiName)) { + foreach (split( /\n/, &TWiki::Store::readWebTopic($TWiki::mainWebname, + $wikiName))) { + if (/^\s\*\sInitials:\s+([^\s]+)/) { # Initials field + $initials=$1; + TWiki::handleInternalTags( $initials, $webName, $topic); + last; + } + } + } else { # no home page? no link to avoid creating one by mistake + $homePage = "Test.$wikiName"; + } + my $simplesig = "[[" . $homePage . "#" . sprintf("%.2u",$day) . + $TWiki::isoMonth[$mon] . sprintf("%.2u", $year % 100) . + "][" . $initials . "]]"; + $tmpl =~ s/%INITIALS%/$simplesig/go; + # Codev.TerserSignature END + $tmpl =~ s/%FORMTEMPLATE%//go; # Clear if not being used $tmpl =~ s/%TEXT%/$text/go; $tmpl =~ s/( ?) *<\/?(nop|noautolink)\/?>\n?/$1/gois; # remove and tags