You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(28) |
Nov
(58) |
Dec
(85) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(222) |
Mar
(274) |
Apr
(51) |
May
(22) |
Jun
(50) |
Jul
(15) |
Aug
(33) |
Sep
(11) |
Oct
(29) |
Nov
(17) |
Dec
(1) |
2003 |
Jan
(100) |
Feb
(21) |
Mar
(7) |
Apr
(45) |
May
|
Jun
(43) |
Jul
(27) |
Aug
(24) |
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
(1) |
Feb
|
Mar
(13) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Rob H. <for...@us...> - 2002-02-25 23:27:35
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv18994/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: fixed space prob in vcs_output Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -U2 -r1.27 -r1.28 --- CVS.pm 13 Feb 2002 07:42:34 -0000 1.27 +++ CVS.pm 25 Feb 2002 23:27:32 -0000 1.28 @@ -553,8 +553,6 @@ } - my $output = join(" ", "@output_lines"); - my %return = ( - output => $output, + output => join('', @output_lines), errorlevel => $errorlevel ); |
From: Rob H. <for...@us...> - 2002-02-25 23:18:01
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv15773/bin Modified Files: sandweb.cgi Log Message: tool_bar_menu needs to know location, module_name and repo_name Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.221 retrieving revision 1.222 diff -U2 -r1.221 -r1.222 --- sandweb.cgi 25 Feb 2002 23:12:51 -0000 1.221 +++ sandweb.cgi 25 Feb 2002 23:17:58 -0000 1.222 @@ -599,4 +599,7 @@ MENU => 'tool_bar', VCS_CMD_LOOP => \@loop_data, + MODULE_NAME => $module_name, + REPO_NAME => $repo_name, + LOCATION => $location, ); |
From: Rob H. <for...@us...> - 2002-02-25 23:12:54
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv13766/bin Modified Files: sandweb.cgi Log Message: view_file was using current_location the old way; fixed Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.220 retrieving revision 1.221 diff -U2 -r1.220 -r1.221 --- sandweb.cgi 25 Feb 2002 22:59:05 -0000 1.220 +++ sandweb.cgi 25 Feb 2002 23:12:51 -0000 1.221 @@ -983,9 +983,22 @@ ); - my $current_location = $browse->get_current_location( + my %current_location = $browse->get_current_location( 'location' => $location, 'progname' => $progname, ); + my @loop_data = (); + my $count = 0; + while ( $current_location{'LOCATION_LOOP'}->[$count] ) { + $log->debug('dump', $current_location{'LOCATION_LOOP'}->[$count]); + push (@loop_data, $current_location{'LOCATION_LOOP'}->[$count]); + $count++; + } + + my $current_location_menu = $ui->get_menu( + MENU => 'current_location', + LOCATION_LOOP => \@loop_data, + ); + my $menu = $ui->get_menu( MENU => 'view_file', @@ -1002,5 +1015,5 @@ ); - my $content = "$current_location $menu"; + my $content = "$current_location_menu $menu"; print CGI::header( -cookie => $ck_auth ); |
From: Rob H. <for...@us...> - 2002-02-25 22:59:08
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv8300 Modified Files: sandweb.cgi Log Message: was getting warning about "my" being used on already-declared variable, remove "my". Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.219 retrieving revision 1.220 diff -U2 -r1.219 -r1.220 --- sandweb.cgi 25 Feb 2002 22:10:23 -0000 1.219 +++ sandweb.cgi 25 Feb 2002 22:59:05 -0000 1.220 @@ -1488,5 +1488,5 @@ # if a file has been uploaded, then # grab it's filehandle - my $filehandle = CGI::upload('filehandle'); + $filehandle = CGI::upload('filehandle'); if ( $filehandle) { $filename = $filehandle; |
From: Rob H. <for...@us...> - 2002-02-25 22:10:28
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv22677/bin Modified Files: sandweb.cgi Log Message: removing last vestages of HTML::Template from SandWeb::Browse Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.218 retrieving revision 1.219 diff -U2 -r1.218 -r1.219 --- sandweb.cgi 25 Feb 2002 22:01:59 -0000 1.218 +++ sandweb.cgi 25 Feb 2002 22:10:23 -0000 1.219 @@ -600,10 +600,23 @@ VCS_CMD_LOOP => \@loop_data, ); - - my $current_location = $browse->get_current_location( + + my %current_location = $browse->get_current_location( 'location' => $location, 'progname' => $progname, ); + @loop_data = (); + $count = 0; + while ( $current_location{'LOCATION_LOOP'}->[$count] ) { + $log->debug('dump', $current_location{'LOCATION_LOOP'}->[$count]); + push (@loop_data, $current_location{'LOCATION_LOOP'}->[$count]); + $count++; + } + + my $current_location_menu = $ui->get_menu( + MENU => 'current_location', + LOCATION_LOOP => \@loop_data, + ); + my %browser = $browse->get_browser( 'location' => $location, @@ -613,6 +626,6 @@ ); - my @loop_data = (); - my $count = 0; + @loop_data = (); + $count = 0; while ( $browser{'ENTRY_LOOP'}->[$count] ) { $log->debug('dump', $browser{'ENTRY_LOOP'}->[$count]); @@ -630,5 +643,5 @@ ); - my $content = "$browse_module_header $toolbar_menu $current_location $browser_menu $browse_module_footer"; + my $content = "$browse_module_header $toolbar_menu $current_location_menu $browser_menu $browse_module_footer"; print CGI::header( -cookie => $ck_auth ); |
From: Rob H. <for...@us...> - 2002-02-25 22:10:28
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv22677/lib/SandWeb Modified Files: Browse.pm Log Message: removing last vestages of HTML::Template from SandWeb::Browse Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.65 retrieving revision 1.66 diff -U2 -r1.65 -r1.66 --- Browse.pm 25 Feb 2002 22:02:00 -0000 1.65 +++ Browse.pm 25 Feb 2002 22:10:23 -0000 1.66 @@ -9,5 +9,4 @@ use SandWeb::File; -use HTML::Template; sub new { @@ -238,11 +237,6 @@ } - my $content = HTML::Template->new( filename => "$template_dir/current_location.html" ); - - $content->param( - LOCATION_LOOP => \@loop_data, - ); - - return $content->output(); + my @content = ( 'LOCATION_LOOP', \@loop_data ); + return @content; } |
From: Rob H. <for...@us...> - 2002-02-25 22:02:04
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv19797/lib/SandWeb Modified Files: Browse.pm Log Message: tool_bar no longer uses HTML::Template Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.64 retrieving revision 1.65 diff -U2 -r1.64 -r1.65 --- Browse.pm 25 Feb 2002 21:49:15 -0000 1.64 +++ Browse.pm 25 Feb 2002 22:02:00 -0000 1.65 @@ -57,6 +57,4 @@ } - my @content; - my @return = (); my @loop_data = (); @@ -78,28 +76,28 @@ my $counter=0; unless ($#return< 0) { - while (@return) { - my %row_data; - $row_data{ENTRY} = shift @return; - my $entryname = $row_data{ENTRY}; - - my $file = SandWeb::File->new( - location => "$sandbox/$location", - filename => "$entryname", - ); - my $filename = $file->get_filename(); - $row_data{FILESIZE} = $file->get_size(); - $row_data{FILEAGE} = $file->get_age(); - if ( $file->get_file_type() eq "Directory" ) { - if ($repo_type eq "CVS") { - next if ($filename =~ /^CVS$/); - } - $row_data{FILETYPE} = "dir"; - $row_data{LINK} = "action=browse_module&location=$location/$filename"; - if ($counter eq "0") { - $row_data{COLOR} = 0; - } else { - $row_data{COLOR} = 1; + while (@return) { + my %row_data; + $row_data{ENTRY} = shift @return; + my $entryname = $row_data{ENTRY}; + + my $file = SandWeb::File->new( + location => "$sandbox/$location", + filename => "$entryname", + ); + my $filename = $file->get_filename(); + $row_data{FILESIZE} = $file->get_size(); + $row_data{FILEAGE} = $file->get_age(); + if ( $file->get_file_type() eq "Directory" ) { + if ($repo_type eq "CVS") { + next if ($filename =~ /^CVS$/); + } + $row_data{FILETYPE} = "dir"; + $row_data{LINK} = "action=browse_module&location=$location/$filename"; + if ($counter eq "0") { + $row_data{COLOR} = 0; + } else { + $row_data{COLOR} = 1; + } } - } elsif ( $file->get_file_type() eq "Text" ) { $row_data{FILETYPE} = "text"; @@ -119,6 +117,5 @@ $row_data{COLOR} = 1; } - } - else { + } else { $row_data{FILETYPE} = "unknown"; $row_data{LINK} = "action=view_file&filename=$filename"; @@ -140,10 +137,8 @@ $counter = 1; } - } - } else { - @content = ('STATUS','No files.'); - } + } + } - @content = ('ENTRY_LOOP', \@loop_data); + my @content = ('ENTRY_LOOP', \@loop_data); return @content; } @@ -164,6 +159,4 @@ my $repo_name = $self->_get_repo_name(); - my $content = HTML::Template->new( filename => "$template_dir/tool_bar.html" ); - my $count = 0; while ( $vcs_commands->[$count] ) { @@ -178,12 +171,6 @@ } - $content->param( - VCS_CMD_LOOP => \@loop_data, - LOCATION => $location, - MODULE_NAME => $module_name, - REPO_NAME => $repo_name, - ); - - return $content->output(); + my @content = ( 'VCS_CMD_LOOP', \@loop_data ); + return @content; } |
From: Rob H. <for...@us...> - 2002-02-25 22:02:04
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv19797/bin Modified Files: sandweb.cgi Log Message: tool_bar no longer uses HTML::Template Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.217 retrieving revision 1.218 diff -U2 -r1.217 -r1.218 --- sandweb.cgi 25 Feb 2002 21:49:09 -0000 1.217 +++ sandweb.cgi 25 Feb 2002 22:01:59 -0000 1.218 @@ -583,8 +583,21 @@ ); - my $toolbar = $browse->get_tool_bar( + my %toolbar = $browse->get_tool_bar( 'location' => $location, 'progname' => $progname, ); + + my @loop_data = (); + my $count = 0; + while ( $toolbar{'VCS_CMD_LOOP'}->[$count] ) { + $log->debug('dump', $toolbar{'VCS_CMD_LOOP'}->[$count]); + push (@loop_data, $toolbar{'VCS_CMD_LOOP'}->[$count]); + $count++; + } + + my $toolbar_menu = $ui->get_menu( + MENU => 'tool_bar', + VCS_CMD_LOOP => \@loop_data, + ); my $current_location = $browse->get_current_location( @@ -601,5 +614,4 @@ my @loop_data = (); - my $count = 0; while ( $browser{'ENTRY_LOOP'}->[$count] ) { @@ -618,5 +630,5 @@ ); - my $content = "$browse_module_header $toolbar $current_location $browser_menu $browse_module_footer"; + my $content = "$browse_module_header $toolbar_menu $current_location $browser_menu $browse_module_footer"; print CGI::header( -cookie => $ck_auth ); |
From: Rob H. <for...@us...> - 2002-02-25 21:50:50
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv14153/lib/SandWeb Modified Files: Browse.pm Log Message: Browse->get_browser() no longer uses HTML::Template, returns reference to array that contains reference to a hash for each file Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.63 retrieving revision 1.64 diff -U2 -r1.63 -r1.64 --- Browse.pm 24 Feb 2002 06:10:21 -0000 1.63 +++ Browse.pm 25 Feb 2002 21:49:15 -0000 1.64 @@ -57,5 +57,5 @@ } - my $content = HTML::Template->new( filename => "$template_dir/browse_module.html" ); + my @content; my @return = (); @@ -134,5 +134,4 @@ $row_data{PROGNAME} = $progname; push(@loop_data, \%row_data); - $content->param(ENTRY_LOOP => \@loop_data); if ($counter eq "1") { @@ -143,11 +142,9 @@ } } else { - $content->param(STATUS => 'No files.'); + @content = ('STATUS','No files.'); } - @loop_data = (); - - - return $content->output(); + @content = ('ENTRY_LOOP', \@loop_data); + return @content; } |
From: Rob H. <for...@us...> - 2002-02-25 21:50:48
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv14153/bin Modified Files: sandweb.cgi Log Message: Browse->get_browser() no longer uses HTML::Template, returns reference to array that contains reference to a hash for each file Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.216 retrieving revision 1.217 diff -U2 -r1.216 -r1.217 --- sandweb.cgi 24 Feb 2002 08:01:08 -0000 1.216 +++ sandweb.cgi 25 Feb 2002 21:49:09 -0000 1.217 @@ -593,5 +593,5 @@ ); - my $browser = $browse->get_browser( + my %browser = $browse->get_browser( 'location' => $location, 'progname' => $progname, @@ -600,9 +600,23 @@ ); + my @loop_data = (); + + my $count = 0; + while ( $browser{'ENTRY_LOOP'}->[$count] ) { + $log->debug('dump', $browser{'ENTRY_LOOP'}->[$count]); + push (@loop_data, $browser{'ENTRY_LOOP'}->[$count]); + $count++; + } + + my $browser_menu = $ui->get_menu( + MENU => 'browse_module', + ENTRY_LOOP => \@loop_data, + ); + my $browse_module_footer = $ui->get_menu( MENU => 'browse_module_footer', ); - my $content = "$browse_module_header $toolbar $current_location $browser $browse_module_footer"; + my $content = "$browse_module_header $toolbar $current_location $browser_menu $browse_module_footer"; print CGI::header( -cookie => $ck_auth ); |
From: Rob H. <for...@us...> - 2002-02-24 08:01:12
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv24513/bin Modified Files: sandweb.cgi Log Message: * repo name wasn't getting passed to edit_file, so browse_menu didn't know what repository we were in when you use the current location bar in the view_file_menu to get back. fixed. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.215 retrieving revision 1.216 diff -U2 -r1.215 -r1.216 --- sandweb.cgi 24 Feb 2002 06:46:34 -0000 1.215 +++ sandweb.cgi 24 Feb 2002 08:01:08 -0000 1.216 @@ -953,4 +953,5 @@ PROGNAME => "$progname", MODULE_NAME => $module_name, + REPO_NAME => $repo_name, FILENAME => "$filename", LOCATION => "$location", @@ -1036,4 +1037,5 @@ PROGNAME => $progname, MODULE_NAME => $module_name, + REPO_NAME => $repo_name, CONTENT => $content, LOCATION => $location, |
From: Rob H. <for...@us...> - 2002-02-24 08:01:12
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv24513/templates Modified Files: edit_file.html view_file.html Log Message: * repo name wasn't getting passed to edit_file, so browse_menu didn't know what repository we were in when you use the current location bar in the view_file_menu to get back. fixed. Index: edit_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/edit_file.html,v retrieving revision 1.26 retrieving revision 1.27 diff -U2 -r1.26 -r1.27 --- edit_file.html 24 Feb 2002 05:28:02 -0000 1.26 +++ edit_file.html 24 Feb 2002 08:01:09 -0000 1.27 @@ -6,4 +6,5 @@ <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> <input name="module_name" value="<TMPL_VAR NAME=MODULE_NAME>" type="hidden" /> + <input name="repo_name" value="<TMPL_VAR NAME=REPO_NAME>" type="hidden" /> <input name="filename" value="<TMPL_VAR NAME=FILENAME>" type="hidden" /> <input type="submit" name="Submit" value="Save" /> Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.40 retrieving revision 1.41 diff -U2 -r1.40 -r1.41 --- view_file.html 24 Feb 2002 06:46:35 -0000 1.40 +++ view_file.html 24 Feb 2002 08:01:09 -0000 1.41 @@ -7,5 +7,5 @@ [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=download_file&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">download</a>] <TMPL_IF NAME=EDIT> - [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=edit_file&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">edit</a>] + [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=edit_file&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>&repo_name=<TMPL_VAR NAME=REPO_NAME>">edit</a>] </TMPL_IF> <TMPL_VAR NAME=ERROR> |
From: Rob H. <for...@us...> - 2002-02-24 06:46:37
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv11096/templates Modified Files: view_file.html Log Message: oops, download_file wasn't implemented correctly. fixed. Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.39 retrieving revision 1.40 diff -U2 -r1.39 -r1.40 --- view_file.html 24 Feb 2002 06:43:22 -0000 1.39 +++ view_file.html 24 Feb 2002 06:46:35 -0000 1.40 @@ -5,5 +5,5 @@ <tr> <td width="100%" align="right"> - [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=download_file_commit&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">download</a>] + [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=download_file&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">download</a>] <TMPL_IF NAME=EDIT> [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=edit_file&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">edit</a>] |
From: Rob H. <for...@us...> - 2002-02-24 06:46:37
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv11096/bin Modified Files: sandweb.cgi Log Message: oops, download_file wasn't implemented correctly. fixed. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.214 retrieving revision 1.215 diff -U2 -r1.214 -r1.215 --- sandweb.cgi 24 Feb 2002 06:43:21 -0000 1.214 +++ sandweb.cgi 24 Feb 2002 06:46:34 -0000 1.215 @@ -306,4 +306,14 @@ } } + elsif ( $action eq 'download_file' ) { + # called file downloader + download_file_commit( + ck_auth => $ck_auth, + filename => CGI::param('filename'), + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ); + } elsif ( $action eq 'repository' ) { if ($submit) { |
From: Rob H. <for...@us...> - 2002-02-24 06:43:26
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv10547/templates Modified Files: view_file.html Log Message: * brought all the comments up-to-date in the CGI * corrected download link in view_file template Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.38 retrieving revision 1.39 diff -U2 -r1.38 -r1.39 --- view_file.html 24 Feb 2002 06:31:26 -0000 1.38 +++ view_file.html 24 Feb 2002 06:43:22 -0000 1.39 @@ -5,5 +5,5 @@ <tr> <td width="100%" align="right"> - [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=browse_file&file_command=download&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">download</a>] + [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=download_file_commit&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">download</a>] <TMPL_IF NAME=EDIT> [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=edit_file&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">edit</a>] |
From: Rob H. <for...@us...> - 2002-02-24 06:43:26
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv10547/bin Modified Files: sandweb.cgi Log Message: * brought all the comments up-to-date in the CGI * corrected download link in view_file template Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.213 retrieving revision 1.214 diff -U2 -r1.213 -r1.214 --- sandweb.cgi 24 Feb 2002 06:31:26 -0000 1.213 +++ sandweb.cgi 24 Feb 2002 06:43:21 -0000 1.214 @@ -488,6 +488,11 @@ # args: # location - scalar to specify where to browse. -# ck_auth - the sessions cookie +# ck_auth - the sessions cookie. +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. ############################################################################### +# sub browse_module_menu { my %args = @_; @@ -509,8 +514,8 @@ my $repo_server = $user->get_repo_server(repo => $repo_name); - my $repo_username = $user->get_repo_username(repo => $repo_name); - my $repo_type = $user->get_repo_type(repo => $repo_name); - my $repo_connection = $user->get_repo_connection(repo => $repo_name); - my $repo_root = $user->get_repo_root(repo => $repo_name); + my $repo_username = $user->get_repo_username(repo => $repo_name); + my $repo_type = $user->get_repo_type(repo => $repo_name); + my $repo_connection = $user->get_repo_connection(repo => $repo_name); + my $repo_root = $user->get_repo_root(repo => $repo_name); my $vcsroot; @@ -864,8 +869,11 @@ # args: # ck_auth - the sessions cookie -# file_command - name of the File object method to be invoked # filename - name of the file(s) that the File object should -# be invoked with. NOTE: this is an array +# be invoked with. # location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. ############################################################################### sub view_file_menu { @@ -879,5 +887,4 @@ my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -967,8 +974,11 @@ # args: # ck_auth - the sessions cookie -# file_command - name of the File object method to be invoked # filename - name of the file(s) that the File object should -# be invoked with. NOTE: this is an array +# be invoked with. # location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. ############################################################################### sub edit_file_menu { @@ -982,5 +992,4 @@ my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -1004,5 +1013,4 @@ view_file_menu( ck_auth => $ck_auth, - file_command => "view", filename => $filename, location => $location, @@ -1036,4 +1044,18 @@ } +############################################################################### +# create file menu +# +# accepts a filename to be used to create new, empty file +# +# args: +# ck_auth - the sessions cookie +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### + sub create_file_menu { my %args = @_; @@ -1053,5 +1075,4 @@ $log->debug("module_name: $module_name"); -# $log->debug("username: $username"); $log->debug("location: $location"); @@ -1066,4 +1087,17 @@ ); } +############################################################################### +# create folder menu +# +# accepts a filename to be used to create new, empty folder +# +# args: +# ck_auth - the sessions cookie +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### sub create_folder_menu { @@ -1093,4 +1127,17 @@ } +############################################################################### +# upload folder menu +# +# allows user to select a file that they want to upload +# +# args: +# ck_auth - the sessions cookie +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### sub upload_file_menu { my %args = @_; @@ -1132,8 +1179,11 @@ # args: # ck_auth - the sessions cookie -# file_command - name of the File object method to be invoked # filename - name of the file(s) that the File object should -# be invoked with. NOTE: this is an array +# be invoked with. # location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. ############################################################################### @@ -1148,5 +1198,4 @@ my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -1179,5 +1228,4 @@ view_file_menu( ck_auth => $ck_auth, - file_command => "view", filename => $filename, module_name => $module_name, @@ -1187,4 +1235,19 @@ } +############################################################################### +# delete_file_commit is called by delete_file_menu to delete one or more files +# +# A File object is created and used. +# +# args: +# ck_auth - the sessions cookie +# filename - name of the file(s) that the File object should +# be invoked with. NOTE: this is an array +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### sub delete_file_commit { # delete a file @@ -1193,5 +1256,4 @@ my $ck_auth = $args{'ck_auth'}; my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -1258,4 +1320,19 @@ } +############################################################################### +# create_file_commit is called by create_file_menu to create a new, empty file +# +# A File object is created and used. +# +# args: +# ck_auth - the sessions cookie +# filename - name of the file(s) that the File object should +# be invoked with. +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### sub create_file_commit { my %args = @_; @@ -1263,5 +1340,4 @@ my $ck_auth = $args{'ck_auth'}; my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -1287,4 +1363,19 @@ } +############################################################################### +# create_folder_commit is called by create_folder_menu to create a new, empty folder +# +# A File object is created and used. +# +# args: +# ck_auth - the sessions cookie +# filename - name of the file(s) that the File object should +# be invoked with. +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### sub create_folder_commit { my %args = @_; @@ -1292,5 +1383,4 @@ my $ck_auth = $args{'ck_auth'}; my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -1317,4 +1407,19 @@ } +############################################################################### +# upload_file_commit is called by upload_file_menu to save uploaded data +# +# A File object is created and used. +# +# args: +# ck_auth - the sessions cookie +# filename - name of the file(s) that the File object should +# be invoked with. +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### sub upload_file_commit { my %args = @_; @@ -1322,5 +1427,4 @@ my $ck_auth = $args{'ck_auth'}; my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -1364,4 +1468,19 @@ } +############################################################################### +# download_file_commit is called to save downloaded data. +# +# A File object is created and used. +# +# args: +# ck_auth - the sessions cookie +# filename - name of the file(s) that the File object should +# be invoked with. +# location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +############################################################################### sub download_file_commit { my %args = @_; @@ -1369,5 +1488,4 @@ my $ck_auth = $args{'ck_auth'}; my $location = $args{'location'}; - my $message = CGI::param('message'); my $username = $auth->get_username(); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -1408,4 +1526,9 @@ # be used with. NOTE: this is an array # location - system path to the file(s) specified by filename +# repo_name - name of the current repository. +# module_name - name of the current module. +# template_dir - location of templates. +# users_dir - location of user sandbox directories. +# message - message to the VCS system. ############################################################################### |
From: Rob H. <for...@us...> - 2002-02-24 06:31:29
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv8014/templates Modified Files: commit.html create_folder.html tool_bar.html upload_file.html view_file.html Log Message: * browse_file_commit no longer exists, all file commands have subroutines * renamed browse_vcs_commit to vcs_commit Index: commit.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/commit.html,v retrieving revision 1.10 retrieving revision 1.11 diff -U2 -r1.10 -r1.11 --- commit.html 20 Feb 2002 05:14:32 -0000 1.10 +++ commit.html 24 Feb 2002 06:31:26 -0000 1.11 @@ -3,5 +3,5 @@ Please enter a commit message for <TMPL_VAR NAME=LOCATION>/<TMPL_VAR NAME=FILENAME> : <form submit="<TMPL_VAR NAME=PROGNAME>""> - <input type="hidden" name="action" value="browse_vcs" /> + <input type="hidden" name="action" value="vcs" /> <input type="hidden" name="vcs_command" value="commit" /> <input type="hidden" name="filename" value="<TMPL_VAR NAME=FILENAME>" /> Index: create_folder.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/create_folder.html,v retrieving revision 1.12 retrieving revision 1.13 diff -U2 -r1.12 -r1.13 --- create_folder.html 20 Feb 2002 05:32:08 -0000 1.12 +++ create_folder.html 24 Feb 2002 06:31:26 -0000 1.13 @@ -2,5 +2,5 @@ <td width="100%"> <form action="<TMPL_VAR NAME=PROGNAME>"> -<input name="action" value="browse_file" type="hidden" /> +<input name="action" value="create_folder" type="hidden" /> <input name="file_command" value="create_folder" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> @@ -10,5 +10,5 @@ Enter foldername:<br /> <input name="filename" type="text" /><br /> -<input name="done" type="submit" value="Done" /><br /> +<input name="Submit" type="submit" value="Done" /><br /> </form> </td> Index: tool_bar.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/tool_bar.html,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- tool_bar.html 24 Feb 2002 06:00:04 -0000 1.3 +++ tool_bar.html 24 Feb 2002 06:31:26 -0000 1.4 @@ -10,8 +10,8 @@ <td width="100%" align="center" colspan="3"> <input type="submit" name="action" value="create_file" accesskey="i" /> - <input type="submit" name="action_file" value="create_folder" accesskey="o" /> + <input type="submit" name="action" value="create_folder" accesskey="o" /> <input type="submit" name="action" value="delete_file" accesskey="d" /> - <input type="submit" name="action_file" value="rename" accesskey="r" /> - <input type="submit" name="action_file" value="upload" accesskey="u" /> + <input type="submit" name="action" value="rename_file" accesskey="r" /> + <input type="submit" name="action" value="upload_file" accesskey="u" /> </td> </tr> @@ -28,5 +28,5 @@ </select>     - <input type="submit" name="action" value="browse_vcs" /> + <input type="submit" name="action" value="vcs" /> </td> <td width="25%" align="center"> Index: upload_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/upload_file.html,v retrieving revision 1.13 retrieving revision 1.14 diff -U2 -r1.13 -r1.14 --- upload_file.html 22 Feb 2002 08:29:58 -0000 1.13 +++ upload_file.html 24 Feb 2002 06:31:26 -0000 1.14 @@ -3,5 +3,5 @@ <form method="post" action="<TMPL_VAR NAME=PROGNAME>" enctype="multipart/form-data"> -<input name="action" value="browse_file" type="hidden" /> +<input name="action" value="upload_file" type="hidden" /> <input name="file_command" value="upload" type="hidden" /> <input name="repo_name" value="<TMPL_VAR NAME=REPO_NAME>" type="hidden" /> @@ -12,5 +12,5 @@ <TMPL_VAR NAME=ERROR> <input name="filehandle" type="file" /><br /> -<input name="done" type="submit" /><br /> +<input name="Submit" type="submit" value="Done" /><br /> </form> </td> Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.37 retrieving revision 1.38 diff -U2 -r1.37 -r1.38 --- view_file.html 24 Feb 2002 05:28:02 -0000 1.37 +++ view_file.html 24 Feb 2002 06:31:26 -0000 1.38 @@ -5,5 +5,4 @@ <tr> <td width="100%" align="right"> - <input type="hidden" name="action" value="browse_file" /> [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=browse_file&file_command=download&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">download</a>] <TMPL_IF NAME=EDIT> |
From: Rob H. <for...@us...> - 2002-02-24 06:31:29
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv8014/bin Modified Files: sandweb.cgi Log Message: * browse_file_commit no longer exists, all file commands have subroutines * renamed browse_vcs_commit to vcs_commit Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.212 retrieving revision 1.213 diff -U2 -r1.212 -r1.213 --- sandweb.cgi 24 Feb 2002 06:10:21 -0000 1.212 +++ sandweb.cgi 24 Feb 2002 06:31:26 -0000 1.213 @@ -66,10 +66,4 @@ my $action = CGI::param('action') || ''; - # catch file-specific actions - if ( CGI::param('action_file') ) { - $action = 'browse_file'; - my $submit = 1; - } - if ($action eq 'login') { # attempting login @@ -179,24 +173,5 @@ ); } - elsif ( $action eq 'browse_file' ) { - # called file manipulator - my @filename = (); - my $file_command; - if ( CGI::param('action_file') ) { - $file_command = CGI::param('action_file'); - } else { - $file_command = CGI::param('file_command'); - } - @filename = CGI::param('filename'), - browse_file_commit( - ck_auth => $ck_auth, - file_command => $file_command, - filename => \@filename, - module_name => $module_name, - repo_name => $repo_name, - location => CGI::param('location'), - ); - } - elsif ( $action eq 'browse_vcs' ) { + elsif ( $action eq 'vcs' ) { # called VCS action my @filename = (); @@ -208,5 +183,5 @@ } - browse_vcs_commit( + vcs_commit( ck_auth => $ck_auth, vcs_command => CGI::param('vcs_command'), @@ -293,4 +268,42 @@ } } + elsif ( $action eq 'create_folder' ) { + # called folder creator + if ($submit) { + create_folder_commit( + ck_auth => $ck_auth, + filename => CGI::param('filename'), + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ) + } else { + create_folder_menu( + ck_auth => $ck_auth, + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ); + } + } + elsif ( $action eq 'upload_file' ) { + # called file uploader + if ($submit) { + upload_file_commit( + ck_auth => $ck_auth, + filename => CGI::param('filename'), + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ) + } else { + upload_file_menu( + ck_auth => $ck_auth, + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ); + } + } elsif ( $action eq 'repository' ) { if ($submit) { @@ -1054,172 +1067,61 @@ } - -############################################################################### -############################################################################### -## Commit Menu Data -## - -############################################################################### -# browse_file_commit contains operations such as file/folder creation, -# viewing and editing happen in this subroutine. -# A File object is created and used. -# -# args: -# ck_auth - the sessions cookie -# file_command - name of the File object method to be invoked -# filename - name of the file(s) that the File object should -# be invoked with. NOTE: this is an array -# location - system path to the file(s) specified by filename -############################################################################### -sub browse_file_commit { +sub create_folder_menu { my %args = @_; - $log->debug("entering file handling routine"); - my $ck_auth = $args{'ck_auth'}; - if (! load_config()) { - # no existing user config, forward to prefs menu - preferences_menu( ck_auth => $ck_auth ); - } - - - my $file_command = $args{'file_command'}; - $log->debug("file command is : $file_command"); my $location = $args{'location'}; my $module_name = $args{'module_name'}; - $log->debug("location is : $location"); - my @filename = (); - my $count = 0; - while ( $args{'filename'}->[$count] ) { - push (@filename, $args{'filename'}->[$count]); - $count++; - } - my $filename = "@filename"; - $log->debug("filename(s) : $filename"); - my $Submit = CGI::param('Submit'); - my $username = $auth->get_username(); - my $template_dir = $config->{'paths'}->{'template_dir'} || ''; - my $users_dir = $config->{'paths'}->{'users_dir'} || ''; - my $sandbox = $user->{'paths'}->{'users_dir'} || ''; my $repo_name = $args{'repo_name'}; - my $repo_server = $user->get_repo_server(repo => $repo_name); - my $repo_username = $user->get_repo_username(repo => $repo_name); - my $repo_type = $user->get_repo_type(repo => $repo_name); - my $repo_connection = $user->get_repo_connection(repo => $repo_name); - my $repo_root = $user->get_repo_root(repo => $repo_name); - my $vcsroot; - - # CVS parses network CVSROOTs and local CVSROOTs - # differently - - if ( $repo_type eq 'CVS' ) { - $log->debug("repo type is CVS, setting up CVSROOT"); - if ( $repo_connection eq 'local' ) { - $vcsroot = "$repo_root"; - } else { - $vcsroot = ":$repo_connection:$repo_username\@$repo_server:$repo_root"; - } - } + my $content = $ui->get_menu( + MENU => 'create_folder', + PROGNAME => $progname, + LOCATION => $location, + MODULE_NAME => $module_name, + REPO_NAME => $repo_name, + ); + print CGI::header( -cookie => $ck_auth ); + $ui->print_screen( + TITLE => 'SandWeb : create folder', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'create folder', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); +} - # Initialize variables for use by File class - my $file_type; # Text, Binary or Unknown - my $file; # File object - - # If a filename has been specified, create a file - # object for later use - if ($filename) { - $log->debug("creating file object"); - $file = SandWeb::File->new( - 'config_obj' => $config, - 'log_obj' => $log, - 'filename' => $filename, - 'location' => "$users_dir/$username/$module_name$location", - ); - } +sub upload_file_menu { + my %args = @_; - if ( $file_command eq 'create_folder' ) { - if ($file) { - $file->create_folder(); + my $ck_auth = $args{'ck_auth'}; + my $location = $args{'location'}; + my $module_name = $args{'module_name'}; + my $repo_name = $args{'repo_name'}; - browse_module_menu( - ck_auth => $ck_auth, - location => $location, - module_name => $module_name, - repo_name => $repo_name, - ); - } + my $content = $ui->get_menu( + MENU => 'upload_file', + LOCATION => $location, + PROGNAME => $progname, + MODULE_NAME => $module_name, + REPO_NAME => $repo_name, + ); + print CGI::header( -cookie => $ck_auth ); + $ui->print_screen( + TITLE=> 'SandWeb : upload file', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'upload file', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); +} - my $content = $ui->get_menu( - MENU => 'create_folder', - PROGNAME => $progname, - LOCATION => $location, - MODULE_NAME => $module_name, - REPO_NAME => $repo_name, - ); - print CGI::header( -cookie => $ck_auth ); - $ui->print_screen( - TITLE => 'SandWeb : create folder', - MENU_TITLE => 'SandWeb', - SUBMENU_TITLE => 'create folder', - FOOTER => '', - CONTENT => $content, - ERROR => $error, - ); - } - elsif ( $file_command eq 'upload' ) { - # if a file has been uploaded, then - # grab it's filehandle - my $filehandle = CGI::upload('filehandle'); - if ( $filehandle) { - $filename = $filehandle; - my $file = SandWeb::File->new( - 'config_obj' => $config, - 'log_obj' => $log, - 'filename' => $filename, - 'location' => "$users_dir/$username/$module_name$location", - ); - $file->upload( - filehandle => $filehandle, - ); - browse_module_menu( - ck_auth => $ck_auth, - location => $location, - module_name => $module_name, - repo_name => $repo_name, - ); - } - my $content = $ui->get_menu( - MENU => 'upload_file', - LOCATION => $location, - PROGNAME => $progname, - MODULE_NAME => $module_name, - REPO_NAME => $repo_name, - FILENAME => $filename, - ); - print CGI::header( -cookie => $ck_auth ); - $ui->print_screen( - TITLE=> 'SandWeb : upload file', - MENU_TITLE => 'SandWeb', - SUBMENU_TITLE => 'upload file', - FOOTER => '', - CONTENT => $content, - ERROR => $error, - ); - } - elsif ( $file_command eq 'download' ) { - $file->download(); - } - else { - set_error("Invalid selection: $file_command"); - browse_module_menu( - ck_auth => $ck_auth, - location => $location, - module_name => $module_name, - repo_name => $repo_name, - ); - } -} +############################################################################### +############################################################################### +## Commit Menu Data +## ############################################################################### @@ -1385,6 +1287,113 @@ } +sub create_folder_commit { + my %args = @_; + + my $ck_auth = $args{'ck_auth'}; + my $location = $args{'location'}; + my $message = CGI::param('message'); + my $username = $auth->get_username(); + my $template_dir = $config->{'paths'}->{'template_dir'}; + my $users_dir = $config->{'paths'}->{'users_dir'}; + my $repo_name = $args{'repo_name'}; + my $module_name = $args{'module_name'}; + my $filename = $args{'filename'}; + + $log->debug("creating File object"); + my $file = SandWeb::File->new( + 'log_obj' => $log, + 'filename' => $filename, + 'location' => "$users_dir/$username/$module_name$location", + ); + + $file->create_folder(); + + browse_module_menu( + ck_auth => $ck_auth, + location => $location, + module_name => $module_name, + repo_name => $repo_name, + ); +} + +sub upload_file_commit { + my %args = @_; + + my $ck_auth = $args{'ck_auth'}; + my $location = $args{'location'}; + my $message = CGI::param('message'); + my $username = $auth->get_username(); + my $template_dir = $config->{'paths'}->{'template_dir'}; + my $users_dir = $config->{'paths'}->{'users_dir'}; + my $repo_name = $args{'repo_name'}; + my $module_name = $args{'module_name'}; + my $filename = $args{'filename'}; + my $filehandle = $args{'filehandle'}; + + # if a file has been uploaded, then + # grab it's filehandle + my $filehandle = CGI::upload('filehandle'); + if ( $filehandle) { + $filename = $filehandle; + my $file = SandWeb::File->new( + 'config_obj' => $config, + 'log_obj' => $log, + 'filename' => $filename, + 'location' => "$users_dir/$username/$module_name$location", + ); + $file->upload( + filehandle => $filehandle, + ); + + browse_module_menu( + ck_auth => $ck_auth, + location => $location, + module_name => $module_name, + repo_name => $repo_name, + ); + } else { + set_error("Error: no file was received!"); + + browse_module_menu( + ck_auth => $ck_auth, + location => $location, + module_name => $module_name, + repo_name => $repo_name, + ); + } +} + +sub download_file_commit { + my %args = @_; + + my $ck_auth = $args{'ck_auth'}; + my $location = $args{'location'}; + my $message = CGI::param('message'); + my $username = $auth->get_username(); + my $template_dir = $config->{'paths'}->{'template_dir'}; + my $users_dir = $config->{'paths'}->{'users_dir'}; + my $repo_name = $args{'repo_name'}; + my $module_name = $args{'module_name'}; + my $filename = $args{'filename'}; + + $log->debug("creating File object"); + my $file = SandWeb::File->new( + 'log_obj' => $log, + 'filename' => $filename, + 'location' => "$users_dir/$username/$module_name$location", + ); + + $file->download(); + + browse_module_menu( + ck_auth => $ck_auth, + location => $location, + module_name => $module_name, + repo_name => $repo_name, + ); +} + ############################################################################### -# browse_vcs_commit +# vcs_commit # # all browse VCS actions are caught by this subroutine, and dealt @@ -1401,5 +1410,5 @@ ############################################################################### -sub browse_vcs_commit { +sub vcs_commit { my %args = @_; |
From: Rob H. <for...@us...> - 2002-02-24 06:10:27
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv3755/bin Modified Files: sandweb.cgi Log Message: create_file wasn't getting passed the module info correctly, fixed Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.211 retrieving revision 1.212 diff -U2 -r1.211 -r1.212 --- sandweb.cgi 24 Feb 2002 06:00:03 -0000 1.211 +++ sandweb.cgi 24 Feb 2002 06:10:21 -0000 1.212 @@ -287,5 +287,4 @@ create_file_menu( ck_auth => $ck_auth, - filename => CGI::param('filename'), module_name => $module_name, repo_name => $repo_name, @@ -1039,4 +1038,8 @@ REPO_NAME => $repo_name, ); + + $log->debug("module_name: $module_name"); +# $log->debug("username: $username"); + $log->debug("location: $location"); print CGI::header( -cookie => $ck_auth ); |
From: Rob H. <for...@us...> - 2002-02-24 06:10:24
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv3755/lib/SandWeb Modified Files: Browse.pm Log Message: create_file wasn't getting passed the module info correctly, fixed Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.62 retrieving revision 1.63 diff -U2 -r1.62 -r1.63 --- Browse.pm 24 Feb 2002 05:03:32 -0000 1.62 +++ Browse.pm 24 Feb 2002 06:10:21 -0000 1.63 @@ -95,5 +95,5 @@ } $row_data{FILETYPE} = "dir"; - $row_data{LINK} = "action=view_file&location=$location/$filename"; + $row_data{LINK} = "action=browse_module&location=$location/$filename"; if ($counter eq "0") { $row_data{COLOR} = 0; |
From: Rob H. <for...@us...> - 2002-02-24 06:00:10
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv2127/bin Modified Files: sandweb.cgi Log Message: moved create_file into create_file_menu and create_file_commit subs Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.210 retrieving revision 1.211 diff -U2 -r1.210 -r1.211 --- sandweb.cgi 24 Feb 2002 05:46:05 -0000 1.210 +++ sandweb.cgi 24 Feb 2002 06:00:03 -0000 1.211 @@ -274,4 +274,24 @@ ); } + elsif ( $action eq 'create_file' ) { + # called file creator + if ($submit) { + create_file_commit( + ck_auth => $ck_auth, + filename => CGI::param('filename'), + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ) + } else { + create_file_menu( + ck_auth => $ck_auth, + filename => CGI::param('filename'), + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ); + } + } elsif ( $action eq 'repository' ) { if ($submit) { @@ -1004,4 +1024,30 @@ } +sub create_file_menu { + my %args = @_; + + my $ck_auth = $args{'ck_auth'}; + my $location = $args{'location'}; + my $module_name = $args{'module_name'}; + my $repo_name = $args{'repo_name'}; + + my $content = $ui->get_menu( + MENU => 'create_file', + PROGNAME => $progname, + LOCATION => $location, + MODULE_NAME => $module_name, + REPO_NAME => $repo_name, + ); + + print CGI::header( -cookie => $ck_auth ); + $ui->print_screen( + TITLE=> 'SandWeb : create file', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'create file', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); +} @@ -1056,8 +1102,8 @@ my $repo_server = $user->get_repo_server(repo => $repo_name); - my $repo_username = $user->get_repo_username(repo => $repo_name); - my $repo_type = $user->get_repo_type(repo => $repo_name); - my $repo_connection = $user->get_repo_connection(repo => $repo_name); - my $repo_root = $user->get_repo_root(repo => $repo_name); + my $repo_username = $user->get_repo_username(repo => $repo_name); + my $repo_type = $user->get_repo_type(repo => $repo_name); + my $repo_connection = $user->get_repo_connection(repo => $repo_name); + my $repo_root = $user->get_repo_root(repo => $repo_name); my $vcsroot; @@ -1090,35 +1136,5 @@ } - if ( $file_command eq 'create_file' ) { - if ($file) { - $file->create_file(); - browse_module_menu( - ck_auth => $ck_auth, - location => $location, - module_name => $module_name, - repo_name => $repo_name, - ); - exit 0; - } - my $content = $ui->get_menu( - MENU => 'create_file', - PROGNAME => $progname, - LOCATION => $location, - MODULE_NAME => $module_name, - REPO_NAME => $repo_name, - ); - - print CGI::header( -cookie => $ck_auth ); - $ui->print_screen( - TITLE=> 'SandWeb : create file', - MENU_TITLE => 'SandWeb', - SUBMENU_TITLE => 'create file', - FOOTER => '', - CONTENT => $content, - ERROR => $error, - ); - exit 0; - } - elsif ( $file_command eq 'create_folder' ) { + if ( $file_command eq 'create_folder' ) { if ($file) { $file->create_folder(); @@ -1148,5 +1164,4 @@ ERROR => $error, ); - exit 0; } elsif ( $file_command eq 'upload' ) { @@ -1190,5 +1205,4 @@ ERROR => $error, ); - exit 0; } elsif ( $file_command eq 'download' ) { @@ -1273,9 +1287,4 @@ my $ck_auth = $args{'ck_auth'}; - if (! load_config()) { - # no existing user config, forward to prefs menu - preferences_menu( ck_auth => $ck_auth ); - } - my $location = $args{'location'}; my $message = CGI::param('message'); @@ -1336,4 +1345,33 @@ } + browse_module_menu( + ck_auth => $ck_auth, + location => $location, + module_name => $module_name, + repo_name => $repo_name, + ); +} + +sub create_file_commit { + my %args = @_; + + my $ck_auth = $args{'ck_auth'}; + my $location = $args{'location'}; + my $message = CGI::param('message'); + my $username = $auth->get_username(); + my $template_dir = $config->{'paths'}->{'template_dir'}; + my $users_dir = $config->{'paths'}->{'users_dir'}; + my $repo_name = $args{'repo_name'}; + my $module_name = $args{'module_name'}; + my $filename = $args{'filename'}; + + $log->debug("creating File object"); + my $file = SandWeb::File->new( + 'log_obj' => $log, + 'filename' => $filename, + 'location' => "$users_dir/$username/$module_name$location", + ); + + $file->create_file(); browse_module_menu( ck_auth => $ck_auth, |
From: Rob H. <for...@us...> - 2002-02-24 06:00:09
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv2127/templates Modified Files: create_file.html tool_bar.html Log Message: moved create_file into create_file_menu and create_file_commit subs Index: create_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/create_file.html,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- create_file.html 20 Feb 2002 05:32:08 -0000 1.14 +++ create_file.html 24 Feb 2002 06:00:03 -0000 1.15 @@ -2,5 +2,5 @@ <td width="100%"> <form action="<TMPL_VAR NAME=PROGNAME>"> -<input name="action" value="browse_file" type="hidden" /> +<input name="action" value="create_file" type="hidden" /> <input name="file_command" value="create_file" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> @@ -10,5 +10,5 @@ <br /> <input name="filename" type="text" /><br /> -<input name="done" type="submit" value="Done" /><br /> +<input name="Submit" type="submit" value="Done" /><br /> </form> </td> Index: tool_bar.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/tool_bar.html,v retrieving revision 1.2 retrieving revision 1.3 diff -U2 -r1.2 -r1.3 --- tool_bar.html 24 Feb 2002 05:46:05 -0000 1.2 +++ tool_bar.html 24 Feb 2002 06:00:04 -0000 1.3 @@ -9,5 +9,5 @@ <tr> <td width="100%" align="center" colspan="3"> - <input type="submit" name="action_file" value="create_file" accesskey="i" /> + <input type="submit" name="action" value="create_file" accesskey="i" /> <input type="submit" name="action_file" value="create_folder" accesskey="o" /> <input type="submit" name="action" value="delete_file" accesskey="d" /> |
From: Rob H. <for...@us...> - 2002-02-24 05:46:08
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv31831/templates Modified Files: tool_bar.html Log Message: moved delete out into delete_file_commit subroutine Index: tool_bar.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/tool_bar.html,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- tool_bar.html 22 Feb 2002 03:38:08 -0000 1.1 +++ tool_bar.html 24 Feb 2002 05:46:05 -0000 1.2 @@ -11,5 +11,5 @@ <input type="submit" name="action_file" value="create_file" accesskey="i" /> <input type="submit" name="action_file" value="create_folder" accesskey="o" /> - <input type="submit" name="action_file" value="delete" accesskey="d" /> + <input type="submit" name="action" value="delete_file" accesskey="d" /> <input type="submit" name="action_file" value="rename" accesskey="r" /> <input type="submit" name="action_file" value="upload" accesskey="u" /> |
From: Rob H. <for...@us...> - 2002-02-24 05:46:08
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv31831/bin Modified Files: sandweb.cgi Log Message: moved delete out into delete_file_commit subroutine Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.209 retrieving revision 1.210 diff -U2 -r1.209 -r1.210 --- sandweb.cgi 24 Feb 2002 05:28:02 -0000 1.209 +++ sandweb.cgi 24 Feb 2002 05:46:05 -0000 1.210 @@ -235,5 +235,4 @@ elsif ( $action eq 'view_file' ) { # called file viewer - view_file_menu( ck_auth => $ck_auth, @@ -246,5 +245,4 @@ elsif ( $action eq 'edit_file' ) { # called file editor - if ($submit) { edit_file_commit( @@ -265,4 +263,15 @@ } } + elsif ( $action eq 'delete_file' ) { + # called file deleter + my @filename = CGI::param('filename'); + delete_file_commit( + ck_auth => $ck_auth, + filename => \@filename, + module_name => $module_name, + repo_name => $repo_name, + location => CGI::param('location'), + ); + } elsif ( $action eq 'repository' ) { if ($submit) { @@ -917,4 +926,18 @@ } +############################################################################### +# edit file menu +# +# edit a file, with the option to save. +# +# A File object is created and used. +# +# args: +# ck_auth - the sessions cookie +# file_command - name of the File object method to be invoked +# filename - name of the file(s) that the File object should +# be invoked with. NOTE: this is an array +# location - system path to the file(s) specified by filename +############################################################################### sub edit_file_menu { my %args = @_; @@ -982,4 +1005,5 @@ + ############################################################################### ############################################################################### @@ -1038,48 +1062,4 @@ my $vcsroot; - # Remove a file - if ( $file_command eq 'delete' ) { - unless (@filename) { - $log->debug("no files selected for removal"); - set_error("Please select file(s) or folder(s) to delete."); - browse_module_menu( - ck_auth => $ck_auth, - location => $location, - module_name => $module_name, - repo_name => $repo_name, - ); - } - - foreach my $entry (@filename) { - - $log->debug("creating File object"); - my $file = SandWeb::File->new( - 'log_obj' => $log, - 'filename' => $entry, - 'location' => "$users_dir/$username/$module_name$location", - ); - - $log->debug("removing file"); - if ($file) { - if ( $file->get_file_type() eq 'Directory' ) { - $file->delete_folder(); - } else { - if ( $file->delete_file() ) { - set_error("$filename deleted."); - } else { - set_error("Cannot delete $filename."); - } - } - } - } - - browse_module_menu( - ck_auth => $ck_auth, - location => $location, - module_name => $module_name, - repo_name => $repo_name, - ); - } - # CVS parses network CVSROOTs and local CVSROOTs # differently @@ -1226,4 +1206,17 @@ } +############################################################################### +# edit_file_commit is called by edit_file_menu to save edited data +# +# A File object is created and used. +# +# args: +# ck_auth - the sessions cookie +# file_command - name of the File object method to be invoked +# filename - name of the file(s) that the File object should +# be invoked with. NOTE: this is an array +# location - system path to the file(s) specified by filename +############################################################################### + sub edit_file_commit { my %args = @_; @@ -1272,4 +1265,80 @@ repo_name => $repo_name, location => CGI::param('location'), + ); +} + +sub delete_file_commit { + # delete a file + my %args = @_; + + my $ck_auth = $args{'ck_auth'}; + if (! load_config()) { + # no existing user config, forward to prefs menu + preferences_menu( ck_auth => $ck_auth ); + } + + my $location = $args{'location'}; + my $message = CGI::param('message'); + my $username = $auth->get_username(); + my $template_dir = $config->{'paths'}->{'template_dir'}; + my $users_dir = $config->{'paths'}->{'users_dir'}; + my $repo_name = $args{'repo_name'}; + my $module_name = $args{'module_name'}; + my @filename = (); + my $count = 0; + while ( $args{'filename'}->[$count] ) { + push (@filename, $args{'filename'}->[$count]); + $count++; + } + my $filename = "@filename"; + + $log->debug("viewing file : $filename"); + + $log->debug("creating File object: $filename"); + my $file = SandWeb::File->new( + 'config_obj' => $config, + 'log_obj' => $log, + 'filename' => $filename, + 'location' => "$users_dir/$username/$module_name$location", + ); + + unless (@filename) { + $log->debug("no files selected for removal"); + set_error("Please select file(s) or folder(s) to delete."); + browse_module_menu( + ck_auth => $ck_auth, + location => $location, + module_name => $module_name, + repo_name => $repo_name, + ); + } + + foreach my $entry (@filename) { + $log->debug("creating File object"); + my $file = SandWeb::File->new( + 'log_obj' => $log, + 'filename' => $entry, + 'location' => "$users_dir/$username/$module_name$location", + ); + + $log->debug("removing file"); + if ($file) { + if ( $file->get_file_type() eq 'Directory' ) { + $file->delete_folder(); + } else { + if ( $file->delete_file() ) { + set_error("$filename deleted."); + } else { + set_error("Cannot delete $filename."); + } + } + } + } + + browse_module_menu( + ck_auth => $ck_auth, + location => $location, + module_name => $module_name, + repo_name => $repo_name, ); } |
From: Rob H. <for...@us...> - 2002-02-24 05:28:04
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv27898/templates Modified Files: edit_file.html view_file.html Log Message: moved edit_file into it's own subroutine Index: edit_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/edit_file.html,v retrieving revision 1.25 retrieving revision 1.26 diff -U2 -r1.25 -r1.26 --- edit_file.html 20 Feb 2002 04:26:36 -0000 1.25 +++ edit_file.html 24 Feb 2002 05:28:02 -0000 1.26 @@ -2,5 +2,5 @@ <td width="100%"> <form submit="<TMPL_VAR NAME=PROGNAME>" method="POST"> - <input name="action" value="browse_file" type="hidden" /> + <input name="action" value="edit_file" type="hidden" /> <input name="file_command" value="edit" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.36 retrieving revision 1.37 diff -U2 -r1.36 -r1.37 --- view_file.html 23 Feb 2002 04:24:37 -0000 1.36 +++ view_file.html 24 Feb 2002 05:28:02 -0000 1.37 @@ -8,5 +8,5 @@ [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=browse_file&file_command=download&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">download</a>] <TMPL_IF NAME=EDIT> - [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=browse_file&file_command=edit&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">edit</a>] + [<a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=edit_file&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>&module_name=<TMPL_VAR NAME=MODULE_NAME>">edit</a>] </TMPL_IF> <TMPL_VAR NAME=ERROR> |