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-01-22 08:25:49
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv3367/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: added colorized diff.. started from scratch, so it's pretty weak right now ;) Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- CVS.pm 2002/01/18 20:52:55 1.22 +++ CVS.pm 2002/01/22 08:25:45 1.23 @@ -5,4 +5,6 @@ package SandWeb::Repository::CVS; +use SandWeb::Diff; + sub new { my $class = shift; @@ -171,4 +173,5 @@ my $recurse = $args{'recurse'}; my $context = $args{'context'}; + my $unified = $args{'unified'}; my $file = $args{'file'}; @@ -180,10 +183,17 @@ if ($rev) { push @param, " -r $rev" }; if ($context) { push @param, " -c" }; + if ($unified) { push @param, " -u" }; if ($recurse) { push @param, " -R" }; print "cd $sandbox && cvs -d $root @param \"$file\" 2>&1"; - my $output = `cd $sandbox && cvs -d $root @param \"$file\" 2>&1`; + my $raw_output = `cd $sandbox && cvs -d $root @param \"$file\" 2>&1`; my $errorlevel = $?; + + my $diff = SandWeb::Diff->new( + diff => "$raw_output", + ); + + my $output = $diff->colored_diff(); my %return = ( |
From: Rob H. <for...@us...> - 2002-01-21 05:56:44
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv4203 Modified Files: Diff.pm Log Message: started cleaning up code, added a constructor, and reformatted the code Index: Diff.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Diff.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- Diff.pm 2002/01/21 04:01:23 1.1 +++ Diff.pm 2002/01/21 05:56:41 1.2 @@ -1,134 +1,146 @@ -my %args = @_; -my @diff = args{'diff'}; +#lib/SandWeb/Diff.pm +# +# the diff class. -my @rightCol = (); -my @leftCol = (); -my $state; -my $j; -my $tabstop; -my $hr_breakable; -my $string; -my $pr; -my $prcgi; - -my $diffcolorHeading='#99BBBB'; # color of 'Line'-heading of each diffed file -my $diffcolorEmpty='#CCCCCC'; # color of 'empty' lines -my $diffcolorAdd='#FF9999'; # Removed line(s) (left) ( - ) -my $diffcolorChange='#99FF99'; # Changed line(s) ( both ) -my $diffcolorRemove='#CCCCFF'; # Added line(s) ( - ) (right) -my $diffcolorDarkChange ='#99CC99';# lines, which are empty in change -my $difffontface="Helvetica,Arial"; -my $difffontsize="-1"; - -sub main { - my($title,$file1,$file2) = @_; - - my($i,$difftxt, $where_nd, $filename, $pathname); - - ($where_nd = my $where) =~ s/.diff$//; - ($filename = $where_nd) =~ s/^.*\///; - ($pathname = $where_nd) =~ s/(Attic\/)?[^\/]*$//; - (my $scriptwhere_nd = my $scriptwhere) =~ s/.diff$//; - - print "\n\n<center><font size=+2 face=Arial>$title</font></center><p>\n"; - print "<table border=0 cellspacing=0 cellpadding=0 width=100%>\n"; - print "<tr bgcolor=#ffffff>\n"; - print "<th width=\"50%\" valign=TOP>"; - print "SAMPLE DATA"; - print "</th>\n"; - print "<th width=\"50%\" valign=TOP>"; - print "SAMPLE DATA2"; - print "</th>\n"; - - my $fs="<font face=\"$difffontface\" size=\"$difffontsize\">"; - my $fe="</font>"; - - my $leftRow = 0; - my $rightRow = 0; - - # - # Process diff text - # - foreach my $difftxt (@diff) { - - if ($difftxt =~ /^@@/) { - my($oldline,$newline,$funname) = $difftxt =~ /@@ \-([0-9]+).*\+([0-9]+).*@@(.*)/; - my $state = "dump"; - $leftRow = 0; - $rightRow = 0; - } - else { - my($diffcode,$rest) = $difftxt =~ /^([-+ ])(.*)/; - $_= spacedHtmlText ($rest); - - # Add fontface, size - $_ = "$fs $_$fe"; +package SandWeb::Diff; + +sub new { + my $class = shift; + my %args = @_; + + my $self = bless { + 'diff' => $args{'diff'}, + }, $class; + + return $self; +} + +sub diff { + my @rightCol = (); + my @leftCol = (); + my $state; + my $j; + my $tabstop; + my $hr_breakable; + my $string; + my $pr; + my $prcgi; + my $diffcolorHeading='#99BBBB'; # color of 'Line'-heading of each diffed file + my $diffcolorEmpty='#CCCCCC'; # color of 'empty' lines + my $diffcolorAdd='#FF9999'; # Removed line(s) (left) ( - ) + my $diffcolorChange='#99FF99'; # Changed line(s) ( both ) + my $diffcolorRemove='#CCCCFF'; # Added line(s) ( - ) (right) + my $diffcolorDarkChange ='#99CC99';# lines, which are empty in change + my $difffontface="Helvetica,Arial"; + my $difffontsize="-1"; + + my($title,$file1,$file2) = @_; + + my($i,$difftxt, $where_nd, $filename, $pathname); + + ($where_nd = my $where) =~ s/.diff$//; + ($filename = $where_nd) =~ s/^.*\///; + ($pathname = $where_nd) =~ s/(Attic\/)?[^\/]*$//; + (my $scriptwhere_nd = my $scriptwhere) =~ s/.diff$//; + + print "\n\n<center><font size=+2 face=Arial>$title</font></center><p>\n"; + print "<table border=0 cellspacing=0 cellpadding=0 width=100%>\n"; + print "<tr bgcolor=#ffffff>\n"; + print "<th width=\"50%\" valign=TOP>"; + print "SAMPLE DATA"; + print "</th>\n"; + print "<th width=\"50%\" valign=TOP>"; + print "SAMPLE DATA2"; + print "</th>\n"; + + my $fs="<font face=\"$difffontface\" size=\"$difffontsize\">"; + my $fe="</font>"; + + my $leftRow = 0; + my $rightRow = 0; + + # + # Process diff text + # + foreach my $difftxt (@diff) { + + if ($difftxt =~ /^@@/) { + my($oldline,$newline,$funname) = $difftxt =~ /@@ \-([0-9]+).*\+([0-9]+).*@@(.*)/; + my $state = "dump"; + $leftRow = 0; + $rightRow = 0; + } else { + my($diffcode,$rest) = $difftxt =~ /^([-+ ])(.*)/; + $_= spacedHtmlText ($rest); + # Add fontface, size + $_ = "$fs $_$fe"; - ######### - # little state machine to parse unified-diff output (Hen, ze...@th...) - # in order to get some nice 'ediff'-mode output - # states: - # "dump" - just dump the value - # "PreChangeRemove" - we began with '-' .. so this could be the start of a 'change' area or just remove - # "PreChange" - okey, we got several '-' lines and moved to '+' lines -> this is a change block - ########## - - if ($diffcode eq '+') { - if ($state eq "dump") { # 'change' never begins with '+': just dump out value - print "<tr><td bgcolor=\"$diffcolorEmpty\"> </td><td bgcolor=\"$diffcolorAdd\">$_</td></tr>\n"; - } - else { # we got minus before - $state = "PreChange"; - $rightCol[$rightRow++] = $_; - } - } - elsif ($diffcode eq '-') { - $state = "PreChangeRemove"; - $leftCol[$leftRow++] = $_; - } - else { # empty diffcode - flush_diff_rows( \@leftCol, \@rightCol, $leftRow, $rightRow); - print "<tr><td>$_</td><td>$_</td></tr>\n"; - $state = "dump"; - $leftRow = 0; - $rightRow = 0; - } - } - } - flush_diff_rows( \@leftCol, \@rightCol, $leftRow, $rightRow ); - - # state is empty if we didn't have any change - if (!$state) { - print "<tr><td colspan=2> </td></tr>"; - print "<tr bgcolor=\"$diffcolorEmpty\" >"; - print "<td colspan=2 align=center><b>- No viewable Change -</b></td></tr>"; - } - - print "</table>\n\n"; - print "<br><hr noshade width=100%>\n"; - -} - -sub flush_diff_rows ($$$$) -{ - my $j; - my ($leftColRef,$rightColRef,$leftRow,$rightRow) = @_; - if ($state eq "PreChangeRemove") { # we just got remove-lines before - for ($j = 0 ; $j < $leftRow; $j++) { - print "<tr><td bgcolor=\"$diffcolorRemove\">@$leftColRef[$j]</td>"; - print "<td bgcolor=\"$diffcolorEmpty\"> </td></tr>\n"; - } - } - elsif ($state eq "PreChange") { # state eq "PreChange" - # we got removes with subsequent adds - for ($j = 0; $j < $leftRow || $j < $rightRow ; $j++) { # dump out both cols - print "<tr>"; - if ($j < $leftRow) { print "<td bgcolor=\"$diffcolorChange\">@$leftColRef[$j]</td>"; } - else { print "<td bgcolor=\"$diffcolorDarkChange\"> </td>"; } - if ($j < $rightRow) { print "<td bgcolor=\"$diffcolorChange\">@$rightColRef[$j]</td>"; } - else { print "<td bgcolor=\"$diffcolorDarkChange\"> </td>"; } - print "</tr>\n"; - } - } + ######### + # little state machine to parse unified-diff output (Hen, ze...@th...) + # in order to get some nice 'ediff'-mode output + # states: + # "dump" - just dump the value + # "PreChangeRemove" - we began with '-' .. so this could be the start of a 'change' area or just remove + # "PreChange" - okey, we got several '-' lines and moved to '+' lines -> this is a change block + ########## + + if ($diffcode eq '+') { + if ($state eq "dump") { # 'change' never begins with '+': just dump out value + print "<tr><td bgcolor=\"$diffcolorEmpty\"> </td><td bgcolor=\"$diffcolorAdd\">$_</td></tr>\n"; + } else { + # we got minus before + $state = "PreChange"; + $rightCol[$rightRow++] = $_; + } + } + + elsif ($diffcode eq '-') { + $state = "PreChangeRemove"; + $leftCol[$leftRow++] = $_; + } else { + # empty diffcode + flush_diff_rows( \@leftCol, \@rightCol, $leftRow, $rightRow); + print "<tr><td>$_</td><td>$_</td></tr>\n"; + $state = "dump"; + $leftRow = 0; + $rightRow = 0; + } + } + } + + flush_diff_rows( \@leftCol, \@rightCol, $leftRow, $rightRow ); + + # state is empty if we didn't have any change + if (!$state) { + print "<tr><td colspan=2> </td></tr>"; + print "<tr bgcolor=\"$diffcolorEmpty\" >"; + print "<td colspan=2 align=center><b>- No viewable Change -</b></td></tr>"; + } + print "</table>\n\n"; + print "<br><hr noshade width=100%>\n"; +} + +sub flush_diff_rows ($$$$) { + my $j; + my ($leftColRef,$rightColRef,$leftRow,$rightRow) = @_; + if ($state eq "PreChangeRemove") { # we just got remove-lines before + for ($j = 0 ; $j < $leftRow; $j++) { + print "<tr><td bgcolor=\"$diffcolorRemove\">@$leftColRef[$j]</td>"; + print "<td bgcolor=\"$diffcolorEmpty\"> </td></tr>\n"; + } + } + elsif ($state eq "PreChange") { # state eq "PreChange" + # we got removes with subsequent adds + for ($j = 0; $j < $leftRow || $j < $rightRow ; $j++) { # dump out both cols + print "<tr>"; + if ($j < $leftRow) { print "<td bgcolor=\"$diffcolorChange\">@$leftColRef[$j]</td>"; + } else { print "<td bgcolor=\"$diffcolorDarkChange\"> </td>"; +} + + if ($j < $rightRow) { print "<td bgcolor=\"$diffcolorChange\">@$rightColRef[$j]</td>"; } + else { print "<td bgcolor=\"$diffcolorDarkChange\"> </td>"; } + print "</tr>\n"; + } + } } @@ -188,3 +200,3 @@ } -&main(); +1; |
From: Rob H. <for...@us...> - 2002-01-21 04:01:26
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv7201 Added Files: Diff.pm Log Message: checking in current diff code. please note that this is not integrated with sandweb yet --- NEW FILE --- my %args = @_; my @diff = args{'diff'}; my @rightCol = (); my @leftCol = (); my $state; my $j; my $tabstop; my $hr_breakable; my $string; my $pr; my $prcgi; my $diffcolorHeading='#99BBBB'; # color of 'Line'-heading of each diffed file my $diffcolorEmpty='#CCCCCC'; # color of 'empty' lines my $diffcolorAdd='#FF9999'; # Removed line(s) (left) ( - ) my $diffcolorChange='#99FF99'; # Changed line(s) ( both ) my $diffcolorRemove='#CCCCFF'; # Added line(s) ( - ) (right) my $diffcolorDarkChange ='#99CC99';# lines, which are empty in change my $difffontface="Helvetica,Arial"; my $difffontsize="-1"; sub main { my($title,$file1,$file2) = @_; my($i,$difftxt, $where_nd, $filename, $pathname); ($where_nd = my $where) =~ s/.diff$//; ($filename = $where_nd) =~ s/^.*\///; ($pathname = $where_nd) =~ s/(Attic\/)?[^\/]*$//; (my $scriptwhere_nd = my $scriptwhere) =~ s/.diff$//; print "\n\n<center><font size=+2 face=Arial>$title</font></center><p>\n"; print "<table border=0 cellspacing=0 cellpadding=0 width=100%>\n"; print "<tr bgcolor=#ffffff>\n"; print "<th width=\"50%\" valign=TOP>"; print "SAMPLE DATA"; print "</th>\n"; print "<th width=\"50%\" valign=TOP>"; print "SAMPLE DATA2"; print "</th>\n"; my $fs="<font face=\"$difffontface\" size=\"$difffontsize\">"; my $fe="</font>"; my $leftRow = 0; my $rightRow = 0; # # Process diff text # foreach my $difftxt (@diff) { if ($difftxt =~ /^@@/) { my($oldline,$newline,$funname) = $difftxt =~ /@@ \-([0-9]+).*\+([0-9]+).*@@(.*)/; my $state = "dump"; $leftRow = 0; $rightRow = 0; } else { my($diffcode,$rest) = $difftxt =~ /^([-+ ])(.*)/; $_= spacedHtmlText ($rest); # Add fontface, size $_ = "$fs $_$fe"; ######### # little state machine to parse unified-diff output (Hen, ze...@th...) # in order to get some nice 'ediff'-mode output # states: # "dump" - just dump the value # "PreChangeRemove" - we began with '-' .. so this could be the start of a 'change' area or just remove # "PreChange" - okey, we got several '-' lines and moved to '+' lines -> this is a change block ########## if ($diffcode eq '+') { if ($state eq "dump") { # 'change' never begins with '+': just dump out value print "<tr><td bgcolor=\"$diffcolorEmpty\"> </td><td bgcolor=\"$diffcolorAdd\">$_</td></tr>\n"; } else { # we got minus before $state = "PreChange"; $rightCol[$rightRow++] = $_; } } elsif ($diffcode eq '-') { $state = "PreChangeRemove"; $leftCol[$leftRow++] = $_; } else { # empty diffcode flush_diff_rows( \@leftCol, \@rightCol, $leftRow, $rightRow); print "<tr><td>$_</td><td>$_</td></tr>\n"; $state = "dump"; $leftRow = 0; $rightRow = 0; } } } flush_diff_rows( \@leftCol, \@rightCol, $leftRow, $rightRow ); # state is empty if we didn't have any change if (!$state) { print "<tr><td colspan=2> </td></tr>"; print "<tr bgcolor=\"$diffcolorEmpty\" >"; print "<td colspan=2 align=center><b>- No viewable Change -</b></td></tr>"; } print "</table>\n\n"; print "<br><hr noshade width=100%>\n"; } sub flush_diff_rows ($$$$) { my $j; my ($leftColRef,$rightColRef,$leftRow,$rightRow) = @_; if ($state eq "PreChangeRemove") { # we just got remove-lines before for ($j = 0 ; $j < $leftRow; $j++) { print "<tr><td bgcolor=\"$diffcolorRemove\">@$leftColRef[$j]</td>"; print "<td bgcolor=\"$diffcolorEmpty\"> </td></tr>\n"; } } elsif ($state eq "PreChange") { # state eq "PreChange" # we got removes with subsequent adds for ($j = 0; $j < $leftRow || $j < $rightRow ; $j++) { # dump out both cols print "<tr>"; if ($j < $leftRow) { print "<td bgcolor=\"$diffcolorChange\">@$leftColRef[$j]</td>"; } else { print "<td bgcolor=\"$diffcolorDarkChange\"> </td>"; } if ($j < $rightRow) { print "<td bgcolor=\"$diffcolorChange\">@$rightColRef[$j]</td>"; } else { print "<td bgcolor=\"$diffcolorDarkChange\"> </td>"; } print "</tr>\n"; } } } sub spacedHtmlText { my($string, $pr) = @_; # Cut trailing spaces s/\s+$//; # Expand tabs $string =~ s/\t+/' ' x (length($&) * $tabstop - length($`) % $tabstop)/e if (defined $tabstop); # replace <tab> and <space> (§ is to protect us from htmlify) # gzip can make excellent use of this repeating pattern :-) $string =~ s/§/§%/g; #protect our & substitute if ($hr_breakable) { # make every other space 'breakable' $string =~ s/ / §nbsp; §nbsp; §nbsp; §nbsp;/g; # <tab> $string =~ s/ / §nbsp;/g; # 2 * <space> # leave single space as it is } else { $string =~ s/ /§nbsp;§nbsp;§nbsp;§nbsp;§nbsp;§nbsp;§nbsp;§nbsp;/g; $string =~ s/ /§nbsp;/g; } $string = htmlify($string); # unescape $string =~ s/§([^%])/&$1/g; $string =~ s/§%/§/g; return $string; } sub htmlify { my($string, $pr) = @_; # Special Characters; RFC 1866 $string =~ s/&/&/g; $string =~ s/\"/"/g; $string =~ s/</</g; $string =~ s/>/>/g; # get URL's as link .. $string =~ s§(http|ftp)(://[-a-zA-Z0-9%.~:/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*§<A HREF="$1$2$3">$1$2$3</A>§; # get e-mails as link $string =~ s§([-a-zA-Z0-9.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})§<A HREF="mailto:$1">$1</A>§; # get #PR as link .. if ($pr && defined $prcgi) { $string =~ s!\b((pr[:#]?\s*#?)|((bin|conf|docs|gnu|i386|kern|misc|ports)\/))(\d+)\b!<A HREF="$prcgi?pr=$5">$&</A>!ig; } return $string; } &main(); |
From: Rob H. <for...@us...> - 2002-01-21 00:23:21
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv18985/bin Modified Files: sandweb.cgi Log Message: stripped out browser-unfriendly characters from view_file data, so we don't have to use a textarea anymore.. hurrah! :) looks much better now. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.120 retrieving revision 1.121 diff -U2 -r1.120 -r1.121 --- sandweb.cgi 2002/01/19 22:38:48 1.120 +++ sandweb.cgi 2002/01/21 00:23:18 1.121 @@ -490,4 +490,12 @@ my $data = $file->file_read(); + + # make output browser-friendly + # Special Characters; RFC 1866 + $data =~ s/&/&/g; + $data =~ s/\"/"/g; + $data =~ s/</</g; + $data =~ s/>/>/g; + my $edit = ""; |
From: Rob H. <for...@us...> - 2002-01-21 00:23:20
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv18985/templates Modified Files: view_file.html Log Message: stripped out browser-unfriendly characters from view_file data, so we don't have to use a textarea anymore.. hurrah! :) looks much better now. Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.17 retrieving revision 1.18 diff -U2 -r1.17 -r1.18 --- view_file.html 2002/01/20 06:42:58 1.17 +++ view_file.html 2002/01/21 00:23:18 1.18 @@ -14,5 +14,5 @@ <br> <pre> -<textarea name="data" cols="80" rows="24"> <TMPL_VAR NAME=DATA></textarea> +<TMPL_VAR NAME=DATA> </pre> </form> |
From: Rob H. <for...@us...> - 2002-01-20 06:43:00
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv16999/templates Modified Files: edit_file.html view_file.html Log Message: did I finally get the formatting right? let's see. Index: edit_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/edit_file.html,v retrieving revision 1.10 retrieving revision 1.11 diff -U2 -r1.10 -r1.11 --- edit_file.html 2002/01/19 22:38:49 1.10 +++ edit_file.html 2002/01/20 06:42:57 1.11 @@ -14,7 +14,5 @@ <input type="submit" name="save" value="Save" /> <pre> -<textarea name="data" cols="80" rows="24"> -<TMPL_VAR NAME=CONTENT> - </textarea> +<textarea name="data" cols="80" rows="24"> <TMPL_VAR NAME=CONTENT></textarea> </pre> </form> Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.16 retrieving revision 1.17 diff -U2 -r1.16 -r1.17 --- view_file.html 2002/01/19 22:38:49 1.16 +++ view_file.html 2002/01/20 06:42:58 1.17 @@ -14,7 +14,5 @@ <br> <pre> -<textarea name="data" cols="80" rows="24"> -<TMPL_VAR NAME=DATA> -</textarea> +<textarea name="data" cols="80" rows="24"> <TMPL_VAR NAME=DATA></textarea> </pre> </form> |
From: Rob H. <for...@us...> - 2002-01-19 22:38:52
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv27826/bin Modified Files: sandweb.cgi Log Message: * removed "edit" button from view_file page if file is non-text, it's useless and could easily cause stupid user-induced problems * view_file now uses POST form to send file to edit_file, and edit_file uses POST to save it. This way we don't get "URI too long" errors from Apache ( and other web servers too, I'd imagine ). Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.119 retrieving revision 1.120 diff -U2 -r1.119 -r1.120 --- sandweb.cgi 2002/01/19 22:15:21 1.119 +++ sandweb.cgi 2002/01/19 22:38:48 1.120 @@ -490,4 +490,5 @@ my $data = $file->file_read(); + my $edit = ""; if ( $file->get_file_type() ne "Text" ) { @@ -495,4 +496,6 @@ set_error("This does not appear to be a text file."); $data = ""; + } else { + $edit = '<input type="submit" name="file_command" value="edit" />'; } @@ -502,4 +505,5 @@ FILENAME => "$filename", LOCATION => "$location", + EDIT => "$edit", DATA => "$data", ); |
From: Rob H. <for...@us...> - 2002-01-19 22:38:51
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv27826/lib/SandWeb Modified Files: File.pm Log Message: * removed "edit" button from view_file page if file is non-text, it's useless and could easily cause stupid user-induced problems * view_file now uses POST form to send file to edit_file, and edit_file uses POST to save it. This way we don't get "URI too long" errors from Apache ( and other web servers too, I'd imagine ). Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.35 retrieving revision 1.36 diff -U2 -r1.35 -r1.36 --- File.pm 2002/01/18 21:14:44 1.35 +++ File.pm 2002/01/19 22:38:49 1.36 @@ -268,4 +268,5 @@ 'location' => $location, 'contents' => "@fromfile", + 'log_obj' => $log, ); @@ -308,4 +309,5 @@ my $location = $self->{'location'}; my $filename = $self->{'filename'}; + my $log = $self->{'log_obj'}; my $contents = $args{'contents'}; |
From: Rob H. <for...@us...> - 2002-01-19 22:38:51
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv27826/templates Modified Files: edit_file.html view_file.html Log Message: * removed "edit" button from view_file page if file is non-text, it's useless and could easily cause stupid user-induced problems * view_file now uses POST form to send file to edit_file, and edit_file uses POST to save it. This way we don't get "URI too long" errors from Apache ( and other web servers too, I'd imagine ). Index: edit_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/edit_file.html,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- edit_file.html 2002/01/07 07:17:35 1.9 +++ edit_file.html 2002/01/19 22:38:49 1.10 @@ -6,5 +6,5 @@ Current filename : <TMPL_VAR NAME=FILENAME> <br /> - <form submit="<TMPL_VAR NAME=PROGNAME>"> + <form submit="<TMPL_VAR NAME=PROGNAME>" method="POST"> <input name="action" value="file" type="hidden" /> <input name="file_command" value="edit" type="hidden" /> Index: view_file.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/view_file.html,v retrieving revision 1.15 retrieving revision 1.16 diff -U2 -r1.15 -r1.16 --- view_file.html 2002/01/07 07:17:35 1.15 +++ view_file.html 2002/01/19 22:38:49 1.16 @@ -4,11 +4,11 @@ Current filename : <TMPL_VAR NAME=FILENAME> <br /> - <form submit="<TMPL_VAR NAME=PROGNAME>"> + <form submit="<TMPL_VAR NAME=PROGNAME>" method="POST"> <input type="hidden" name="action" value="file" /> <a href="<TMPL_VAR NAME=PROGNAME>/<TMPL_VAR NAME=FILENAME>?action=file&file_command=download&location=<TMPL_VAR NAME=LOCATION>&filename=<TMPL_VAR NAME=FILENAME>">download</a> - <input type="submit" name="file_command" value="upload" /> - <input type="submit" name="file_command" value="edit" /> - <input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" /> <input type="hidden" name="filename" value="<TMPL_VAR NAME=FILENAME>" /> + <input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" /> + <input type="submit" name="file_command" value="upload" /> + <TMPL_VAR NAME=EDIT><!-- <input type="submit" name="file_command" value="edit" /> --> <TMPL_VAR NAME=ERROR> <br> |
From: Rob H. <for...@us...> - 2002-01-19 22:15:24
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv23832 Modified Files: sandweb.cgi Log Message: CGI::Carp now sends fatal errors to browser, so the generic "500 Internal Server Error" is replaced by a useful message Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.118 retrieving revision 1.119 diff -U2 -r1.118 -r1.119 --- sandweb.cgi 2002/01/19 21:28:51 1.118 +++ sandweb.cgi 2002/01/19 22:15:21 1.119 @@ -15,5 +15,5 @@ # standard modules -use CGI::Carp; +use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard); |
From: Rob H. <for...@us...> - 2002-01-19 21:28:54
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv14037/bin Modified Files: sandweb.cgi Log Message: explicitly uses header as CGI::header, also made login incorrect and invalid cookie messages more user friendly Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.117 retrieving revision 1.118 diff -U2 -r1.117 -r1.118 --- sandweb.cgi 2002/01/19 21:17:41 1.117 +++ sandweb.cgi 2002/01/19 21:28:51 1.118 @@ -76,5 +76,5 @@ unless ($stat) { # unable to load user with cookie, or cookie expired - set_error("unable to get cookie"); + set_error("Please login first."); $log->debug("unable to get valid cookie: '$cookie'"); login_menu(); @@ -168,9 +168,21 @@ elsif ( $action eq 'vcs_prefs_menu' ) { # called VCS preferences + my $filename = CGI::param('filename'); + unless ($filename) { + $filename = ""; + } + my $command = CGI::param('command'); + unless ($command) { + $command = ""; + } + my $location = CGI::param('location'); + unless ($location) { + $location = ""; + } vcs_prefs_menu( cookie => $cookie, - filename => CGI::param('filename'), - command => CGI::param('command'), - location => CGI::param('location'), + filename => $filename, + command => $command, + location => $location, ); } @@ -211,5 +223,5 @@ ); - print header; + print CGI::header; $ui->print_screen( TITLE => 'SandWeb : Login', @@ -241,5 +253,5 @@ $log->debug("cookie: '$cookie'"); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Main Menu', @@ -269,5 +281,5 @@ $content = "Data Dump<br /><pre>" . $content . "</pre>"; - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Debug Menu', @@ -356,5 +368,5 @@ my $content = $browse->browse("$path", "$progname", "@vcs_commands", "@file_commands", $repo_type); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Browse Menu', @@ -493,5 +505,5 @@ ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : View File', @@ -551,5 +563,5 @@ ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Edit File', @@ -580,5 +592,5 @@ ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Create File', @@ -607,5 +619,5 @@ FULLPATH => "$users_dir/$username/$location", ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE => 'SandWeb : Create Folder', @@ -641,5 +653,5 @@ FULLPATH => "$users_dir/$username/$location", ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Upload File', @@ -659,5 +671,5 @@ FULLPATH => "$users_dir/$username/$location", ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Checkout', @@ -756,5 +768,5 @@ VCS_ERROR => "@vcs_error", ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> "SandWeb : VCS $vcs_command", @@ -774,5 +786,5 @@ FILENAME => "@filename", ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Commit', @@ -806,5 +818,5 @@ VCS_ERROR => "@vcs_error", ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> "SandWeb : VCS $vcs_command", @@ -840,5 +852,5 @@ ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Preferences Menu', @@ -922,5 +934,5 @@ ); - print header( -cookie => $cookie ); + print CGI::header( -cookie => $cookie ); $ui->print_screen( TITLE=> 'SandWeb : Preferences Menu', @@ -1051,5 +1063,5 @@ else { $log->standard("Invalid login attempt, username: $username"); - set_error("Login incorrect!"); + set_error("Login incorrect, please try again."); login_menu(); } |
From: Rob H. <for...@us...> - 2002-01-19 21:17:44
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv11642/bin Modified Files: sandweb.cgi Log Message: cleaned up code a little, plus got rid of a -w warning Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.116 retrieving revision 1.117 diff -U2 -r1.116 -r1.117 --- sandweb.cgi 2002/01/18 21:14:44 1.116 +++ sandweb.cgi 2002/01/19 21:17:41 1.117 @@ -55,5 +55,7 @@ sub main { - if (CGI::param('action') eq 'login') { + my $action = CGI::param('action'); + + if ($action eq 'login') { # attempting login my $username = CGI::param('username'); @@ -86,5 +88,5 @@ ############################# # - unless (CGI::param('action')) { + unless ($action) { # with cookie, default is main_menu main_menu( cookie => $cookie ); @@ -103,13 +105,13 @@ - if ( CGI::param('action') eq 'main_menu' ) { + if ( $action eq 'main_menu' ) { # called main menu main_menu( cookie => $cookie ); } - elsif ( CGI::param('action') eq 'debug_menu' ) { + elsif ( $action eq 'debug_menu' ) { # called test menu debug_menu( cookie => $cookie ); } - elsif ( CGI::param('action') eq 'preferences_menu' ) { + elsif ( $action eq 'preferences_menu' ) { if (! CGI::param('Submit')) { # call preferences menu @@ -121,16 +123,20 @@ } } - elsif ( CGI::param('action') eq 'logout' ) { + elsif ( $action eq 'logout' ) { # called logout logout(); } - elsif ( CGI::param('action') eq 'browse_menu' ) { + elsif ( $action eq 'browse_menu' ) { # called sandbox viewer + my $path = CGI::param('path'); + unless ($path) { + $path = ""; + } browse_menu( cookie => $cookie, - path => CGI::param('path'), + path => $path, ); } - elsif ( CGI::param('action') eq 'file' ) { + elsif ( $action eq 'file' ) { # called file manipulator my @filename = (); @@ -143,5 +149,5 @@ ); } - elsif ( CGI::param('action') eq 'vcsaction' ) { + elsif ( $action eq 'vcsaction' ) { # called VCS action my @filename = (); @@ -160,5 +166,5 @@ ); } - elsif ( CGI::param('action') eq 'vcs_prefs_menu' ) { + elsif ( $action eq 'vcs_prefs_menu' ) { # called VCS preferences vcs_prefs_menu( @@ -171,5 +177,5 @@ else { # called an invalid page - my $page = CGI::param('action'); + my $page = $action; my $msg = "Invalid page - $page!"; $log->error("$msg"); |
From: Rob H. <for...@us...> - 2002-01-18 21:14:46
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv3317/lib/SandWeb Modified Files: File.pm Log Message: ok, fixed the uninitialized value -w was complaining about, filename and location weren't being filled in in the file object that was being created to get the file_options. I initialized them with blank values. Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -U2 -r1.34 -r1.35 --- File.pm 2002/01/18 20:54:49 1.34 +++ File.pm 2002/01/18 21:14:44 1.35 @@ -19,4 +19,5 @@ my $config = $args{'config_obj'}; my $location = $args{'location'}; + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) |
From: Rob H. <for...@us...> - 2002-01-18 21:14:46
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv3317/bin Modified Files: sandweb.cgi Log Message: ok, fixed the uninitialized value -w was complaining about, filename and location weren't being filled in in the file object that was being created to get the file_options. I initialized them with blank values. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.115 retrieving revision 1.116 diff -U2 -r1.115 -r1.116 --- sandweb.cgi 2002/01/18 19:46:43 1.115 +++ sandweb.cgi 2002/01/18 21:14:44 1.116 @@ -334,5 +334,7 @@ $log->debug("creating File object"); my $file = SandWeb::File->new( - 'log_obj' => $log, + 'log_obj' => $log, + 'filename' => "", + 'location' => "", ); |
From: Rob H. <for...@us...> - 2002-01-18 20:54:54
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv1191/lib/SandWeb Modified Files: File.pm Log Message: oops, need to be a little slicker checking for this uninitialized value Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -U2 -r1.33 -r1.34 --- File.pm 2002/01/18 20:52:55 1.33 +++ File.pm 2002/01/18 20:54:49 1.34 @@ -18,10 +18,8 @@ my $log_obj = $args{'log_obj'}; my $config = $args{'config_obj'}; - if ($args{'location'}) { - my $location = $args{'location'}; - my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, - $atime,$mtime,$ctime,$blksize,$blocks) - = stat("$location/$filename"); - } + my $location = $args{'location'}; + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat("$location/$filename"); my $self = bless { |
From: Rob H. <for...@us...> - 2002-01-18 20:52:59
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv32297/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: clearing up more -w warnings Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -U2 -r1.21 -r1.22 --- CVS.pm 2002/01/18 19:25:08 1.21 +++ CVS.pm 2002/01/18 20:52:55 1.22 @@ -537,5 +537,5 @@ } - my $output = join(/ /, "@output_lines"); + my $output = join(" ", "@output_lines"); my %return = ( |
From: Rob H. <for...@us...> - 2002-01-18 20:52:59
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv32297/lib/SandWeb Modified Files: Browse.pm File.pm Log Message: clearing up more -w warnings Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -U2 -r1.27 -r1.28 --- Browse.pm 2002/01/18 19:25:08 1.27 +++ Browse.pm 2002/01/18 20:52:55 1.28 @@ -84,6 +84,8 @@ my %row_data; $row_data{LOCATION_LINK} = "$link"; - my $data = join(/ /, @location_full); - push (@location_full, "/$location_link[$count]"); + my $data = join(" ", @location_full); + if ($location_link[$count]) { + push (@location_full, "/$location_link[$count]"); + } $row_data{LOCATION_FULL} = "$data"; $row_data{PROGNAME} = "$progname"; Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -U2 -r1.32 -r1.33 --- File.pm 2002/01/18 07:49:31 1.32 +++ File.pm 2002/01/18 20:52:55 1.33 @@ -18,8 +18,10 @@ my $log_obj = $args{'log_obj'}; my $config = $args{'config_obj'}; - my $location = $args{'location'}; - my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, - $atime,$mtime,$ctime,$blksize,$blocks) - = stat("$location/$filename"); + if ($args{'location'}) { + my $location = $args{'location'}; + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat("$location/$filename"); + } my $self = bless { |
From: Rob H. <for...@us...> - 2002-01-18 19:46:46
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv16247 Modified Files: sandweb.cgi Log Message: added a couple comments for upload subroutine. arg, the version of perl on my sun box is too old to get a newer version of CGI.pm, and I need to get some new libraries to build perl.. sigh.. I'll have to work on that for a while before I can get back to playing with upload/download Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.114 retrieving revision 1.115 diff -U2 -r1.114 -r1.115 --- sandweb.cgi 2002/01/18 19:39:39 1.114 +++ sandweb.cgi 2002/01/18 19:46:43 1.115 @@ -611,4 +611,6 @@ } elsif ( $file_command eq 'upload' ) { + # if a file has been uploaded, then + # grab it's filehandle my $filehandle = CGI::upload('filehandle'); if ( $filehandle) { |
From: Rob H. <for...@us...> - 2002-01-18 19:39:42
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv14908 Modified Files: sandweb.cgi Log Message: prefixed param/upload statements with CGI::, so we can tell CGI subroutines from sandweb.cgi subroutines. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.113 retrieving revision 1.114 diff -U2 -r1.113 -r1.114 --- sandweb.cgi 2002/01/18 19:25:08 1.113 +++ sandweb.cgi 2002/01/18 19:39:39 1.114 @@ -55,8 +55,8 @@ sub main { - if (param('action') eq 'login') { + if (CGI::param('action') eq 'login') { # attempting login - my $username = param('username'); - my $password = param('password'); + my $username = CGI::param('username'); + my $password = CGI::param('password'); login( username => $username, @@ -86,5 +86,5 @@ ############################# # - unless (param('action')) { + unless (CGI::param('action')) { # with cookie, default is main_menu main_menu( cookie => $cookie ); @@ -103,14 +103,14 @@ - if ( param('action') eq 'main_menu' ) { + if ( CGI::param('action') eq 'main_menu' ) { # called main menu main_menu( cookie => $cookie ); } - elsif ( param('action') eq 'debug_menu' ) { + elsif ( CGI::param('action') eq 'debug_menu' ) { # called test menu debug_menu( cookie => $cookie ); } - elsif ( param('action') eq 'preferences_menu' ) { - if (! param('Submit')) { + elsif ( CGI::param('action') eq 'preferences_menu' ) { + if (! CGI::param('Submit')) { # call preferences menu preferences_menu( cookie => $cookie ); @@ -121,31 +121,31 @@ } } - elsif ( param('action') eq 'logout' ) { + elsif ( CGI::param('action') eq 'logout' ) { # called logout logout(); } - elsif ( param('action') eq 'browse_menu' ) { + elsif ( CGI::param('action') eq 'browse_menu' ) { # called sandbox viewer browse_menu( cookie => $cookie, - path => param('path'), + path => CGI::param('path'), ); } - elsif ( param('action') eq 'file' ) { + elsif ( CGI::param('action') eq 'file' ) { # called file manipulator my @filename = (); - @filename = param('filename'), + @filename = CGI::param('filename'), file( cookie => $cookie, - file_command => param('file_command'), + file_command => CGI::param('file_command'), filename => \@filename, - location => param('location'), + location => CGI::param('location'), ); } - elsif ( param('action') eq 'vcsaction' ) { + elsif ( CGI::param('action') eq 'vcsaction' ) { # called VCS action my @filename = (); - if ( param('filename') ) { - @filename = param('filename'), + if ( CGI::param('filename') ) { + @filename = CGI::param('filename'), } else { @@ -155,21 +155,21 @@ vcsaction( cookie => $cookie, - vcs_command => param('vcs_command'), - location => param('location'), + vcs_command => CGI::param('vcs_command'), + location => CGI::param('location'), filename => \@filename, ); } - elsif ( param('action') eq 'vcs_prefs_menu' ) { + elsif ( CGI::param('action') eq 'vcs_prefs_menu' ) { # called VCS preferences vcs_prefs_menu( cookie => $cookie, - filename => param('filename'), - command => param('command'), - location => param('location'), + filename => CGI::param('filename'), + command => CGI::param('command'), + location => CGI::param('location'), ); } else { # called an invalid page - my $page = param('action'); + my $page = CGI::param('action'); my $msg = "Invalid page - $page!"; $log->error("$msg"); @@ -391,5 +391,5 @@ my $filename = "@filename"; $log->debug("filename(s) : $filename"); - my $save = param('save'); + my $save = CGI::param('save'); my $username = $auth->get_userinfo('username'); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -499,5 +499,5 @@ $log->debug("editing file : $filename"); if ($save) { - my $data = param('data'), + my $data = CGI::param('data'), my $filename = $file->get_filename(); $log->debug("saving edited file : $filename"); @@ -611,5 +611,5 @@ } elsif ( $file_command eq 'upload' ) { - my $filehandle = upload('filehandle'); + my $filehandle = CGI::upload('filehandle'); if ( $filehandle) { $filename =~ s/.*[\/\\](.*)/$1/; @@ -697,5 +697,5 @@ } my $location = $args{'location'}; - my $message = param('message'); + my $message = CGI::param('message'); my $username = $auth->get_userinfo('username'); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -953,5 +953,5 @@ foreach my $param (@personal_params) { - if ( param("$param") ) { + if ( CGI::param("$param") ) { $userprefs->{'personal'}->{"$param"} = param("$param"); } @@ -959,5 +959,5 @@ foreach my $param (@repository_params) { - if ( param("$param") ) { + if ( CGI::param("$param") ) { $userprefs->{'repository'}->{"$param"} = param("$param"); } |
From: Rob H. <for...@us...> - 2002-01-18 19:25:13
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv10614/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: added -w to perl invokation, cleaned up potential problems that were indicated Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -U2 -r1.20 -r1.21 --- CVS.pm 2002/01/07 05:19:48 1.20 +++ CVS.pm 2002/01/18 19:25:08 1.21 @@ -32,6 +32,6 @@ my @param = 'add'; - if ($type = "binary") { push @param, " -kb" }; - if ($type = "text") { push @param, " -kkv" }; + if ($type == "binary") { push @param, " -kb" }; + if ($type == "text") { push @param, " -kkv" }; if ($message) { push @param, " -m $message" }; @@ -59,6 +59,6 @@ my @param = 'admin'; - if ($type = "binary") { push @param, " -kb -MCOPY" }; - if ($type = "text") { push @param, " -kkv -MMERGE" }; + if ($type == "binary") { push @param, " -kb -MCOPY" }; + if ($type == "text") { push @param, " -kkv -MMERGE" }; my %return = ( |
From: Rob H. <for...@us...> - 2002-01-18 19:25:12
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv10614/bin Modified Files: sandweb.cgi Log Message: added -w to perl invokation, cleaned up potential problems that were indicated Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.112 retrieving revision 1.113 diff -U2 -r1.112 -r1.113 --- sandweb.cgi 2002/01/18 07:49:31 1.112 +++ sandweb.cgi 2002/01/18 19:25:08 1.113 @@ -1,3 +1,3 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w # Sandweb CGI @@ -337,8 +337,8 @@ ); - my $username = $auth->get_userinfo('username'); + $username = $auth->get_userinfo('username'); my @vcs_commands = $repository->get_vcs_commands(); my @file_commands = $file->get_file_commands(); - my $repo_type = $repository->get_repo_type(); + $repo_type = $repository->get_repo_type(); my $path = $args{'path'} || ''; @@ -534,5 +534,5 @@ $log->debug("closing $users_dir/$username/$location/$filename"); - my $content = $ui->get_menu( + $content = $ui->get_menu( MENU => 'edit_file', PROGNAME => $progname, |
From: Rob H. <for...@us...> - 2002-01-18 19:25:12
|
Update of /cvsroot/sandweb/sandweb/lib In directory usw-pr-cvs1:/tmp/cvs-serv10614/lib Modified Files: SandWeb.pm Log Message: added -w to perl invokation, cleaned up potential problems that were indicated Index: SandWeb.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- SandWeb.pm 2001/10/20 05:43:41 1.14 +++ SandWeb.pm 2002/01/18 19:25:08 1.15 @@ -19,5 +19,5 @@ my $auth = &_load_auth_object('config' => $config, 'log' => $log); # create new conf object with log functionality - my $config = &_load_conf_object(@_, 'log_obj' => $log); + $config = &_load_conf_object(@_, 'log_obj' => $log); my $self = bless { |
From: Rob H. <for...@us...> - 2002-01-18 19:25:12
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv10614/lib/SandWeb Modified Files: Browse.pm Repository.pm Log Message: added -w to perl invokation, cleaned up potential problems that were indicated Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.26 retrieving revision 1.27 diff -U2 -r1.26 -r1.27 --- Browse.pm 2002/01/02 22:51:52 1.26 +++ Browse.pm 2002/01/18 19:25:08 1.27 @@ -98,5 +98,5 @@ my @return = (); - my @loop_data = (); + @loop_data = (); my $color0 = "#ccccee"; my $color1 = "#ffffff"; @@ -184,5 +184,5 @@ } - my @loop_data = (); + @loop_data = (); foreach my $vcs_command (@vcs_commands) { Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -U2 -r1.16 -r1.17 --- Repository.pm 2001/12/23 04:48:06 1.16 +++ Repository.pm 2002/01/18 19:25:08 1.17 @@ -456,5 +456,5 @@ my $branch = $args{'branch'}; my $check = $args{'check'}; - my $force => $args{'force'}; +# my $force => $args{'force'}; my $file = $args{'file'}; my $repo_type = $self->get_repo_type(); @@ -557,25 +557,4 @@ notify => $notify, file => $file ); - } - - return %return; -} - -sub watch { - my $self = shift; - my %args = @_; - - my $recurse = $args{'recurse'}; - my $file = $args{'file'}; - my $repo_type = $self->get_repo_type(); - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); - my %return = {}; - my $vcs = SandWeb::Repository::CVS->new(root => $root, - sandbox => $sandbox); - - if ($repo_type eq 'CVS') { - %return = $vcs->checkout(recurse => $recurse, - file => $file ); } |
From: Rob H. <for...@us...> - 2002-01-18 19:25:12
|
Update of /cvsroot/sandweb/sandweb/etc In directory usw-pr-cvs1:/tmp/cvs-serv10614/etc Modified Files: sandweb.cfg Log Message: added -w to perl invokation, cleaned up potential problems that were indicated Index: sandweb.cfg =================================================================== RCS file: /cvsroot/sandweb/sandweb/etc/sandweb.cfg,v retrieving revision 1.11 retrieving revision 1.12 diff -U2 -r1.11 -r1.12 --- sandweb.cfg 2001/12/21 08:12:20 1.11 +++ sandweb.cfg 2002/01/18 19:25:08 1.12 @@ -30,5 +30,5 @@ /> - <webserver mime-types_location="/etc/apache" + <webserver mime-types_location="/usr/local/apache/conf" mime-types_file="mime.types" /> |
From: Rob H. <for...@us...> - 2002-01-18 07:49:34
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv31245/bin Modified Files: sandweb.cgi Log Message: upload now returns you to the file you were viewing Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.111 retrieving revision 1.112 diff -U2 -r1.111 -r1.112 --- sandweb.cgi 2002/01/18 07:37:33 1.111 +++ sandweb.cgi 2002/01/18 07:49:31 1.112 @@ -614,6 +614,12 @@ if ( $filehandle) { $filename =~ s/.*[\/\\](.*)/$1/; - $file->upload( + $file->upload( filehandle => $filehandle, + ); + file( + cookie => $cookie, + file_command => "view", + filename => \@filename, + location => $location, ); } |