Index: openacs-4/packages/news-aggregator/www/aggregator-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/aggregator-delete.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/news-aggregator/www/aggregator-delete.tcl 10 Apr 2018 12:57:45 -0000 1.7 +++ openacs-4/packages/news-aggregator/www/aggregator-delete.tcl 5 Oct 2021 12:04:22 -0000 1.8 @@ -11,12 +11,24 @@ -privilege write set user_id [ad_conn user_id] -set default_aggregator [db_string find_default {}] +set default_aggregator [db_string find_default { + select default_aggregator + from na_user_preferences + where user_id = :user_id +}] if {$delete_aggregator_id eq $default_aggregator} { # We are deleting the user's default aggregator # Set user's oldest aggregator as new default - set new_default_aggregator [db_string select_oldest_aggregator {} -default ""] + set new_default_aggregator [db_string select_oldest_aggregator { + select min(aggregator_id) + from na_aggregators a, + acs_objects o + where a.aggregator_id = o.object_id + and creation_user = :user_id + and aggregator_id != :delete_aggregator_id + order by creation_date + } -default ""] if { $new_default_aggregator ne "" } { news_aggregator::aggregator::set_user_default \ -user_id $user_id \ Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/aggregator-delete.xql'. Fisheye: No comparison available. Pass `N' to diff?