(file) Return to rename.cgi CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / twiki / bin

 1 rizwank 1.1 #!/usr/bin/perl -wT
 2             #
 3             # TWiki Collaboration Platform, http://TWiki.org/
 4             #
 5             # Copyright (C) 2001-2004 Peter Thoeny, peter@thoeny.com
 6             # Copyright (C) 2001 Sven Dowideit, svenud@ozemail.com.au
 7             #
 8             # For licensing info read license.txt file in the TWiki root.
 9             # This program is free software; you can redistribute it and/or
10             # modify it under the terms of the GNU General Public License
11             # as published by the Free Software Foundation; either version 2
12             # of the License, or (at your option) any later version.
13             #
14             # This program is distributed in the hope that it will be useful,
15             # but WITHOUT ANY WARRANTY; without even the implied warranty of
16             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17             # GNU General Public License for more details, published at
18             # http://www.gnu.org/copyleft/gpl.html
19             #
20             
21             BEGIN {
22 rizwank 1.1     # Set default current working directory
23                 if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ /^(.+)\/[^\/]+$/ ) {
24                     chdir $1;
25                 }
26                 # Set library paths in @INC at compile time
27                 unshift @INC, '.';
28                 require 'setlib.cfg';
29             
30                 # 'Use locale' for internationalisation of Perl regexes -
31                 # main locale settings are done in TWiki::setupLocale
32                 # Do a dynamic 'use locale' for this module
33                 if( $TWiki::useLocale ) {
34                     require locale;
35             	import locale ();
36                 }
37             }
38             
39             use CGI::Carp qw( fatalsToBrowser );
40             use CGI;
41             use TWiki::UI::Manage;
42             
43 rizwank 1.1 my $query = new CGI;
44             my $thePathInfo = $query->path_info(); 
45             my $theRemoteUser = $query->remote_user();
46             my $theTopic = $query->param( 'topic' );
47             my $theUrl = $query->url;
48             
49             my ( $topic, $web, $scriptUrlPath, $userName, $dataDir ) = 
50               TWiki::initialize( $thePathInfo, $theRemoteUser, $theTopic,
51                                  $theUrl, $query );
52             
53             TWiki::UI::Manage::rename( $web, $topic, $userName, $query );

Rizwan Kassim
Powered by
ViewCVS 0.9.2