Index: bin/testenv
===================================================================
--- bin/testenv (revision 1594)
+++ bin/testenv (working copy)
@@ -500,7 +500,7 @@
}
}
-print "
| User: | $usr |
\n";
+print "| User: | $usr |
\n";
print " | Note: ";
print "Your CGI scripts are executing as this user.";
print " |
\n";
Index: bin/manage
===================================================================
--- bin/manage (revision 1594)
+++ bin/manage (working copy)
@@ -85,8 +85,10 @@
my ( $topic, $webName ) =
TWiki::initialize( $thePathInfo, $wikiName, $topicName, $theUrl, $query );
- TWiki::UI::Manage::removeUser($webName, $topic, $wikiName, $query);
+ TWiki::UI::Manage::removeUser($webName, $topic, $wikiName, $query);
+} elsif( $action eq "relockrcs" ) {
+ TWiki::UI::Manage::relockRcsFiles();
} elsif( $action ) {
my( $topic, $webName, $dummy, $userName ) =
Index: lib/TWiki/UI/Manage.pm
===================================================================
--- lib/TWiki/UI/Manage.pm (revision 1594)
+++ lib/TWiki/UI/Manage.pm (working copy)
@@ -502,6 +502,50 @@
=pod
+---++ _relockRcsFiles ( )
+| Description: | relocks all the rcs files using the configured apache user (called from testenv)) |
+
+=cut
+
+sub relockRcsFiles {
+print "Content-type: text/html\n\n";
+print "\n";
+print "Preparing to change all RCS locks to match current webserver user.\n";
+print "Please wait for this page to tell you it is finished.\n";
+print "This could take awhile, depending on the number of topics to process\n";
+print "(about 10 seconds for a standard twiki beta release - 615 topics -\n";
+print "on a Win2k+cygwin+apache2 machine running @ 1100MHz with 512MB ram).";
+
+$ENV{PATH} = '';
+
+opendir(DATA, $TWiki::dataDir) or
+ die "Open $TWiki::dataDir failed";
+foreach my $web ( grep /^\w+$/, readdir DATA ) {
+ $web =~ /(.*)/; # untaint
+ $web = $1;
+ print "Unlocking $web
\n";
+ if ( -d "$TWiki::dataDir/$web" ) {
+ opendir(WEB, "$TWiki::dataDir/$web") or
+ die "Open $TWiki::dataDir/$web failed";;
+ foreach my $topic ( grep /.txt$/, readdir WEB ) {
+ $topic =~ /(.*)/; # untaint
+ $topic = $1;
+ print "$topic ";
+ print `$TWiki::rcsDir/rcs -q -u -M $TWiki::dataDir/$web/$topic`;
+ print `$TWiki::rcsDir/rcs -q -l $TWiki::dataDir/$web/$topic`;
+ print "
\n";
+ }
+ closedir(WEB);
+ }
+}
+closedir(DATA);
+print "";
+}
+
+#=========================
+
+=pod
+
---++ _getReferingTopicsListFromURL ( $oldWeb, $oldTopic, $newWeb, $newTopic ) ==> @refs
| Description: | returns the list of topics that have been found that refer to the renamed topic |
| Parameter: =$oldWeb= | |