Index: openacs-4/packages/contacts/www/search-action.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/search-action.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/www/search-action.tcl 14 Jun 2005 06:08:28 -0000 1.1 +++ openacs-4/packages/contacts/www/search-action.tcl 14 Jun 2005 06:51:54 -0000 1.2 @@ -57,15 +57,16 @@ util_user_message -html -message [_ contacts.The_search_-title-_was_made_public] } "copy" { - set similar_titles [db_list get_similar_titles {}] + regsub -all "'" $title "''" sql_title + set similar_titles [db_list select_similar_titles {}] set number 1 set orig_title $title while { [lsearch $similar_titles $title] >= 0 } { set title "$orig_title ($number)" incr number } set new_search_id [contact::search::new -title $title -owner_id $owner_id -all_or_any $all_or_any -object_type $object_type] - db_foreach select_search_conditions {}{ + db_foreach select_search_conditions {} { contact::search::condition::new -search_id $new_search_id -type $type -var_list $var_list } util_user_message -html -message [_ contacts.The_search_-title-_was_copied_to_your_searches]