Index: openacs-4/packages/ref-us-states/ref-us-states.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-us-states/ref-us-states.info,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ref-us-states/ref-us-states.info 23 Sep 2002 23:32:29 -0000 1.5 +++ openacs-4/packages/ref-us-states/ref-us-states.info 17 May 2003 11:12:39 -0000 1.6 @@ -19,7 +19,7 @@ It is needed by many other packages. - + Index: openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info 23 Sep 2002 23:32:30 -0000 1.4 +++ openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info 17 May 2003 11:13:48 -0000 1.5 @@ -18,7 +18,7 @@ This is needed by ecommerce among other things. - + Index: openacs-4/packages/robot-detection/robot-detection.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/robot-detection/robot-detection.info,v diff -u -r1.3 -r1.4 --- openacs-4/packages/robot-detection/robot-detection.info 3 May 2001 20:00:49 -0000 1.3 +++ openacs-4/packages/robot-detection/robot-detection.info 17 May 2003 11:14:29 -0000 1.4 @@ -17,7 +17,7 @@ ArsDigita Corporation With this package, you can automatically redirect web robots from search engines away from areas that require login and into a separate area which should have content suitable for indexing. - + Index: openacs-4/packages/robot-detection/tcl/robot-detection-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/robot-detection/tcl/robot-detection-procs-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/robot-detection/tcl/robot-detection-procs-postgresql.xql 30 Nov 2002 17:42:40 -0000 1.2 +++ openacs-4/packages/robot-detection/tcl/robot-detection-procs-postgresql.xql 17 May 2003 11:16:04 -0000 1.3 @@ -4,7 +4,7 @@ - select trunc(current_time - max(coalesce(modified_date, insertion_date))) from robots + select trunc(current_timestamp - max(coalesce(modified_date, insertion_date))) from robots Index: openacs-4/packages/rss-support/rss-support.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/rss-support.info,v diff -u -r1.9 -r1.10 --- openacs-4/packages/rss-support/rss-support.info 30 Jan 2003 16:50:46 -0000 1.9 +++ openacs-4/packages/rss-support/rss-support.info 17 May 2003 11:17:03 -0000 1.10 @@ -8,7 +8,7 @@ t rss-support - + oracle postgresql @@ -29,7 +29,7 @@ - + Index: openacs-4/packages/rss-support/sql/oracle/rss-generation-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/oracle/rss-generation-sc-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/rss-support/sql/oracle/rss-generation-sc-create.sql 30 Oct 2002 16:07:31 -0000 1.1 +++ openacs-4/packages/rss-support/sql/oracle/rss-generation-sc-create.sql 17 May 2003 11:17:47 -0000 1.2 @@ -22,7 +22,7 @@ foo := acs_sc_operation.new( contract_name => 'RssGenerationSubscriber', - operation_name => 'Datasource', + operation_name => 'datasource', operation_desc => 'Data Source', operation_iscachable_p => 'f', operation_nargs => 1, @@ -42,7 +42,7 @@ foo := acs_sc_operation.new( contract_name => 'RssGenerationSubscriber', - operation_name => 'LastUpdated', + operation_name => 'lastUpdated', operation_desc => 'Last Updated', operation_iscachable_p => 'f', operation_nargs => 1, @@ -52,4 +52,4 @@ end; / -show errors \ No newline at end of file +show errors Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/rss-support/sql/oracle/upgrade/upgrade-0.2d1-0.2d2.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 30 Jan 2003 15:14:02 -0000 1.9 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 17 May 2003 11:20:27 -0000 1.10 @@ -114,7 +114,7 @@ timeout integer constraint rss_gen_subscrs_timeout_nn not null, - lastbuild timestamp, + lastbuild timestamptz, last_ttb integer, channel_title varchar(200), channel_link varchar(1000), @@ -169,9 +169,9 @@ integer, -- impl_id varchar, -- summary_context_id integer, -- timeout - timestamp with time zone, -- lastbuild + timestamptz, -- lastbuild varchar, -- object_type - timestamp with time zone, -- creation_date + timestamptz, -- creation_date integer, -- creation_user varchar, -- creation_ip integer -- context_id Index: openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql 19 Nov 2001 04:02:28 -0000 1.3 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql 17 May 2003 11:20:27 -0000 1.4 @@ -16,6 +16,6 @@ select acs_object_type__drop_type('rss_gen_subscr','f'); drop table rss_gen_subscrs; -drop function rss_gen_subscr__new (integer,integer,varchar,integer,timestamp,varchar,timestamp,integer,varchar,integer); +drop function rss_gen_subscr__new (integer,integer,varchar,integer,timestamptz,varchar,timestamptz,integer,varchar,integer); drop function rss_gen_subscr__name (integer); drop function rss_gen_subscr__delete (integer); Index: openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql 30 Oct 2002 16:07:33 -0000 1.1 +++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql 17 May 2003 11:22:12 -0000 1.2 @@ -1,15 +1,60 @@ - - oracle - 8.1.6 - + oracle8.1.6 - + + select r.subscr_id, + r.timeout, + r.summary_context_id, + i.impl_name, + nvl2(r.lastbuild, date_part('epoch',r.lastbuild), 0) as lastbuild + from rss_gen_subscrs r, + acs_sc_impls i + where i.impl_id = r.impl_id + and (r.lastbuild is null + or sysdate > r.lastbuild + r.timeout/(60*60*24) + + + + + + update rss_gen_subscrs + set lastbuild = sysdate, + last_ttb = :last_ttb $extra_sql + where subscr_id = :subscr_id + + + + + select acs_sc_contract.get_id('RssGenerationSubscriber') from dual - \ No newline at end of file + + + + select impl_id + from acs_sc_impls i + where impl_contract_name = 'RssGenerationSubscriber' + and not exists (select 1 + from acs_sc_bindings b + where b.impl_id = i.impl_id + and b.contract_id = :contract_id) + + + + + + begin + acs_sc_binding.new( + contract_id => $contract_id, + impl_id => $impl_id + ); + end; + + + + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/rss-support/tcl/rss-generation-service-procs-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 30 Jan 2003 16:51:46 -0000 1.12 +++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 17 May 2003 11:22:12 -0000 1.13 @@ -17,21 +17,7 @@ set n 0 - db_foreach timed_out_subscriptions { - select r.subscr_id, - r.timeout, - r.summary_context_id, - i.impl_name, - case when r.lastbuild = null - then 0 - else date_part('epoch',r.lastbuild) - end as lastbuild - from rss_gen_subscrs r, - acs_sc_impls i - where i.impl_id = r.impl_id - and (r.lastbuild is null - or now() - r.lastbuild > cast(r.timeout || ' seconds' as interval)) - } { + db_foreach timed_out_subscriptions {} { set lastupdate [acs_sc_call RssGenerationSubscriber lastUpdated \ $summary_context_id $impl_name] if { $lastupdate > $lastbuild } { @@ -50,14 +36,7 @@ } { set start [clock seconds] - db_1row subscr_info { - select i.impl_name, - r.summary_context_id - from acs_sc_impls i, - rss_gen_subscrs r - where r.subscr_id = :subscr_id - and i.impl_id = r.impl_id - } + db_1row subscr_info {} set datasource [acs_sc_call RssGenerationSubscriber datasource \ $summary_context_id $impl_name] @@ -94,12 +73,7 @@ } set last_ttb [expr [clock seconds] - $start] - db_dml update_timestamp " - update rss_gen_subscrs - set lastbuild = now(), - last_ttb = :last_ttb $extra_sql - where subscr_id = :subscr_id - " + db_dml update_timestamp {} } ad_proc -private rss_assert_dir path { @@ -121,27 +95,14 @@ ad_proc -private rss_gen_bind {} { Creates bindings for unbound implementations for RssGenerationSubscriber. } { - set contract_id [db_string get_contract_id { - select acs_sc_contract__get_id('RssGenerationSubscriber') - }] + set contract_id [db_string get_contract_id {}] - db_foreach get_unbound_impls { - select impl_id - from acs_sc_impls i - where impl_contract_name = 'RssGenerationSubscriber' - and not exists (select 1 - from acs_sc_bindings b - where b.impl_id = i.impl_id - and b.contract_id = :contract_id) - - } { + db_foreach get_unbound_impls {} { ns_log Notice "rss_gen_bind: binding impl $impl_id for contract $contract_id" # Don't ask me why, but bind variables don't appear to work # in this nested db operation. if [catch { - db_exec_plsql bind_impl " - select acs_sc_binding__new($contract_id,$impl_id) - " + db_exec_plsql bind_impl {} } errMsg] { ns_log Notice "rss_gen_bind: error binding impl $impl_id for contract $contract_id: $errMsg" } @@ -163,14 +124,7 @@ if ![info exists subscr_id] { error "rss_gen_report_dir needs either subscr_id or impl_id+summary_context_id" } else { - db_1row subscr_context_and_impl { - select s.summary_context_id, - i.impl_name - from rss_gen_subscrs s, - acs_sc_impls i - where i.impl_id = s.impl_id - and s.subscr_id = :subscr_id - } + db_1row subscr_context_and_impl {} } } @@ -193,22 +147,14 @@ or impl_name + summary_context_id provided. If the -assert flag is set, the parent directory is created if it doesn't exist - If the -url flag is set, return a url; otherwise - return a Unix file path. + @return a Unix file path. } { if {!([info exists summary_context_id] && \ [info exists impl_name])} { if ![info exists subscr_id] { error "rss_gen_report_file needs either subscr_id or impl_id+summary_context_id" } else { - db_1row subscr_context_and_impl { - select s.summary_context_id, - i.impl_name - from rss_gen_subscrs s, - acs_sc_impls i - where i.impl_id = s.impl_id - and s.subscr_id = :subscr_id - } + db_1row subscr_context_and_impl {} } } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/rss-support/tcl/rss-generation-service-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/rss-support/tcl/rss-utilities-procs-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/rss-support/tcl/rss-utilities-procs-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl 12 Sep 2002 22:44:31 -0000 1.3 +++ openacs-4/packages/rss-support/tcl/rss-utilities-procs.tcl 17 May 2003 11:22:12 -0000 1.4 @@ -16,7 +16,7 @@ # Returns 0 otherwise. } { - if ![db_0or1row get_package_id {select package_id from apm_packages where package_key = 'rss-support'}] { + if ![db_0or1row get_package_id {}] { return 0 } else { return $package_id @@ -30,7 +30,7 @@ } { set package_id [rss_package_id] - return [db_string rss_url {select site_node__url(node_id) from site_nodes where object_id = :package_id} -default ""] + return [db_string rss_url {} -default ""] } @@ -52,19 +52,9 @@ } { set url "" - if [db_0or1row first_node_id { - select node_id from site_nodes - where object_id = :package_id - order by node_id limit 1 - }] { - db_foreach url_parts { - select s2.name - from site_nodes s1, site_nodes s2 - where s1.node_id = :node_id - and s1.tree_sortkey between s2.tree_sortkey and tree_right(s2.tree_sortkey) - order by s2.tree_sortkey; - } { - append url ${name}/ + if [db_0or1row first_node_id {}] { + db_foreach url_parts {} { + append url ${name} } } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/rss-support/tcl/rss-utilities-procs.xql'. Fisheye: No comparison available. Pass `N' to diff?