Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv7637
Modified Files:
sandweb.cgi
Log Message:
confirm_delete is hooked up, working and tested.
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.322
retrieving revision 1.323
diff -U2 -r1.322 -r1.323
--- sandweb.cgi 5 Oct 2002 05:57:40 -0000 1.322
+++ sandweb.cgi 5 Oct 2002 18:32:16 -0000 1.323
@@ -519,4 +519,8 @@
$log->debug("entering login menu");
+
+ #
+ # generate random salt for login encryption
+ #
my $salt = rand(0xffffffff);
@@ -524,5 +528,4 @@
MENU => 'login',
PROGNAME => "$progname",
-#a salt here (for challenge)
SALT => $salt,
);
@@ -615,4 +618,8 @@
my @module_list = ();
+ #
+ # compile list of module names and descriptions
+ #
+
foreach my $repo_name (@repo_list) {
if (my @module_list = $user->get_module_list(repo => $repo_name )) {
@@ -622,8 +629,9 @@
$entry{'MODULE_NAME'} = $module_name;
$entry{'REPO_NAME'} = $repo_name;
- $entry{'MODULE_DESC'} = $user->get_module_description(
- repo => $repo_name,
- module => $module_name
- );
+ $entry{'MODULE_DESC'} =
+ $user->get_module_description(
+ repo => $repo_name,
+ module => $module_name
+ );
$entry{'REPOSITORY'} = $repo_name;
push @module_loop, \%entry;
@@ -750,6 +758,7 @@
$repo_type = $repository->get_repo_type();
-
+ #
# use the browse object to show user's sandbox
+ #
my $popup_header = $ui->get_menu(
@@ -757,4 +766,8 @@
);
+ #
+ # toolbar has useful functions like create/delete/rename file/directory
+ #
+
my %toolbar = $browse->get_tool_bar(
'location' => $location,
@@ -762,4 +775,8 @@
);
+ #
+ # figure out what VCS commands we have available and build a VCS toolbar
+ #
+
my @loop_data = ();
my $count = 0;
@@ -857,4 +874,9 @@
my $confirm_delete_checked;
+ #
+ # if confirm_delete is null, then we don't want the "checked" attribute in the output
+ # if it is not-null, then we want the "checked" attribute to have the value "on"
+ #
+
if ($confirm_delete) {
$confirm_delete_checked = 'checked="on"';
@@ -923,4 +945,9 @@
$repository_selected = $repository_selected || $repos[0] || $new_string;
+ #
+ # build a list of repositories for the pulldown and check that they
+ # are valid
+ #
+
if (($repository_selected) && ($repository_selected ne $new_string)) {
my $valid = 0;
@@ -1105,9 +1132,11 @@
);
-
my $file_content = $file->file_read();
- # make output browser-friendly
- # Special Characters; RFC 1866
+ #
+ # make output browser-friendly by escaping all characters reserved by HTML,
+ # see RFC 1866 for details
+ #
+
$file_content =~ s/&/&/g;
$file_content =~ s/\"/"/g;
@@ -1140,4 +1169,5 @@
my @vcs_commands = $repository->get_vcs_commands();
+
$log->debug("creating Browse object");
my $browse = SandWeb::Browse->new(
@@ -1242,6 +1272,12 @@
###############################################################################
+# XXX FIXME the inline editor is disabled until such time as we can replace
+# it with something better than a regular HTML input field, which
+# has too many quirks ( e.g. strange EOL conventions ) to be
+# a good enough editor
+#
# edit file menu
#
+#
# edit a file, with the option to save.
#
@@ -1335,4 +1371,6 @@
my %args = @_;
+ my $confirm_delete = $user->get_confirm_delete();
+
my $ck_auth = $args{'ck_auth'};
my $location = $args{'location'};
@@ -1383,4 +1421,16 @@
}
+ unless ($confirm_delete) {
+ delete_commit(
+ main_window_url => $main_window_url,
+ location => $location,
+ module_name => $module_name,
+ repo_name => $repo_name,
+ filename => \@filename,
+ );
+
+ exit;
+ }
+
my $content = $ui->get_menu(
MENU => 'delete',
@@ -1730,4 +1780,9 @@
###############################################################################
+# XXX FIXME the inline editor is disabled until such time as we can replace
+# it with something better than a regular HTML input field, which
+# has too many quirks ( e.g. strange EOL conventions ) to be
+# a good enough editor
+#
# edit_file_commit is called by edit_file_menu to save edited data
#
|