Index: openacs.org-dev/packages/bookmarks/www/bookmarks-import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/bookmarks/www/bookmarks-import.tcl,v diff -u -r1.1.1.1 -r1.1.1.2 --- openacs.org-dev/packages/bookmarks/www/bookmarks-import.tcl 9 Jul 2002 17:35:01 -0000 1.1.1.1 +++ openacs.org-dev/packages/bookmarks/www/bookmarks-import.tcl 8 Oct 2002 15:46:57 -0000 1.1.1.2 @@ -10,7 +10,7 @@ in December 2000. @creation-date December 2000 - @cvs-id $Id: + @cvs-id $Id$ } { upload_file upload_file.tmpfile:tmpfile @@ -30,7 +30,7 @@ } -properties { page_title:onevalue - context_bar_args:onevalue + context:onevalue import_list:onevalue return_url:onevalue @@ -50,23 +50,24 @@ if { [info exists error_list] } { set n_errors [llength $error_list] ad_return_template "complaint" + return } # Let's check for a doubleclick first if { [db_string dbclick_check " -select count(bookmark_id) as n_existing -from bm_bookmarks -where bookmark_id = :bookmark_id"] != 0 } { + select count(bookmark_id) as n_existing + from bm_bookmarks + where bookmark_id = :bookmark_id"] != 0 } { # must have doubleclicked ad_returnredirect $return_url - return + ad_script_abort } set page_title "Import Statistics" -set context_bar_args [bm_context_bar_args "\[list \"bookmark-add-import?[export_url_vars viewed_user_id return_url]\" \"Add/Import Bookmarks\"\] \"$page_title\"" $viewed_user_id] +set context [bm_context_bar_args "\[list \"bookmark-add-import?[export_url_vars viewed_user_id return_url]\" \"Add/Import Bookmarks\"\] \"$page_title\"" $viewed_user_id] # set flags to be used parsing the input file. @@ -132,7 +133,7 @@ "] ad_return_template "error" - return + return } else { # success in inserting folder into bm_bookmarks lappend import_list "Inserting folder \"$local_title\"" @@ -245,10 +246,11 @@ "] ad_return_template "error" - return + return } else { # assume this was a double click ad_returnredirect $return_url + ad_script_abort } } else { # insert into bm_bookmarks succeeded @@ -270,5 +272,3 @@ lappend import_list "Hmmm...the file seemed ok, but nothing was imported. Sorry!" } - -ad_return_template