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...> - 2001-12-03 23:09:43
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv19834/bin Modified Files: sandweb.cgi Log Message: began working on preferences stuff, right now we only support one repository, but we _fully_ support all possible repository options. the vcs_prefs need some work, though. I'm still working on it, as soon as it's good I'll check it in. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.80 retrieving revision 1.81 diff -U2 -r1.80 -r1.81 --- sandweb.cgi 2001/11/30 20:42:04 1.80 +++ sandweb.cgi 2001/12/03 23:09:40 1.81 @@ -148,4 +148,13 @@ ); } + elsif ( param('action') eq 'vcs_prefs_menu' ) { + # called VCS preferences + vcs_prefs_menu( + cookie => $cookie, + filename => param('filename'), + command => param('command'), + location => param('location'), + ); + } else { # called an invalid page @@ -258,10 +267,18 @@ my $template_dir = $config->{'paths'}->{'template_dir'}; my $users_dir = $config->{'paths'}->{'users_dir'}; - my $repo_type = $userprefs->{'repository'}->{'VCS'}; + my $server = $userprefs->{'repository'}->{'server'}; + my $vcs_username = $userprefs->{'repository'}->{'username'}; + my $repo_type = $userprefs->{'repository'}->{'repo_type'}; + my $connection = $userprefs->{'repository'}->{'connection'}; my $root = $userprefs->{'repository'}->{'root'}; my $sandbox = $userprefs->{'paths'}->{'users_dir'}; + my $vcsroot; + + if ( $repo_type = 'CVS' ) { + $vcsroot = ":$connection:$vcs_username\@$server:$root"; + } my $repository = SandWeb::Repository->new( - root => $root, + root => "$vcsroot", repo_type => $repo_type, sandbox => $sandbox, @@ -320,8 +337,16 @@ my $template_dir = $config->{'paths'}->{'template_dir'}; my $users_dir = $config->{'paths'}->{'users_dir'}; - my $repo_type = $userprefs->{'repository'}->{'VCS'}; - my $root = $userprefs->{'repository'}->{'root'}; - my $sandbox = $userprefs->{'paths'}->{'users_dir'}; + my $server = $userprefs->{'repository'}->{'server'}; + my $vcs_username = $userprefs->{'repository'}->{'username'}; + my $repo_type = $userprefs->{'repository'}->{'repo_type'}; + my $connection = $userprefs->{'repository'}->{'connection'}; + my $root = $userprefs->{'repository'}->{'root'}; + my $sandbox = $userprefs->{'paths'}->{'users_dir'}; + my $vcsroot; + if ( $repo_type = 'CVS' ) { + $vcsroot = ":$connection:$vcs_username\@$server:$root"; + } + my $repository = SandWeb::Repository->new( root => $root, @@ -551,11 +576,19 @@ my $template_dir = $config->{'paths'}->{'template_dir'}; my $users_dir = $config->{'paths'}->{'users_dir'}; - my $repo_type = $userprefs->{'repository'}->{'VCS'}; - my $root = $userprefs->{'repository'}->{'root'}; my %return; - my $sandbox = $userprefs->{'paths'}->{'users_dir'}; + my $server = $userprefs->{'repository'}->{'server'}; + my $vcs_username = $userprefs->{'repository'}->{'username'}; + my $repo_type = $userprefs->{'repository'}->{'repo_type'}; + my $connection = $userprefs->{'repository'}->{'connection'}; + my $root = $userprefs->{'repository'}->{'root'}; + my $sandbox = $userprefs->{'paths'}->{'users_dir'}; + my $vcsroot; + if ( $repo_type = 'CVS' ) { + $vcsroot = ":$connection:$vcs_username\@$server:$root"; + } + my $repository = SandWeb::Repository->new( - root => $root, + root => $vcsroot, repo_type => $repo_type, sandbox => "$users_dir/$username", @@ -648,4 +681,36 @@ FULL_NAME => $full_name, WORK_DIR => $work_dir, + ); + + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> 'SandWeb : Preferences Menu', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'preferences menu', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); + exit 0; +} + +sub vcs_prefs_menu { + my %args = @_; + my $cookie = $args{'cookie'}; + unless ($cookie) { + &login_menu(); + exit 0; + } + + load_prefs(1); # load prefs and do not log error msg + my $username = $auth->get_userinfo('username'); + my $server = $userprefs->{'repository'}->{'server'}; + my $root = $userprefs->{'repository'}->{'root'}; + my $repo_type = $userprefs->{'repository'}->{'repo_type'}; + my $connection = $userprefs->{'repository'}->{'connection'}; + my $content = $ui->get_vcs_prefs( + PROGNAME => $progname, + SERVER => $server, + ROOT => $root, ); |
From: Rob H. <for...@us...> - 2001-11-30 21:08:11
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv25991/templates Modified Files: browse.html commit.html create_file.html create_folder.html edit_file.html Log Message: remove present tense/past tense form submit/subroutine style Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.30 retrieving revision 1.31 diff -U2 -r1.30 -r1.31 --- browse.html 2001/11/28 20:59:45 1.30 +++ browse.html 2001/11/30 20:42:05 1.31 @@ -31,11 +31,11 @@ </td> <td width="60%" colspan="3" align="center"> - <a href="<TMPL_VAR NAME=PROGNAME>?action=file&filename=0&command=create_file&location=<TMPL_VAR NAME=LOCATION>">Create File</a> + <a href="<TMPL_VAR NAME=PROGNAME>?action=file&command=create_file&location=<TMPL_VAR NAME=LOCATION>">Create File</a>   |   - <a href="<TMPL_VAR NAME=PROGNAME>?action=file&filename=0&command=create_folder&location=<TMPL_VAR NAME=LOCATION>">Create Folder</a> + <a href="<TMPL_VAR NAME=PROGNAME>?action=file&command=create_folder&location=<TMPL_VAR NAME=LOCATION>">Create Folder</a>   |   - <a href="<TMPL_VAR NAME=PROGNAME>?action=file&filename=0&command=upload&location=<TMPL_VAR NAME=LOCATION>">Upload</a> + <a href="<TMPL_VAR NAME=PROGNAME>?action=file&command=upload&location=<TMPL_VAR NAME=LOCATION>">Upload</a>   |   - <a href="<TMPL_VAR NAME=PROGNAME>?action=file&filename=0&command=checkout&location=<TMPL_VAR NAME=LOCATION>">Checkout</a> + <a href="<TMPL_VAR NAME=PROGNAME>?action=file&command=checkout&location=<TMPL_VAR NAME=LOCATION>">Checkout</a> <br /> </td> Index: commit.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/commit.html,v retrieving revision 1.2 retrieving revision 1.3 diff -U2 -r1.2 -r1.3 --- commit.html 2001/11/27 00:47:17 1.2 +++ commit.html 2001/11/30 20:42:05 1.3 @@ -3,5 +3,5 @@ <form submit="<TMPL_VAR NAME=PROGNAME>" type="get"> <input type="hidden" name="action" value="vcsaction" /> - <input type="hidden" name="command" value="committed" /> + <input type="hidden" name="command" value="commit" /> <input type="hidden" name="filename" value="<TMPL_VAR NAME=FILENAME>" /> <input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" /> Index: create_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/create_file.html,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- create_file.html 2001/11/26 19:01:21 1.1 +++ create_file.html 2001/11/30 20:42:05 1.2 @@ -1,5 +1,5 @@ <form action="<TMPL_VAR NAME=PROGNAME>"> <input name="action" value="file" type="hidden" /> -<input name="command" value="created_file" type="hidden" /> +<input name="command" value="create_file" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> <input name="fullpath" value="<TMPL_VAR NAME=FULLPATH>" type="hidden" /> Index: create_folder.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/create_folder.html,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- create_folder.html 2001/11/26 19:01:21 1.1 +++ create_folder.html 2001/11/30 20:42:05 1.2 @@ -1,5 +1,5 @@ <form action="<TMPL_VAR NAME=PROGNAME>"> <input name="action" value="file" type="hidden" /> -<input name="command" value="created_folder" type="hidden" /> +<input name="command" value="create_folder" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> <input name="fullpath" value="<TMPL_VAR NAME=FULLPATH>" type="hidden" /> Index: edit_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/edit_file.html,v retrieving revision 1.5 retrieving revision 1.6 diff -U2 -r1.5 -r1.6 --- edit_file.html 2001/11/29 20:48:07 1.5 +++ edit_file.html 2001/11/30 20:42:05 1.6 @@ -3,5 +3,5 @@ <form submit="<TMPL_VAR NAME=PROGNAME>"> <input name="action" value="file" type="hidden" /> - <input name="command" value="edited_file" type="hidden" /> + <input name="command" value="edit" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> <input name="fullpath" value="<TMPL_VAR NAME=FULLPATH>" type="hidden" /> |
From: Rob H. <for...@us...> - 2001-11-30 21:08:11
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv25991/bin Modified Files: sandweb.cgi Log Message: remove present tense/past tense form submit/subroutine style Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.79 retrieving revision 1.80 diff -U2 -r1.79 -r1.80 --- sandweb.cgi 2001/11/27 02:40:35 1.79 +++ sandweb.cgi 2001/11/30 20:42:04 1.80 @@ -121,5 +121,5 @@ } elsif ( param('action') eq 'logout' ) { - # calle gout + # called logout logout(); } @@ -135,5 +135,4 @@ file( cookie => $cookie, - filename => param('filename'), command => param('command'), location => param('location'), @@ -315,6 +314,7 @@ my $command = $args{'command'}; - my $filename = $args{'filename'}; my $location = $args{'location'}; + my $filename = param('filename'); + my $save = param('save'); my $username = $auth->get_userinfo('username'); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -333,17 +333,14 @@ my $permissions; my $file_type; + my $file; + if ($filename) { + $file = SandWeb::File->new( + 'filename' => $filename, + 'location' => "$users_dir/$username$location", + ); + } - my $file = SandWeb::File->new( - 'filename' => $filename, - 'location' => "$users_dir/$username$location", - ); if ( $command eq 'info' ) { - if ($filename) { - if (! -f "$users_dir/$username/$filename" ) { - set_error("File does not exist!"); - browse_menu(); - } - } # can't give the leading / to the VCS $filename =~ s/\///; @@ -351,14 +348,14 @@ my %return = $repository->log( file => "$filename" ); my $content = $ui->file_info( - PROGNAME => $progname, - LOCATION => $location, - FULLPATH => "$users_dir/$username/$location", + PROGNAME => $progname, + LOCATION => $location, + FULLPATH => "$users_dir/$username/$location", VCS_OUTPUT => $return{'output'}, - VCS_ERROR => $return{'error'}, + VCS_ERROR => $return{'error'}, ); - print header( -cookie => $cookie ); - $ui->print_screen( - TITLE=> 'SandWeb : File Info', + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> 'SandWeb : File Info', MENU_TITLE => 'SandWeb', SUBMENU_TITLE => 'file info', @@ -366,15 +363,8 @@ CONTENT => $content, ERROR => $error, - ); - exit 0; + ); + exit 0; } elsif ( $command eq 'view' ) { - if ($filename) { - if (! -f "$users_dir/$username/$filename" ) { - set_error("File does not exist!"); - browse_menu(); - } - } - if ( "$file->get_file_type()" eq "Binary" ) { set_error("This does not appear to be a text file."); @@ -402,9 +392,16 @@ } elsif ( $command eq 'edit' ) { - if ($filename) { - if (! -f "$users_dir/$username/$filename" ) { - set_error("File does not exist!"); - browse_menu(); - } + if ($save) { + my $data = param('data'), + my $filename = $file->get_filename(); + + open ( FILE, "> $users_dir/$username$filename" ); + print FILE "$data"; + close FILE; + + browse_menu( + cookie => $cookie, + path => $location, + ); } if ( $file->get_file_type() eq "Binary" ) { @@ -435,18 +432,13 @@ exit 0; } - elsif ( $command eq 'edited_file' ) { - my $data = param('data'), - my $filename = $file->get_filename(); - - open ( FILE, "> $users_dir/$username$filename" ); - print FILE "$data"; - close FILE; - - browse_menu( - cookie => $cookie, - path => $location, - ); - } elsif ( $command eq 'create_file' ) { + if ($file) { + $file->create_file(); + browse_menu( + cookie => $cookie, + path => $location, + ); + exit 0; + } my $content = $ui->create_file( PROGNAME => $progname, @@ -467,4 +459,12 @@ } elsif ( $command eq 'create_folder' ) { + if ($file) { + $file->create_folder(); + browse_menu( + cookie => $cookie, + path => $location, + ); + exit 0; + } my $content = $ui->create_folder( @@ -473,5 +473,4 @@ FULLPATH => "$users_dir/$username/$location", ); - print header( -cookie => $cookie ); $ui->print_screen( @@ -485,18 +484,4 @@ exit 0; } - elsif ( $command eq 'created_file' ) { - $file->create_file(); - browse_menu( - cookie => $cookie, - path => $location, - ); - } - elsif ( $command eq 'created_folder' ) { - $file->create_folder(); - browse_menu( - cookie => $cookie, - path => $location, - ); - } elsif ( $command eq 'upload' ) { my $content = $ui->upload_file( @@ -562,4 +547,5 @@ my $filename = $args{'filename'}; my $location = $args{'location'}; + my $message = param('message'); my $username = $auth->get_userinfo('username'); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -576,4 +562,29 @@ ); if ( $command eq 'commit' ) { + if ($message) { + # can't give the leading / to the VCS + $location =~ s/\///; + %return = $repository->commit( + file => "$location/$filename", + message => "$message", + ); + my $content = $ui->get_vcs_output( + LOCATION => $location, + PROGNAME => $progname, + FULLPATH => "$users_dir/$username/$location", + VCS_OUTPUT => $return{'output'}, + VCS_ERROR => $return{'error'}, + ); + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> "SandWeb : VCS $command", + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => "VCS $command", + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); + exit 0; + } my $content = $ui->get_commit( LOCATION => $location, @@ -592,12 +603,4 @@ ); exit 0; - } - elsif ($command eq "committed") { - # can't give the leading / to the VCS - $location =~ s/\///; - %return = $repository->commit( - file => "$location/$filename", - message => param('message'), - ); } else { |
From: Rob H. <for...@us...> - 2001-11-30 20:31:45
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv22947 Modified Files: view_file.html Log Message: grr.. formatting issues. stupid spaces :) Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- view_file.html 2001/11/27 01:27:34 1.6 +++ view_file.html 2001/11/30 20:31:42 1.7 @@ -4,7 +4,5 @@ <input type="submit" name="view_method" value="Download" /> <TMPL_VAR NAME=ERROR> -<pre> -<TMPL_VAR NAME=CONTENT> -</pre> +<pre> <TMPL_VAR NAME=CONTENT></pre> </form> </p> |
From: Rob H. <for...@us...> - 2001-11-29 20:48:11
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv14858 Modified Files: edit_file.html Log Message: putting a space before the variable entry seems to give the correct layout in the textarea. Odd. Index: edit_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/edit_file.html,v retrieving revision 1.4 retrieving revision 1.5 diff -U2 -r1.4 -r1.5 --- edit_file.html 2001/11/27 18:19:19 1.4 +++ edit_file.html 2001/11/29 20:48:07 1.5 @@ -10,5 +10,5 @@ <pre> <textarea name="data" cols="80" rows="24"> -<TMPL_VAR NAME=CONTENT> + <TMPL_VAR NAME=CONTENT> </textarea> </pre> |
From: Rob H. <for...@us...> - 2001-11-28 20:59:49
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv14814 Modified Files: browse.html Log Message: added javascript selectAll/clearAll for browse template. This was just a usability issue that was bugging me. there's no way to do this without javascript, not sure if we should hide things like this from browsers with js turned off. i wrote the javascript directly into this template. in the longer term it's probably better to have one .js file called from the framework. Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.29 retrieving revision 1.30 diff -U2 -r1.29 -r1.30 --- browse.html 2001/11/24 13:20:43 1.29 +++ browse.html 2001/11/28 20:59:45 1.30 @@ -1,4 +1,17 @@ +<script language="javascript"> +function selectAll(field) { + for (i = 0; i < field.length; i++) + field[i].checked = true ; +} + +function clearAll(field) { + for (i = 0; i < field.length; i++) + field[i].checked = false ; +} + + +</script> <table width="100%" border="0" cellspacing="0" cellpadding="2"> - <form method="get" submit="<TMPL_VAR NAME=PROGNAME>"> + <form method="get" submit="<TMPL_VAR NAME=PROGNAME>" name="browse"> <input type="hidden" name="action" value="vcsaction" /> <input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" /> @@ -31,4 +44,9 @@ </td> </tr> + <a href="javascript:selectAll(document.browse.filename)"> + Select All</a> + + <a href="javascript:clearAll(document.browse.filename)"> + Clear All</a> <tr> <td width="100%"> |
From: Rob H. <for...@us...> - 2001-11-27 18:19:23
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv18396/templates Modified Files: edit_file.html Log Message: took out the space before the template variable, it causes there to be a space in the textarea when you're editing a file. Sucks. Index: edit_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/edit_file.html,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- edit_file.html 2001/11/24 13:20:43 1.3 +++ edit_file.html 2001/11/27 18:19:19 1.4 @@ -10,5 +10,5 @@ <pre> <textarea name="data" cols="80" rows="24"> - <TMPL_VAR NAME=CONTENT> +<TMPL_VAR NAME=CONTENT> </textarea> </pre> |
From: Rob H. <for...@us...> - 2001-11-27 02:40:38
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv17791/bin Modified Files: sandweb.cgi Log Message: fixed bug in vcsaction/committed Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.78 retrieving revision 1.79 diff -U2 -r1.78 -r1.79 --- sandweb.cgi 2001/11/27 01:40:48 1.78 +++ sandweb.cgi 2001/11/27 02:40:35 1.79 @@ -598,5 +598,5 @@ %return = $repository->commit( file => "$location/$filename", - message => "param(message)", + message => param('message'), ); } |
From: Rob H. <for...@us...> - 2001-11-27 01:40:51
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv5455/bin Modified Files: sandweb.cgi Log Message: fixed annoying bug that made all new files/folders be created in the top-level sandbox dir. create_file/folder now work as expected. However, they don't warn you if there's a problem. we have to make File.pm actually generate error codes, and set the set_error accordingly. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.77 retrieving revision 1.78 diff -U2 -r1.77 -r1.78 --- sandweb.cgi 2001/11/27 00:47:17 1.77 +++ sandweb.cgi 2001/11/27 01:40:48 1.78 @@ -337,5 +337,5 @@ my $file = SandWeb::File->new( 'filename' => $filename, - 'location' => "$users_dir/$username", + 'location' => "$users_dir/$username$location", ); if ( $command eq 'info' ) { |
From: Rob H. <for...@us...> - 2001-11-27 01:38:02
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv3309/templates Modified Files: view_file.html Log Message: typo fix Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.5 retrieving revision 1.6 diff -U2 -r1.5 -r1.6 --- view_file.html 2001/11/27 00:47:17 1.5 +++ view_file.html 2001/11/27 01:27:34 1.6 @@ -3,7 +3,7 @@ <form submit="<TMPL_VAR NAME=PROGNAME>"> <input type="submit" name="view_method" value="Download" /> -<pre> <TMPL_VAR NAME=ERROR> -<TMPL_VAR NAME=OUTPUT> +<pre> +<TMPL_VAR NAME=CONTENT> </pre> </form> |
From: Rob H. <for...@us...> - 2001-11-27 01:29:24
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv3695/lib/SandWeb Modified Files: File.pm Log Message: oops, this is a UMASK, not a mode ... :) Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- File.pm 2001/11/26 18:14:24 1.14 +++ File.pm 2001/11/27 01:29:21 1.15 @@ -104,5 +104,5 @@ my $filename = $self->{'filename'}; - my $return = mkdir( "$location/$filename", "0662" ); + my $return = mkdir( "$location/$filename", "0336" ); return $return; |
From: Rob H. <for...@us...> - 2001-11-27 00:47:20
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv27885/templates Modified Files: commit.html vcs_output.html view_file.html Added Files: file_info.html Log Message: gave the file action's info command it's own template. This will be neccessary for CVSWeb-like output. We are really close on this - we just need to parse the "cvs log" output ( this is definitely going to be VCS-dependant :/ ) and implement colorized diff. Then we've reached parity with CVSWeb/ViewCVS. --- NEW FILE --- <p> <form> <input name="<TMPL_VAR NAME=LOCATION>" type="hidden"> <input name="<TMPL_VAR NAME=FULLPATH>" type="hidden"> <input name="<TMPL_VAR NAME=PROGNAME>" type="hidden"> </form> <TMPL_VAR NAME=FILENAME> <font color="#FF0000"><TMPL_VAR NAME=VCS_ERROR></font> <pre> <TMPL_VAR NAME=VCS_OUTPUT> </pre> </p> Index: commit.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/commit.html,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- commit.html 2001/08/07 19:24:54 1.1 +++ commit.html 2001/11/27 00:47:17 1.2 @@ -1,8 +1,10 @@ <center> Please enter a commit message for <TMPL_VAR NAME=LOCATION>/<TMPL_VAR NAME=FILENAME> : - <form submit="<TMPL_VAR NAME=FILENAME>" type="get"> - <input type="hidden" name="action" value="commit" /> + <form submit="<TMPL_VAR NAME=PROGNAME>" type="get"> + <input type="hidden" name="action" value="vcsaction" /> + <input type="hidden" name="command" value="committed" /> <input type="hidden" name="filename" value="<TMPL_VAR NAME=FILENAME>" /> <input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" /> + <input type="hidden" name="fullpath" value="<TMPL_VAR NAME=FULLPATH>" /> <input type="text" name="message" /> <input type="submit" name="commit" value="Done" /> Index: vcs_output.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/vcs_output.html,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- vcs_output.html 2001/08/15 22:06:47 1.1 +++ vcs_output.html 2001/11/27 00:47:17 1.2 @@ -1,7 +1,12 @@ <p> - <TMPL_VAR NAME=FILENAME> - <TMPL_VAR NAME=ERROR> + <form> + <input name="<TMPL_VAR NAME=LOCATION>" type="hidden"> + <input name="<TMPL_VAR NAME=FULLPATH>" type="hidden"> + <input name="<TMPL_VAR NAME=PROGNAME>" type="hidden"> + </form> + <TMPL_VAR NAME=FILENAME> + <font color="#FF0000"><TMPL_VAR NAME=VCS_ERROR></font> <pre> - <TMPL_VAR NAME=OUTPUT> + <TMPL_VAR NAME=VCS_OUTPUT> </pre> </p> Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.4 retrieving revision 1.5 diff -U2 -r1.4 -r1.5 --- view_file.html 2001/11/22 08:29:00 1.4 +++ view_file.html 2001/11/27 00:47:17 1.5 @@ -3,9 +3,8 @@ <form submit="<TMPL_VAR NAME=PROGNAME>"> <input type="submit" name="view_method" value="Download" /> - <pre> - <TMPL_VAR NAME=CONTENT> - </pre> +<pre> +<TMPL_VAR NAME=ERROR> +<TMPL_VAR NAME=OUTPUT> +</pre> </form> - <TMPL_VAR NAME=ERROR> - <TMPL_VAR NAME=OUTPUT> </p> |
From: Rob H. <for...@us...> - 2001-11-27 00:47:20
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv27885/lib/SandWeb Modified Files: UI.pm Log Message: gave the file action's info command it's own template. This will be neccessary for CVSWeb-like output. We are really close on this - we just need to parse the "cvs log" output ( this is definitely going to be VCS-dependant :/ ) and implement colorized diff. Then we've reached parity with CVSWeb/ViewCVS. Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -U2 -r1.21 -r1.22 --- UI.pm 2001/11/22 09:35:38 1.21 +++ UI.pm 2001/11/27 00:47:17 1.22 @@ -251,4 +251,27 @@ } +sub file_info { + my $self = shift; + my %args = @_; + + my $template_dir = $self->_get_template_dir(); + my $filename = $args{'filename'}; + my $location = $args{'location'}; + my $log = $self->_logobj(); + + # this will eventually be $conf->defaults() + my %defaults = ( + # CGI_PATH => $self->_get_cgi_path(), + # CGI_EXEC => $self->_get_cgi_exec(), + LOCATION => $location, + ); + + # generate content data + my $tmp = HTML::Template->new(filename => "$template_dir/file_info.html"); + $tmp->param( %defaults, %args ); + my @contents = $tmp->output; + return join('', @contents); +} + sub create_file { my $self = shift; |
From: Rob H. <for...@us...> - 2001-11-27 00:47:19
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv27885/bin Modified Files: sandweb.cgi Log Message: gave the file action's info command it's own template. This will be neccessary for CVSWeb-like output. We are really close on this - we just need to parse the "cvs log" output ( this is definitely going to be VCS-dependant :/ ) and implement colorized diff. Then we've reached parity with CVSWeb/ViewCVS. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.76 retrieving revision 1.77 diff -U2 -r1.76 -r1.77 --- sandweb.cgi 2001/11/26 23:33:16 1.76 +++ sandweb.cgi 2001/11/27 00:47:17 1.77 @@ -346,10 +346,26 @@ } } - print header; - print '<pre>'; + # can't give the leading / to the VCS + $filename =~ s/\///; + my %return = $repository->log( file => "$filename" ); - print $return{'output'}; - print '</pre>'; - exit 0; + my $content = $ui->file_info( + PROGNAME => $progname, + LOCATION => $location, + FULLPATH => "$users_dir/$username/$location", + VCS_OUTPUT => $return{'output'}, + VCS_ERROR => $return{'error'}, + ); + + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> 'SandWeb : File Info', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'file info', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); + exit 0; } elsif ( $command eq 'view' ) { @@ -551,4 +567,5 @@ my $repo_type = $userprefs->{'repository'}->{'VCS'}; my $root = $userprefs->{'repository'}->{'root'}; + my %return; my $sandbox = $userprefs->{'paths'}->{'users_dir'}; @@ -558,12 +575,53 @@ sandbox => "$users_dir/$username", ); - - my %return = $repository->$command( file => "$location/$filename" ); + if ( $command eq 'commit' ) { + my $content = $ui->get_commit( + LOCATION => $location, + PROGNAME => $progname, + FULLPATH => "$users_dir/$username/$location", + FILENAME => $filename, + ); + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> 'SandWeb : Commit', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'commit file(s)', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); + exit 0; + } + elsif ($command eq "committed") { + # can't give the leading / to the VCS + $location =~ s/\///; + %return = $repository->commit( + file => "$location/$filename", + message => "param(message)", + ); + } + else { + # can't give the leading / to the VCS + $location =~ s/\///; - print header; - print '<pre>'; - print "$return{'output'}\n"; - print '</pre>'; - exit 0; + %return = $repository->$command( file => "$location/$filename" ); + } + my $content = $ui->get_vcs_output( + LOCATION => $location, + PROGNAME => $progname, + FULLPATH => "$users_dir/$username/$location", + VCS_OUTPUT => $return{'output'}, + VCS_ERROR => $return{'error'}, + ); + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> "SandWeb : VCS $command", + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => "VCS $command", + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); + exit 0; } |
From: Rob H. <for...@us...> - 2001-11-27 00:34:27
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv25949 Modified Files: CVS.pm Log Message: removed the slash check. I just realized how stupid it is; this is not CVS.pm's job. Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -U2 -r1.12 -r1.13 --- CVS.pm 2001/11/27 00:26:48 1.12 +++ CVS.pm 2001/11/27 00:34:24 1.13 @@ -48,12 +48,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -92,12 +84,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -138,12 +122,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -171,12 +147,4 @@ if ($date) { push @param, " $date" }; - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -226,12 +194,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -272,12 +232,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -316,12 +268,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -358,12 +302,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -397,12 +333,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -436,12 +364,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -475,12 +395,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -530,12 +442,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -554,12 +458,4 @@ my @param = 'logout'; - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -596,12 +492,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -640,12 +528,4 @@ } - # removing leading leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -684,12 +564,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -736,12 +608,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -778,12 +642,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -834,12 +690,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -880,12 +728,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -924,12 +764,4 @@ } - # removing leading // or / - - if ($file =~ '\/\/') { - $file =~ s/\/\///g; - } else { - $file =~ s/\///; - } - my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; |
From: Rob H. <for...@us...> - 2001-11-27 00:31:14
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv25279/lib/SandWeb Modified Files: Browse.pm Log Message: finally tracked down that stupid '//' bug, now I can take that workaround out of CVS.pm! It only happened when you clicked the "/" in the location field instead of clicking browse in the sidebar. fixed. Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -U2 -r1.19 -r1.20 --- Browse.pm 2001/11/24 13:20:43 1.19 +++ Browse.pm 2001/11/27 00:31:11 1.20 @@ -47,4 +47,8 @@ my $location; + if ($path eq '/') { + $path = ''; + } + if ($path) { # Security check, no "/.." allowed mister! |
From: Rob H. <for...@us...> - 2001-11-27 00:26:51
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv24490 Modified Files: CVS.pm Log Message: fixed another bug related to // .. sigh. Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -U2 -r1.11 -r1.12 --- CVS.pm 2001/11/26 23:33:17 1.11 +++ CVS.pm 2001/11/27 00:26:48 1.12 @@ -50,6 +50,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -91,6 +94,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -134,6 +140,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -164,6 +173,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -216,6 +228,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -259,6 +274,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -300,6 +318,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -339,6 +360,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -375,6 +399,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -411,6 +438,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -447,7 +477,10 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; - + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -499,6 +532,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -520,6 +556,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -559,6 +598,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -600,6 +642,9 @@ # removing leading leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -641,6 +686,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -690,6 +738,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -729,6 +780,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -782,6 +836,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -825,6 +882,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; @@ -866,6 +926,9 @@ # removing leading // or / - $file =~ s/\/\///g; - $file =~ s/\///; + if ($file =~ '\/\/') { + $file =~ s/\/\///g; + } else { + $file =~ s/\///; + } my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; |
From: Rob H. <for...@us...> - 2001-11-26 23:33:19
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv10409/bin Modified Files: sandweb.cgi Log Message: fixed a couple bugs in the file subroutine of sandweb.cgi, it was not passing the correct path to File->new(), and also did an "unless" instead of an "if" when checking to see if we were dealing with a binary file ( if so, a warning is issued when you view/edit the file ). Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.75 retrieving revision 1.76 diff -U2 -r1.75 -r1.76 --- sandweb.cgi 2001/11/26 18:14:23 1.75 +++ sandweb.cgi 2001/11/26 23:33:16 1.76 @@ -337,5 +337,5 @@ my $file = SandWeb::File->new( 'filename' => $filename, - 'location' => "$users_dir/$username/$location", + 'location' => "$users_dir/$username", ); if ( $command eq 'info' ) { @@ -360,5 +360,6 @@ } } - unless ( $file->get_file_type() eq "Binary" ) { + + if ( "$file->get_file_type()" eq "Binary" ) { set_error("This does not appear to be a text file."); } |
From: Rob H. <for...@us...> - 2001-11-26 23:33:19
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv10409/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: fixed a couple bugs in the file subroutine of sandweb.cgi, it was not passing the correct path to File->new(), and also did an "unless" instead of an "if" when checking to see if we were dealing with a binary file ( if so, a warning is issued when you view/edit the file ). Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -U2 -r1.10 -r1.11 --- CVS.pm 2001/11/26 19:48:14 1.10 +++ CVS.pm 2001/11/26 23:33:17 1.11 @@ -831,6 +831,8 @@ my $errorlevel = $?; - my %return = ( output => $output, - errorlevel => $errorlevel ); + my %return = ( + output => $output, + errorlevel => $errorlevel, + ); return %return; |
From: Rob H. <for...@us...> - 2001-11-26 19:48:19
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv32124 Modified Files: CVS.pm Log Message: put in rule to remove leading / or // ( it's sort of a bug that // gets in there, not sure how to handle it yet though :/ tricky one ). There is alot of redundancy in this class, alot of this stuff could probably be moved to the constructor. Not all of it, unfortunately. The thing is, most of the commands are carried out the exact same way, there's only a couple exceptions. Maybe there should be a catch-all method, and specific methods only where needed? I dunno, seems messy. anyway, it's not a big deal, just that the amount of copy/paste that's required to fix bugs like this seems against the whole idea of OOP. Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- CVS.pm 2001/11/26 18:42:46 1.9 +++ CVS.pm 2001/11/26 19:48:14 1.10 @@ -6,871 +6,892 @@ sub new { - my $class = shift; - my %args = @_; + my $class = shift; + my %args = @_; - my $root = $args{'root'}; - my $sandbox = $args{'sandbox'}; + my $root = $args{'root'}; + my $sandbox = $args{'sandbox'}; [...1545 lines suppressed...] + } } sub get_root { - my $self = shift; - if ($self->{'root'}) { - return $self->{'root'}; - } - else { - return 0; - } + my $self = shift; + if ($self->{'root'}) { + return $self->{'root'}; + } + else { + return 0; + } } |
From: Rob H. <for...@us...> - 2001-11-26 19:02:34
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv19476 Modified Files: upload.html Log Message: this should be action=file, command=upload, not action=upload doesn't actually do anything yet, but still :) Index: upload.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/upload.html,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- upload.html 2001/11/24 11:58:00 1.3 +++ upload.html 2001/11/26 19:02:32 1.4 @@ -1,5 +1,6 @@ <form method="post" action="<TMPL_VAR NAME=PROGNAME>" enctype="multipart/form-data"> -<input name="action" value="upload" type="hidden" /> +<input name="action" value="file" type="hidden" /> +<input name="command" value="upload" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> <input name="fullpath" value="<TMPL_VAR NAME=FULLPATH>" type="hidden" /> |
From: Rob H. <for...@us...> - 2001-11-26 19:01:23
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv19000 Added Files: create_file.html create_folder.html Log Message: oops, forgot to add the create_* templates. here they are. --- NEW FILE --- <form action="<TMPL_VAR NAME=PROGNAME>"> <input name="action" value="file" type="hidden" /> <input name="command" value="created_file" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> <input name="fullpath" value="<TMPL_VAR NAME=FULLPATH>" type="hidden" /> Location: <TMPL_VAR NAME=LOCATION><br /> <input name="filename" type="text" /><br /> <input name="done" type="submit" value="Done" /><br /> </form> --- NEW FILE --- <form action="<TMPL_VAR NAME=PROGNAME>"> <input name="action" value="file" type="hidden" /> <input name="command" value="created_folder" type="hidden" /> <input name="location" value="<TMPL_VAR NAME=LOCATION>" type="hidden" /> <input name="fullpath" value="<TMPL_VAR NAME=FULLPATH>" type="hidden" /> Location: <TMPL_VAR NAME=LOCATION><br /> <input name="filename" type="text" /><br /> <input name="done" type="submit" value="Done" /><br /> </form> |
From: Rob H. <for...@us...> - 2001-11-26 18:42:49
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv12840/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: now CVS.pm changes the working directory before executing CVS commands. This makes pserver work... woohoo! Checkout does not work yet however ( for other reasons ), and :ext: does not work with SSH/RSH unless you have hostkeys set up. If you do, it should work but I haven't tested it, since I don't. Once we can figure out a way to capture and answer the "password:" prompt, all of the above will work. Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -U2 -r1.8 -r1.9 --- CVS.pm 2001/08/20 15:32:52 1.8 +++ CVS.pm 2001/11/26 18:42:46 1.9 @@ -48,5 +48,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -84,5 +88,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -122,5 +130,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -147,5 +159,9 @@ if ($date) { push @param, " $date" }; - my $output = `cvs -d $root @param $file 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -194,5 +210,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -232,5 +252,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -268,5 +292,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -302,5 +330,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -333,5 +365,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -364,5 +400,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -394,6 +434,11 @@ } } + + # removing leading // + + $file =~ s/\/\///g; - my $output = `cvs -d $root @param @filenames 2>&1`; + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; + my $errorlevel = $?; @@ -441,5 +486,9 @@ } - my $output = `cvs -d $root @param $sandbox/$file 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -456,6 +505,10 @@ my $sandbox = $self->get_sandbox(); my @param = 'logout'; + + # removing leading // - my $output = `cvs -d $root @param $sandbox/$file 2>&1`; + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -491,5 +544,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -527,5 +584,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -562,6 +623,10 @@ } } + + # removing leading // + + $file =~ s/\/\///g; - my $output = `cvs -d $root @param @filenames 2>&1`; + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -607,5 +672,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -641,5 +710,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -689,5 +762,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -727,5 +804,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; @@ -761,5 +842,9 @@ } - my $output = `cvs -d $root @param @filenames 2>&1`; + # removing leading // + + $file =~ s/\/\///g; + + my $output = `cd $sandbox && cvs -d $root @param $file 2>&1`; my $errorlevel = $?; |
From: Rob H. <for...@us...> - 2001-11-26 18:14:27
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv3210/lib/SandWeb Modified Files: File.pm Log Message: implemented set_error correctly, also am getting complaints in a newer version of perl about mkdir requiring the second arg ( "mode" ).. weird. Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -U2 -r1.13 -r1.14 --- File.pm 2001/11/24 11:09:31 1.13 +++ File.pm 2001/11/26 18:14:24 1.14 @@ -104,5 +104,5 @@ my $filename = $self->{'filename'}; - my $return = mkdir( "$location/$filename" ); + my $return = mkdir( "$location/$filename", "0662" ); return $return; |
From: Rob H. <for...@us...> - 2001-11-26 18:14:26
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv3210/bin Modified Files: sandweb.cgi Log Message: implemented set_error correctly, also am getting complaints in a newer version of perl about mkdir requiring the second arg ( "mode" ).. weird. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.74 retrieving revision 1.75 diff -U2 -r1.74 -r1.75 --- sandweb.cgi 2001/11/24 19:05:33 1.74 +++ sandweb.cgi 2001/11/26 18:14:23 1.75 @@ -342,5 +342,5 @@ if ($filename) { if (! -f "$users_dir/$username/$filename" ) { - set_error = "File does not exist!"; + set_error("File does not exist!"); browse_menu(); } @@ -356,10 +356,10 @@ if ($filename) { if (! -f "$users_dir/$username/$filename" ) { - set_error = "File does not exist!"; + set_error("File does not exist!"); browse_menu(); } } unless ( $file->get_file_type() eq "Binary" ) { - $error = "This does not appear to be a text file."; + set_error("This does not appear to be a text file."); } my @tmp; @@ -387,10 +387,10 @@ if ($filename) { if (! -f "$users_dir/$username/$filename" ) { - set_error = "File does not exist!"; + set_error("File does not exist!"); browse_menu(); } } if ( $file->get_file_type() eq "Binary" ) { - $error = "This does not appear to be a text file."; + set_error("This does not appear to be a text file."); } my @tmp; @@ -517,5 +517,5 @@ } else { - $error = "Invalid selection: $command"; + set_error("Invalid selection: $command"); browse_menu( cookie => $cookie, |