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-11-22 00:57:18
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv28223/lib/SandWeb Modified Files: UI.pm Log Message: implemented view and edit more correctly, now they let you view or edit a non-Text file but you get a warning. Sweet. Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -U2 -r1.19 -r1.20 --- UI.pm 2001/10/06 07:51:56 1.19 +++ UI.pm 2001/11/22 00:57:16 1.20 @@ -185,5 +185,5 @@ } -sub get_file { +sub view_file { my $self = shift; my %args = @_; @@ -202,4 +202,26 @@ # generate content data my $tmp = HTML::Template->new(filename => "$template_dir/view_file.html"); + $tmp->param( %defaults, %args ); + my @contents = $tmp->output; + return join('', @contents); +} + +sub edit_file { + my $self = shift; + my %args = @_; + + my $template_dir = $self->_get_template_dir(); + my $filename = $args{'filename'}; + my $log = $self->_logobj(); + + # this will eventually be $conf->defaults() + my %defaults = ( + # CGI_PATH => $self->_get_cgi_path(), + # CGI_EXEC => $self->_get_cgi_exec(), + FILENAME => $filename, + ); + + # generate content data + my $tmp = HTML::Template->new(filename => "$template_dir/edit_file.html"); $tmp->param( %defaults, %args ); my @contents = $tmp->output; |
From: Rob H. <for...@us...> - 2001-11-22 00:57:18
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv28223/bin Modified Files: sandweb.cgi Log Message: implemented view and edit more correctly, now they let you view or edit a non-Text file but you get a warning. Sweet. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.65 retrieving revision 1.66 diff -U2 -r1.65 -r1.66 --- sandweb.cgi 2001/11/22 00:31:35 1.65 +++ sandweb.cgi 2001/11/22 00:57:15 1.66 @@ -318,8 +318,6 @@ if (! -f "$location/$filename" ) { - print header; - print "File does not exist.\n"; - print "$location/$filename\n"; - exit 1; + set_error = "File does not exist!"; + browse_menu(); } @@ -339,38 +337,54 @@ elsif ( $command eq 'view' ) { unless ( $file->get_file_type() eq "Text" ) { - print header; - print "This does not appear to be a text file.\n"; - exit 1; + $error = "This does not appear to be a text file."; } - print header; + my @tmp = (); open (FILE, "$location/$filename"); - print "<pre>"; foreach my $line (<FILE>) { - print "$line"; + push @tmp, $line; } - print "</pre>"; + my $content = $ui->view_file( + PROGNAME => $progname, + CONTENT => "@tmp", + ); + + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> 'SandWeb : View File', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'view file', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); + exit 0; } elsif ( $command eq 'edit' ) { unless ( $file->get_file_type() eq "Text" ) { - print header; - print "This does not appear to be a text file.\n"; - exit 1; + $error = "This does not appear to be a text file."; } - print header; + my @tmp = (); open (FILE, "$location/$filename"); - print "<pre>"; - print "<textarea name=\"$filename\" rows=\"50\" cols=\"160\">"; foreach my $line (<FILE>) { - print "$line"; + push @tmp, $line; } - print '</textarea>'; - print "</pre>"; - print "<input type=\"button\" value=\"Save\" />"; - exit 1; + my $content = $ui->edit_file( + PROGNAME => $progname, + CONTENT => "@tmp", + ); + + print header( -cookie => $cookie ); + $ui->print_screen( + TITLE=> 'SandWeb : Edit File', + MENU_TITLE => 'SandWeb', + SUBMENU_TITLE => 'edit file', + FOOTER => '', + CONTENT => $content, + ERROR => $error, + ); + exit 0; } else { - print header; - print "hello\n"; - exit 1; + $error = "Invalid selection."; } } |
From: Rob H. <for...@us...> - 2001-11-22 00:31:39
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv20604 Modified Files: sandweb.cgi Log Message: oops, had the full path to my webserver root in there, not useful to many others I'm sure.. :) There may be a problem with the file info section now; I'll take a closer look at it. This is really only a stub until the real info page is written. See this for an example of how it should look : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/sandweb/sandweb/bin/sandweb.cgi Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.64 retrieving revision 1.65 diff -U2 -r1.64 -r1.65 --- sandweb.cgi 2001/11/21 19:48:43 1.64 +++ sandweb.cgi 2001/11/22 00:31:35 1.65 @@ -302,6 +302,5 @@ my $repo_type = $userprefs->{'repository'}->{'VCS'}; my $root = $userprefs->{'repository'}->{'root'}; -# my $sandbox = $userprefs->{'paths'}->{'users_dir'}; - my $sandbox='/usr/local/apache/cgi-bin/sandweb/bin'; + my $sandbox = $userprefs->{'paths'}->{'users_dir'}; my $repository = SandWeb::Repository->new( |
From: Rob H. <for...@us...> - 2001-11-21 19:48:47
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv19766/templates Modified Files: browse.html Log Message: implemented simple versions of view and edit also, clicking on a file now runs "$repo->status" on that file, which is the first step to having an info page Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.23 retrieving revision 1.24 diff -U2 -r1.23 -r1.24 --- browse.html 2001/10/21 19:48:34 1.23 +++ browse.html 2001/11/21 19:48:44 1.24 @@ -72,5 +72,5 @@ <a name="<TMPL_VAR NAME=ENTRY>"> </input> - <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>"> + <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>&command=info"> <img src="/icons/<TMPL_VAR NAME=FILETYPE>.gif" alt="" border=0 width=20 height=22> @@ -80,7 +80,7 @@ <td align="center" width="20%">   - <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>">View</a> + <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>&command=view">View</a> | - <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>">Edit</a> + <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>&command=edit">Edit</a> </td> <td width="10%" align="center"> |
From: Rob H. <for...@us...> - 2001-11-21 19:48:46
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv19766/bin Modified Files: sandweb.cgi Log Message: implemented simple versions of view and edit also, clicking on a file now runs "$repo->status" on that file, which is the first step to having an info page Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.63 retrieving revision 1.64 diff -U2 -r1.63 -r1.64 --- sandweb.cgi 2001/11/15 19:46:20 1.63 +++ sandweb.cgi 2001/11/21 19:48:43 1.64 @@ -132,4 +132,5 @@ cookie => $cookie, filename => param('filename'), + command => param('command'), ); } @@ -295,4 +296,5 @@ + my $command = $args{'command'}; my $username = $auth->get_userinfo('username'); my $template_dir = $config->{'paths'}->{'template_dir'}; @@ -300,6 +302,13 @@ my $repo_type = $userprefs->{'repository'}->{'VCS'}; my $root = $userprefs->{'repository'}->{'root'}; - my $sandbox = $userprefs->{'paths'}->{'users_dir'}; +# my $sandbox = $userprefs->{'paths'}->{'users_dir'}; + my $sandbox='/usr/local/apache/cgi-bin/sandweb/bin'; + my $repository = SandWeb::Repository->new( + root => $root, + repo_type => $repo_type, + sandbox => $sandbox, + ); + my $location = "$users_dir/$username"; @@ -321,5 +330,27 @@ 'location' => $location, ); -# if ( $command eq 'view' ) { + if ( $command eq 'info' ) { + print header; + print '<pre>'; + my %return = $repository->status( file => "$location/$filename" ); + print $return{'output'}; + print '</pre>'; + exit 1; + } + elsif ( $command eq 'view' ) { + unless ( $file->get_file_type() eq "Text" ) { + print header; + print "This does not appear to be a text file.\n"; + exit 1; + } + print header; + open (FILE, "$location/$filename"); + print "<pre>"; + foreach my $line (<FILE>) { + print "$line"; + } + print "</pre>"; + } + elsif ( $command eq 'edit' ) { unless ( $file->get_file_type() eq "Text" ) { print header; @@ -330,9 +361,18 @@ open (FILE, "$location/$filename"); print "<pre>"; + print "<textarea name=\"$filename\" rows=\"50\" cols=\"160\">"; foreach my $line (<FILE>) { print "$line"; } + print '</textarea>'; print "</pre>"; -# } + print "<input type=\"button\" value=\"Save\" />"; + exit 1; + } + else { + print header; + print "hello\n"; + exit 1; + } } |
From: Rob H. <for...@us...> - 2001-11-15 20:46:44
|
Update of /cvsroot/sandweb/sandweb/doc/API In directory usw-pr-cvs1:/tmp/cvs-serv22967 Added Files: File.txt Log Message: added documentation for File object --- NEW FILE --- SandWeb::File -------------------------------------------------------------------------------- METHOD new SYNOPSIS my $file = SandWeb::File->new( location => $location; filename => $filename; ); DESCRIPTION This method is a constructor. It needs to know the location of the file as well as the name of the file. PARAMETERS location (type: string) (required) This contains the full ( absolute or relative ) path to the file, as far as the file system is concerned. Default: none. filename (type: string) (required) This contains the path to the filename from the user's sandbox ( including the filename itself ). Default: none. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD get_owner SYNOPSIS my $owner = $file->get_owner(); DESCRIPTION Returns the UID of the owner of the file. PARAMETERS None. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD get_group SYNOPSIS my $group = $file->get_group(); DESCRIPTION Returns the GID of the group membership of the file. PARAMETERS None. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD get_filename SYNOPSIS my $filename = $file->get_filename(); DESCRIPTION Returns the path from the user's sandbox and the full name of the file. PARAMETERS None. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD get_location SYNOPSIS my $location = $file->get_location(); DESCRIPTION Returns the full ( absolute or relative ) path to the user's sandbox, as far as the file system is concerned. PARAMETERS None. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD get_permissions SYNOPSIS my $permissions = $file->get_permissions(); DESCRIPTION Returns the current file system permissions, as an octal value. PARAMETERS None. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. -------------------------------------------------------------------------------- METHOD get_file_type SYNOPSIS my $file_type = $file->get_file_type(); DESCRIPTION Returns Perl's guess as to what type of file this is. Type returned one of : Binary, Text, Directory or Unknown. PARAMETERS None. RETURN CODES 1 = The operation completed successfully. 0 = This means that the method got an error proccessing your request. Perhaps an invalid parameter? -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. |
From: Rob H. <for...@us...> - 2001-11-15 20:11:45
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv11999/lib/SandWeb Modified Files: Browse.pm Log Message: fixed bug that broke the location changer, PROGNAME variable was not being set inside the LOCATION_LOOP Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -U2 -r1.16 -r1.17 --- Browse.pm 2001/10/21 04:02:40 1.16 +++ Browse.pm 2001/11/15 20:11:42 1.17 @@ -59,18 +59,20 @@ unless ($count) { - my %row_data; - $row_data{LOCATION_LINK} = "/"; - $row_data{LOCATION_FULL} = "/"; - push (@loop_data, \%row_data); - $count++; + my %row_data; + $row_data{LOCATION_LINK} = "/"; + $row_data{LOCATION_FULL} = "/"; + $row_data{PROGNAME} = "$progname"; + push (@loop_data, \%row_data); + $count++; } foreach my $link (@location_link) { - my %row_data; - $row_data{LOCATION_LINK} = "$link"; - my $data = join(/ /, @location_full); - push (@location_full, "/$location_link[$count]"); - $row_data{LOCATION_FULL} = "$data"; - push (@loop_data, \%row_data); - $count++; + my %row_data; + $row_data{LOCATION_LINK} = "$link"; + my $data = join(/ /, @location_full); + push (@location_full, "/$location_link[$count]"); + $row_data{LOCATION_FULL} = "$data"; + $row_data{PROGNAME} = "$progname"; + push (@loop_data, \%row_data); + $count++; } $content->param( |
From: Rob H. <for...@us...> - 2001-11-15 19:46:23
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv4353/lib/SandWeb Modified Files: File.pm Log Message: hooked up File object, using file subroutine in sandweb.cgi This implementation is still somewhat raw; $file->get_user() and get_group() return uid/gid instead of full filename. Pretty cool besides that. Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -U2 -r1.7 -r1.8 --- File.pm 2001/10/10 07:27:01 1.7 +++ File.pm 2001/11/15 19:46:20 1.8 @@ -10,10 +10,6 @@ my $self = bless { - 'owner' => $args{'owner'}, - 'group' => $args{'group'}, 'filename' => $args{'filename'}, 'location' => $args{'location'}, - 'permissions' => $args{'permissions'}, - 'file_type' => $args{'file_type'}, }, $class; @@ -23,10 +19,23 @@ sub get_owner { my $self = shift; - return $self->{'owner'}; + my $location = $self->{'location'}; + my $filename = $self->{'filename'}; + + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat("$location/$filename"); + + my $owner = $uid; + return $owner; } sub get_group { my $self = shift; - return $self->{'group'}; + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat("$location/$filename"); + + my $group = $gid; + return $group; } @@ -36,12 +45,37 @@ } +sub get_location { + my $self = shift; + return $self->{'filename'}; +} + sub get_permissions { my $self = shift; - return $self->{'permissions'}; + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat("$location/$filename"); + + return $mode & 0777; } sub get_file_type { my $self = shift; - return $self->{'file_type'}; + + my $location = $self->{'location'}; + my $filename = $self->{'filename'}; + + if (-d "$location/$filename") { + $file_type = 'Directory'; + } + elsif (-T "$location/$filename") { + $file_type = 'Text'; + } + elsif (-B "$location/$filename") { + $file_type = 'Binary'; + } else { + $file_type = 'Unknown'; + } + + return $file_type; } |
From: Rob H. <for...@us...> - 2001-11-15 19:46:23
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv4353/bin Modified Files: sandweb.cgi Log Message: hooked up File object, using file subroutine in sandweb.cgi This implementation is still somewhat raw; $file->get_user() and get_group() return uid/gid instead of full filename. Pretty cool besides that. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.62 retrieving revision 1.63 diff -U2 -r1.62 -r1.63 --- sandweb.cgi 2001/10/20 05:43:41 1.62 +++ sandweb.cgi 2001/11/15 19:46:20 1.63 @@ -127,4 +127,11 @@ browse_menu( cookie => $cookie ); } + elsif ( param('action') eq 'file' ) { + # called file manipulator + file( + cookie => $cookie, + filename => param('filename'), + ); + } else { # called an invalid page @@ -273,4 +280,59 @@ ); exit 0; +} + +sub file { + my %args = @_; + my $cookie = $args{'cookie'}; + unless ($cookie) { + &login_menu(); + exit 0; + } + if (! load_prefs()) { + # no existing user config, forward to prefs menu + preferences_menu( cookie => $cookie ); + } + + + my $username = $auth->get_userinfo('username'); + 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 $location = "$users_dir/$username"; + + my $filename = $args{'filename'}; + my $group; + my $permissions; + my $file_type; + + if (! -f "$location/$filename" ) { + print header; + print "File does not exist.\n"; + print "$location/$filename\n"; + exit 1; + } + + use SandWeb::File; + my $file = SandWeb::File->new( + 'filename' => $filename, + 'location' => $location, + ); +# if ( $command eq 'view' ) { + unless ( $file->get_file_type() eq "Text" ) { + print header; + print "This does not appear to be a text file.\n"; + exit 1; + } + print header; + open (FILE, "$location/$filename"); + print "<pre>"; + foreach my $line (<FILE>) { + print "$line"; + } + print "</pre>"; +# } } |
From: Nick J. <nje...@us...> - 2001-10-21 19:48:37
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv18808/templates Modified Files: browse.html Log Message: fixed a color Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- browse.html 2001/10/21 04:02:40 1.22 +++ browse.html 2001/10/21 19:48:34 1.23 @@ -17,5 +17,5 @@ <input type="submit" name="function" value="Submit" /> </td> - <td width="60%" colspan="3" align="center" bgcolor="#BBAAFF"> + <td width="60%" colspan="3" align="center"> <a href="<TMPL_VAR NAME=PROGNAME>">Create File</a>   |   |
From: Nick J. <nje...@us...> - 2001-10-21 08:43:32
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv26484/templates Modified Files: framework.html Log Message: updated framework to make link's always same color. made it an off blue which looks good on the multiple different bg colors. Index: framework.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/framework.html,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- framework.html 2001/10/20 04:52:54 1.6 +++ framework.html 2001/10/21 08:43:30 1.7 @@ -7,5 +7,5 @@ <title><TMPL_VAR NAME=TITLE></title> </head> - <body bgcolor="#EEEEEE"> + <body bgcolor="#EEEEEE" link="#5566CC" vlink="#5566CC"> <table border="0" align="center" width="100%" cellpadding="0" cellspacing="0"> <tr> @@ -19,10 +19,10 @@ </tr> <tr> - <td width="15%" valign="top" align="center" bgcolor="#bbbbbb"> + <td width="12%" valign="top" align="center" bgcolor="#AAAAAA"> <table width="100%" align="center" cellspacing="4"> <TMPL_VAR NAME=MENU_BAR><br /> </table> </td> - <td width="85%" align="left" valign="top"> + <td width="88%" align="left" valign="top"> <table width="100%" border="0" align="center"> <tr> |
From: Rob H. <for...@us...> - 2001-10-21 04:02:43
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv20810/lib/SandWeb Modified Files: Browse.pm Log Message: the "Current location" bar now has selectable elements, so you can go back one or more directories while you are browsing. The colors make it hard to see though, I think I am going to make clicked/unclicked links the same color in the browse.html template. Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -U2 -r1.15 -r1.16 --- Browse.pm 2001/10/17 04:27:29 1.15 +++ Browse.pm 2001/10/21 04:02:40 1.16 @@ -53,7 +53,29 @@ $location = '/'; } - - $content->param( PROGNAME => $progname, - LOCATION => $location, + my @location_link; + push (@location_link, split( /\//, $location )); + my @loop_data = (); + my $count = 0; + + unless ($count) { + my %row_data; + $row_data{LOCATION_LINK} = "/"; + $row_data{LOCATION_FULL} = "/"; + push (@loop_data, \%row_data); + $count++; + } + foreach my $link (@location_link) { + my %row_data; + $row_data{LOCATION_LINK} = "$link"; + my $data = join(/ /, @location_full); + push (@location_full, "/$location_link[$count]"); + $row_data{LOCATION_FULL} = "$data"; + push (@loop_data, \%row_data); + $count++; + } + $content->param( + PROGNAME => $progname, + LOCATION => $location, + LOCATION_LOOP => \@loop_data, ); |
From: Rob H. <for...@us...> - 2001-10-21 04:02:42
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv20810/templates Modified Files: browse.html Log Message: the "Current location" bar now has selectable elements, so you can go back one or more directories while you are browsing. The colors make it hard to see though, I think I am going to make clicked/unclicked links the same color in the browse.html template. Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.21 retrieving revision 1.22 diff -U2 -r1.21 -r1.22 --- browse.html 2001/10/20 07:49:08 1.21 +++ browse.html 2001/10/21 04:02:40 1.22 @@ -40,5 +40,8 @@   <font color="#22DD22"> - Current location : <TMPL_VAR NAME="LOCATION"> + Current location : + <TMPL_LOOP NAME="LOCATION_LOOP"> + <a href="<TMPL_VAR NAME="PROGNAME">?action=browse_menu&path=<TMPL_VAR NAME="LOCATION_FULL">"><TMPL_VAR NAME="LOCATION_LINK"></a> + </TMPL_LOOP> </font> </td> |
From: Nick J. <nje...@us...> - 2001-10-21 01:38:57
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv22882/templates Modified Files: browse.html Log Message: changed the format of the browse menu. Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.20 retrieving revision 1.21 diff -U2 -r1.20 -r1.21 --- browse.html 2001/10/16 04:51:44 1.20 +++ browse.html 2001/10/20 07:49:08 1.21 @@ -1,40 +1,96 @@ -<table width="100%" border=1 cellspacing=1 cellpadding=2> -<form method="get" submit="<TMPL_VAR NAME=PROGNAME>"> -<input type="hidden" name="action" value="vcsaction" /> -<input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" /> -<input type="submit" name="function" value="Create File" /> -<input type="submit" name="function" value="Create Folder" /> -<input type="submit" name="function" value="Upload" /> -<br /> -<input type="submit" name="function" value="Checkout" /> -<select name="command"> -<TMPL_LOOP NAME="VCS_CMD_LOOP"> -<option><TMPL_VAR NAME="VCS_CMD"></option> -</TMPL_LOOP> -</select> -<input type="submit" name="function" value="Done" /> -<br /> <br /> -Current location : <TMPL_VAR NAME="LOCATION"> -<tr> -<th width="40%" align=left bgcolor=#88ff88>File</th> -<th width="20%" align=left bgcolor=#cccccc>Commands</th> -<th width="10%" align=left bgcolor=#cccccc><a href="<TMPL_VAR NAME=PROGNAME>?sortby=rev#dirlist">Rev.</a></th> -<th width="30%" align=left bgcolor=#cccccc><a href="<TMPL_VAR NAME=PROGNAME>?sortby=date#dirlist">Age</a></th> -</tr> -<TMPL_LOOP NAME="ENTRY_LOOP"> -<tr bgcolor="<TMPL_VAR NAME=COLOR>"><td> -<input type="checkbox" name="filename" value="<TMPL_VAR NAME=ENTRY>"> -<a name="<TMPL_VAR NAME=ENTRY>"> -</input> -<a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>"><img src="/icons/<TMPL_VAR NAME=FILETYPE>.gif" alt="" border=0 width=20 height=22><TMPL_VAR NAME=ENTRY></a> -</td><td align="center"> -<a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>">View</a> -| -<a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>">Edit</a> -</td><td> -</td><td> -</td></tr> -</TMPL_LOOP> -</form> +<table width="100%" border="0" cellspacing="0" cellpadding="2"> + <form method="get" submit="<TMPL_VAR NAME=PROGNAME>"> + <input type="hidden" name="action" value="vcsaction" /> + <input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" /> + + <tr> + <td width="100%" align="center" valign="center"> + <table border="0" width="100%" cellspacing="2" cellpadding="2"> + <tr> + <td width="40%" align="center" bgcolor="#AAAAAA"> + <select name="command"> + <TMPL_LOOP NAME="VCS_CMD_LOOP"> + <option><TMPL_VAR NAME="VCS_CMD"></option> + </TMPL_LOOP> + </select> +       + <input type="submit" name="function" value="Submit" /> + </td> + <td width="60%" colspan="3" align="center" bgcolor="#BBAAFF"> + <a href="<TMPL_VAR NAME=PROGNAME>">Create File</a> +   |   + <a href="<TMPL_VAR NAME=PROGNAME>">Create Folder</a> +   |   + <a href="<TMPL_VAR NAME=PROGNAME>">Upload</a> +   |   + <a href="<TMPL_VAR NAME=PROGNAME>">Checkout</a> + <br /> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="100%"> +   <br /> + </td> + </tr> + <tr> + <td width="100%" bgcolor="#000000"> +   + <font color="#22DD22"> + Current location : <TMPL_VAR NAME="LOCATION"> + </font> + </td> + </tr> + <tr> + <td width="100$"> + <table width="100%" border="1"> + <tr> + + <td width="40%" align="left" bgcolor="#88FF88"> + <b>File</b> + </td> + <td width="20%" align="left" bgcolor="#CCCCCC"> + <b>Commands</b> + </td> + <td width="10%" align="left" bgcolor="#CCCCCC"> + <A href="<b><TMPL_VAR NAME=PROGNAME>?sortby=rev#dirlist>">Rev.</a></b> + </td> + <td width="30%" align="left" bgcolor="#88FF88"> + <A href="<b><TMPL_VAR NAME=PROGNAME>?sortby=date#dirlist>">Age.</a></b> + </td> + </tr> + <TMPL_LOOP NAME="ENTRY_LOOP"> + <tr bgcolor="<TMPL_VAR NAME=COLOR>"> + <td width="40%" align="left"> + <input type="checkbox" name="filename" + value="<TMPL_VAR NAME=ENTRY>"> + <a name="<TMPL_VAR NAME=ENTRY>"> + </input> + <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>"> + <img src="/icons/<TMPL_VAR NAME=FILETYPE>.gif" + alt="" border=0 width=20 height=22> + <TMPL_VAR NAME=ENTRY> + </a> + </td> + <td align="center" width="20%"> +   + <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>">View</a> + | + <a href="<TMPL_VAR NAME=PROGNAME>?<TMPL_VAR NAME=LINK>">Edit</a> + </td> + <td width="10%" align="center"> +   <br /> + </td> + <td> +   <br /> + </td> + </tr> + </TMPL_LOOP> + </table> + </td> + </tr> + </form> </table> <TMPL_VAR NAME="STATUS"> |
From: Rob H. <for...@us...> - 2001-10-20 05:43:44
|
Update of /cvsroot/sandweb/sandweb/lib In directory usw-pr-cvs1:/tmp/cvs-serv7441/lib Modified Files: SandWeb.pm Log Message: removed user objects, they are now created and used by the CGI as needed Index: SandWeb.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -U2 -r1.13 -r1.14 --- SandWeb.pm 2001/10/18 06:05:57 1.13 +++ SandWeb.pm 2001/10/20 05:43:41 1.14 @@ -7,6 +7,4 @@ use SandWeb::UI; use SandWeb::Auth; -use SandWeb::Repository; -use SandWeb::Browse; # initiates the config class, and creates the other objects with its data @@ -32,20 +30,4 @@ } -# user-specific objects. Unlike the startup objects, -# a user must be logged in before we have enough info -# to instantiate these objects. -sub user { - my $class = shift; - my %args = @_; - - my $repository = &_load_repository_object(%args); - my $browse = &_load_browse_object(%args); - - my $self = bless { - 'repository' => $repository, - 'browse' => $browse, - } -} - # read in config file, and return object reference to it's data. sub _load_conf_object { @@ -93,15 +75,4 @@ ); return $auth; -} - -sub _load_repository_object { - my %args = @_; - my $repository = SandWeb::Repository::->new(%args); - return $repository; -} -sub _load_browse_object { - my %args = @_; - my $browse = SandWeb::Browse::->new(%args); - return $browse; } |
From: Rob H. <for...@us...> - 2001-10-20 05:43:44
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv7441/bin Modified Files: sandweb.cgi Log Message: removed user objects, they are now created and used by the CGI as needed Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.61 retrieving revision 1.62 diff -U2 -r1.61 -r1.62 --- sandweb.cgi 2001/10/18 06:05:57 1.61 +++ sandweb.cgi 2001/10/20 05:43:41 1.62 @@ -7,4 +7,6 @@ # SandWeb Distribution Modules use SandWeb; +use SandWeb::Repository; +use SandWeb::Browse; # Debugging @@ -239,15 +241,15 @@ my $sandbox = $userprefs->{'paths'}->{'users_dir'}; - # instantiate browse and repository objects - my $return = SandWeb::->user( - username => $username, - template_dir => $template_dir, - users_dir => $users_dir, - repo_type => $repo_type, - root => $root, - sandbox => $sandbox, + my $repository = SandWeb::Repository->new( + root => $root, + repo_type => $repo_type, + sandbox => $sandbox, ); - my $browse = $return->{'browse'}; - my $repository = $return->{'repository'}; + + my $browse = SandWeb::Browse->new( + username => $username, + template_dir => $template_dir, + users_dir => $users_dir, + ); my $username = $auth->get_userinfo('username'); |
From: Nick J. <nje...@us...> - 2001-10-20 05:40:37
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv3632 Modified Files: sandweb-admin Log Message: fixed a bug with add-user Index: sandweb-admin =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-admin,v retrieving revision 1.7 retrieving revision 1.8 diff -U2 -r1.7 -r1.8 --- sandweb-admin 2001/10/07 14:16:57 1.7 +++ sandweb-admin 2001/10/20 05:40:35 1.8 @@ -83,4 +83,10 @@ } + $max_uid++; + open(PW, ">>$passwd_file") or + fexit('26', "Unable to open $passwd_file : $!"); + print PW "$name:$max_uid:$enc_pwd\n"; + close PW; + # added user's sandbox dir @@ -100,10 +106,4 @@ fexit('28', "Unable to create $name.\n"); } - - $max_uid++; - open(PW, ">>$passwd_file") or - fexit('26', "Unable to open $passwd_file : $!"); - print PW "$name:$max_uid:$enc_pwd\n"; - close PW; exit 0; |
From: Nick J. <nje...@us...> - 2001-10-20 04:52:58
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv1534/templates Modified Files: framework.html Log Message: Working on IE and Mozilla display differences in menu bar. Index: framework.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/framework.html,v retrieving revision 1.5 retrieving revision 1.6 diff -U2 -r1.5 -r1.6 --- framework.html 2001/10/06 06:46:35 1.5 +++ framework.html 2001/10/20 04:52:54 1.6 @@ -20,5 +20,5 @@ <tr> <td width="15%" valign="top" align="center" bgcolor="#bbbbbb"> - <table width="100%" align="center"> + <table width="100%" align="center" cellspacing="4"> <TMPL_VAR NAME=MENU_BAR><br /> </table> |
From: Rob H. <for...@us...> - 2001-10-18 06:06:00
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv21312/bin Modified Files: sandweb.cgi Log Message: renamed "action objects" to "user objects". "user" objects are currently : "browse" and "repository". This is explained in the comments in SandWeb.pm The situation is that all objects are instantiated by SandWeb.pm, and the references passed to the CGI. $browse and $repository are no longer defined globally; they are created in the browse_menu. I also removed the browse() subroutine from the CGI, which was replaced by browse_menu() some time ago. It is starting to make less sense to have all objects instantiated in SandWeb.pm ( although it makes sense for startup objects ), it is probably worthwhile to just instantiate the "browse" and "repository" objects in the browse_menu() method of the sandweb.cgi ... perhaps it will be easier to read, and the end result is exactly the same. dunno, gonna sleep on it. gotta get up early tomorrow. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.60 retrieving revision 1.61 diff -U2 -r1.60 -r1.61 --- sandweb.cgi 2001/10/17 04:27:29 1.60 +++ sandweb.cgi 2001/10/18 06:05:57 1.61 @@ -42,10 +42,8 @@ undef $return; # no need for this anymore -# action-related objects ( actions ) +# user-related objects # these variables are declared here, they will be # instantiated below ( if needed ) -my $userprefs; # data loaded form users prefs config file -my $browse; # the browse object - file browser. needs to keep state -my $repository; # current repository of user +my $userprefs; # data loaded from users prefs config file # internal variable configs for development ease @@ -100,15 +98,4 @@ my $sandbox = $userprefs->{'paths'}->{'users_dir'} . "/$username"; - # instantiate all "action" objects - my $return = SandWeb::->actions( - username => $username, - template_dir => $config->{'paths'}->{'template_dir'}, - users_dir => $config->{'paths'}->{'users_dir'}, - repo_type => $repo_type, - root => $root, - sandbox => $sandbox, - ); - $browse = $return->{'browse'}; - $repository = $return->{'repository'}; if ( param('action') eq 'main_menu' ) { @@ -245,4 +232,22 @@ preferences_menu( cookie => $cookie ); } + my $username = $auth->get_userinfo('username'); + 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'}; + + # instantiate browse and repository objects + my $return = SandWeb::->user( + username => $username, + template_dir => $template_dir, + users_dir => $users_dir, + repo_type => $repo_type, + root => $root, + sandbox => $sandbox, + ); + my $browse = $return->{'browse'}; + my $repository = $return->{'repository'}; my $username = $auth->get_userinfo('username'); @@ -408,32 +413,4 @@ login_menu(); } -} - -# calls the Browse object, for viewing/selecting files -sub browse { - my %args = @_; - my $cookie = $args{'cookie'}; - unless ($cookie) { - &login_menu(); - exit 0; - } - - my $username = $auth->get_userinfo('username'); - - my $path = url_param('path') || ''; - - # create Browse object and show user's sandbox - my $content = $browse->browse("$path", "$progname"); - - print header( -cookie => $cookie ); - $ui->print_screen( - TITLE=> 'SandWeb : Browse Menu', - MENU_TITLE => 'SandWeb', - SUBMENU_TITLE => 'browse menu', - FOOTER => '', - CONTENT => $content, - ERROR => $error, - ); - exit 0; } |
From: Rob H. <for...@us...> - 2001-10-18 06:06:00
|
Update of /cvsroot/sandweb/sandweb/lib In directory usw-pr-cvs1:/tmp/cvs-serv21312/lib Modified Files: SandWeb.pm Log Message: renamed "action objects" to "user objects". "user" objects are currently : "browse" and "repository". This is explained in the comments in SandWeb.pm The situation is that all objects are instantiated by SandWeb.pm, and the references passed to the CGI. $browse and $repository are no longer defined globally; they are created in the browse_menu. I also removed the browse() subroutine from the CGI, which was replaced by browse_menu() some time ago. It is starting to make less sense to have all objects instantiated in SandWeb.pm ( although it makes sense for startup objects ), it is probably worthwhile to just instantiate the "browse" and "repository" objects in the browse_menu() method of the sandweb.cgi ... perhaps it will be easier to read, and the end result is exactly the same. dunno, gonna sleep on it. gotta get up early tomorrow. Index: SandWeb.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -U2 -r1.12 -r1.13 --- SandWeb.pm 2001/10/06 08:17:12 1.12 +++ SandWeb.pm 2001/10/18 06:05:57 1.13 @@ -35,5 +35,5 @@ # a user must be logged in before we have enough info # to instantiate these objects. -sub actions { +sub user { my $class = shift; my %args = @_; |
From: Rob H. <for...@us...> - 2001-10-17 04:27:33
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv21468/lib/SandWeb Modified Files: Browse.pm Repository.pm Log Message: browse now gets it's repo_type and vcs_commands via sandweb.cgi, which instantiates a Repository object using userprefs. Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- Browse.pm 2001/10/16 04:51:44 1.14 +++ Browse.pm 2001/10/17 04:27:29 1.15 @@ -5,11 +5,4 @@ package SandWeb::Browse; -########################################### -# TEMPORARY VARIABLE FOR TESTING PURPOSES # -# # -my $repo_type = 'CVS'; # -# # -########################################### - use lib '../lib'; use SandWeb::UI; @@ -34,4 +27,7 @@ my $path = shift; my $progname = shift; + my $vcs_commands = shift; + my $repo_type = shift; + my %args = @_; @@ -40,4 +36,5 @@ my $template_dir = $self->_get_template_dir(); my $sandbox = "$users_dir/$username"; + my @vcs_commands = split (/ /, $vcs_commands ); if (! $sandbox) { @@ -138,8 +135,6 @@ my @loop_data = (); - my @cvs_commands = ( 'add', 'annotate', 'commit', 'diff', 'edit', 'editors', 'history', 'import', 'log', 'remove', 'status', 'tag', 'unedit', 'update', 'tag', 'unedit', 'watch', 'watchers' ); - if ($repo_type eq "CVS") { - foreach my $vcs_command (@cvs_commands) { + foreach my $vcs_command (@vcs_commands) { my %row_data; $row_data{VCS_CMD} = "$vcs_command"; Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- Repository.pm 2001/08/15 22:06:47 1.9 +++ Repository.pm 2001/10/17 04:27:29 1.10 @@ -588,4 +588,8 @@ } +sub get_vcs_commands { + return ( 'add', 'annotate', 'commit', 'diff', 'edit', 'editors', 'history', 'import', 'log', 'remove', 'status', 'tag', 'unedit', 'update', 'tag', 'unedit', 'watch', 'watchers' ); +} + sub get_root { my $self = shift; |
From: Rob H. <for...@us...> - 2001-10-17 04:27:33
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv21468/bin Modified Files: sandweb.cgi Log Message: browse now gets it's repo_type and vcs_commands via sandweb.cgi, which instantiates a Repository object using userprefs. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.59 retrieving revision 1.60 diff -U2 -r1.59 -r1.60 --- sandweb.cgi 2001/10/07 14:17:31 1.59 +++ sandweb.cgi 2001/10/17 04:27:29 1.60 @@ -90,14 +90,14 @@ } else { - # User is logged in; get username + # User is logged in; load prefs + load_prefs(1); my $username = $auth->get_userinfo('username'); - my $repository = $config->{'repository'}->{'name'}; - my $vcs_type = $config->{'repository'}->{'VCS'}; - my $root = $config->{'repository'}->{'root'}; - my $server = $config->{'repository'}->{'server'}; - my $sandbox = $config->{'paths'}->{'users_dir'} . "/$username"; + my $repo = $userprefs->{'repository'}->{'name'}; + my $repo_type = $userprefs->{'repository'}->{'VCS'}; + my $root = $userprefs->{'repository'}->{'root'}; + my $server = $userprefs->{'repository'}->{'server'}; + my $sandbox = $userprefs->{'paths'}->{'users_dir'} . "/$username"; - # XXX - What does this mean? I dont get it.. -nkj # instantiate all "action" objects my $return = SandWeb::->actions( @@ -105,5 +105,5 @@ template_dir => $config->{'paths'}->{'template_dir'}, users_dir => $config->{'paths'}->{'users_dir'}, - vcs_type => $vcs_type, + repo_type => $repo_type, root => $root, sandbox => $sandbox, @@ -247,10 +247,12 @@ my $username = $auth->get_userinfo('username'); + my @vcs_commands = $repository->get_vcs_commands(); + my $repo_type = $repository->get_repo_type(); my $path = url_param('path') || ''; - # create Browse object and show user's sandbox + # use the browse object to show user's sandbox - my $content = $browse->browse("$path", "$progname"); + my $content = $browse->browse("$path", "$progname", "@vcs_commands", $repo_type); print header( -cookie => $cookie ); @@ -406,9 +408,4 @@ login_menu(); } -} - -# XXX - Why not just remove it? :) -nkj -sub vcsaction { - exit 0; } |
From: Rob H. <for...@us...> - 2001-10-16 04:51:48
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv28416/templates Modified Files: browse.html Log Message: Browse now selects what to show on the pull-down menu based on repo_type Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.19 retrieving revision 1.20 diff -U2 -r1.19 -r1.20 --- browse.html 2001/10/09 17:21:50 1.19 +++ browse.html 2001/10/16 04:51:44 1.20 @@ -9,20 +9,7 @@ <input type="submit" name="function" value="Checkout" /> <select name="command"> -<option>add</option> -<option>annotate</option> -<option>commit</option> -<option>diff</option> -<option>edit</option> -<option>editors</option> -<option>history</option> -<option>import</option> -<option>log</option> -<option>remove</option> -<option>status</option> -<option>tag</option> -<option>unedit</option> -<option>update</option> -<option>watch</option> -<option>watchers</option> +<TMPL_LOOP NAME="VCS_CMD_LOOP"> +<option><TMPL_VAR NAME="VCS_CMD"></option> +</TMPL_LOOP> </select> <input type="submit" name="function" value="Done" /> |
From: Rob H. <for...@us...> - 2001-10-16 04:51:48
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv28416/lib/SandWeb Modified Files: Browse.pm Log Message: Browse now selects what to show on the pull-down menu based on repo_type Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -U2 -r1.13 -r1.14 --- Browse.pm 2001/09/28 21:51:53 1.13 +++ Browse.pm 2001/10/16 04:51:44 1.14 @@ -125,5 +125,5 @@ push(@loop_data, \%row_data); $content->param(ENTRY_LOOP => \@loop_data); - + if ($counter eq "1") { $counter = 0; @@ -135,4 +135,18 @@ $content->param(STATUS => 'No files.'); } + + my @loop_data = (); + + my @cvs_commands = ( 'add', 'annotate', 'commit', 'diff', 'edit', 'editors', 'history', 'import', 'log', 'remove', 'status', 'tag', 'unedit', 'update', 'tag', 'unedit', 'watch', 'watchers' ); + + if ($repo_type eq "CVS") { + foreach my $vcs_command (@cvs_commands) { + my %row_data; + $row_data{VCS_CMD} = "$vcs_command"; + push (@loop_data, \%row_data); + } + $content->param( VCS_CMD_LOOP => \@loop_data ); + } + return $content->output; } |
From: Rob H. <for...@us...> - 2001-10-10 07:27:04
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv7431 Modified Files: File.pm Log Message: now all methods are public, you would get info on a file object like : $file->get_owner(); Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- File.pm 2001/10/09 17:42:08 1.6 +++ File.pm 2001/10/10 07:27:01 1.7 @@ -21,48 +21,25 @@ } - -sub info { - my $self = shift; - - my $owner = $self->_get_owner(); - my $group = $self->_get_group(); - my $filename = $self->_get_filename(); - my $location = $self->_get_location(); - my $permissions = $self->_get_permissions(); - my $file_type = $self->_get_file_type(); - - my %info = { - 'owner' => $owner, - 'group' => $group, - 'filename' => $filename, - 'location' => $location, - 'permissions' => $permissions, - 'file_type' => $file_type, - }; - - return %info; -} - -sub _get_owner { +sub get_owner { my $self = shift; return $self->{'owner'}; } -sub _get_group { +sub get_group { my $self = shift; return $self->{'group'}; } -sub _get_filename { +sub get_filename { my $self = shift; return $self->{'filename'}; } -sub _get_permissions { +sub get_permissions { my $self = shift; return $self->{'permissions'}; } -sub _get_file_type { +sub get_file_type { my $self = shift; return $self->{'file_type'}; |