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.4 -r1.5
--- openacs-4/packages/rss-support/rss-support.info	13 Nov 2001 05:36:48 -0000	1.4
+++ openacs-4/packages/rss-support/rss-support.info	12 Dec 2001 02:58:23 -0000	1.5
@@ -53,7 +53,7 @@
             <file type="content_page" path="www/subscr-ae.tcl"/>
         </files>
         <parameters>
-            <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="RssGenOutputDirectory"  default="rss" description="The directory to which RSS files will be written, relative to the webroot."/>
+            <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="RssGenOutputDirectory"  default="rss" description="The directory to which RSS files will be written, relative to the pageroot."/>
         </parameters>
 
     </version>
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.7 -r1.8
--- openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl	4 Dec 2001 04:57:20 -0000	1.7
+++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl	12 Dec 2001 02:58:23 -0000	1.8
@@ -63,7 +63,7 @@
     set xml [apply rss_gen $args]
 
     # Write report.
-    set report_file [rss_gen_report_file -summary_context_id $summary_context_id -impl_name $impl_name -assert -url]
+    set report_file [rss_gen_report_file -summary_context_id $summary_context_id -impl_name $impl_name -assert]
 
     set fh [open $report_file w]
     puts $fh $xml
@@ -140,11 +140,11 @@
     -summary_context_id
     -impl_name
     -subscr_id
-    {-assert:boolean f}
+    -assert:boolean
 } {
     Return a directory path, relative to the pageroot, for the rss
     subscription with subscr_id or impl_name + summary_context_id
-    provided.
+    provided.  If the assert flag is set, create the directory.
 } {
     if {!([info exists summary_context_id] && \
 	    [info exists impl_name])} {
@@ -165,24 +165,24 @@
     set report_dir /[ad_parameter -package_id [rss_package_id] RssGenOutputDirectory rss-support rss]/$impl_name/${summary_context_id}
 
     if $assert_p {
-	rss_assert_dir $report_dir
+	rss_assert_dir [ns_info pageroot]$report_dir
     }
 
     return $report_dir
 }
 
-ad_proc -private rss_gen_report_file {
+ad_proc -public rss_gen_report_file {
     -summary_context_id
     -impl_name
     -subscr_id
-    {-assert:boolean f}
-    {-url:boolean t}
+    -assert:boolean
+    -url:boolean
 } {
     Return a file path for the rss subscription with subscr_id
     or impl_name + summary_context_id provided.
     If the -assert flag is set, the parent directory is created if
-    it doesn't exist (default: false).
-    If the -url flag is set, return a url (default: true); otherwise
+    it doesn't exist
+    If the -url flag is set, return a url; otherwise
     return a Unix file path.  
 } {
     if {!([info exists summary_context_id] && \
Index: openacs-4/packages/rss-support/www/delete-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete-2.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/rss-support/www/delete-2.tcl	12 Dec 2001 02:58:23 -0000	1.1
@@ -0,0 +1,21 @@
+ad_page_contract  {
+    Delete the subscription, and maybe the report.
+} {
+    subscr_id:notnull,naturalnum
+    return_url:notnull
+    delete_file_p:optional
+}
+
+ad_require_permission $subscr_id admin
+
+if [info exists delete_file_p] {
+    ns_unlink -nocomplain [rss_gen_report_file -subscr_id $subscr_id]
+}
+
+db_exec_plsql delete_subscr {
+    select rss_gen_subscr__delete (
+        :subscr_id
+    )
+}
+
+ad_returnredirect $return_url
Index: openacs-4/packages/rss-support/www/delete.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/rss-support/www/delete.adp	4 Dec 2001 04:57:20 -0000	1.1
+++ openacs-4/packages/rss-support/www/delete.adp	12 Dec 2001 02:58:23 -0000	1.2
@@ -12,8 +12,7 @@
 <input type=hidden name=subscr_id value="@subscr_id@">
 <input type=hidden name=return_url value="@return_url@">
 <if @offer_file@ eq 1>
-<input type=checkbox name=delete_subscr_p>Delete subscription<br>
-<input type=checkbox name=delete_file_p>Delete report
+<input type=checkbox name=delete_file_p>Delete report (<a href="@report_url@">@report_url@</a>)
 </if>
 <p>
 <input type=submit value="Really delete?">
Index: openacs-4/packages/rss-support/www/delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/rss-support/www/delete.tcl	4 Dec 2001 04:57:20 -0000	1.1
+++ openacs-4/packages/rss-support/www/delete.tcl	12 Dec 2001 02:58:23 -0000	1.2
@@ -22,6 +22,7 @@
 
 if [file exists [rss_gen_report_file -subscr_id $subscr_id]] {
     set offer_file 1
+    set report_url [rss_gen_report_file -subscr_id $subscr_id -url]
 } else {
     set offer_file 0
 }
\ No newline at end of file
Index: openacs-4/packages/rss-support/www/my-subscrs.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/my-subscrs.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/rss-support/www/my-subscrs.adp	12 Dec 2001 02:58:23 -0000	1.1
@@ -0,0 +1,10 @@
+<master>
+<property name="title">Your Report Generation Subscriptions</property>
+
+<h2>Report Generation Subscriptions</h2>
+@context_bar@
+<hr>
+
+<small><em>Subscriptions created by you.</em></small>
+
+<include src="subscrs-include" enc_url="@enc_url@" user_id="@user_id@">
\ No newline at end of file
Index: openacs-4/packages/rss-support/www/my-subscrs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/my-subscrs.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/rss-support/www/my-subscrs.tcl	12 Dec 2001 02:58:23 -0000	1.1
@@ -0,0 +1,5 @@
+set context_bar [ad_context_bar Subscriptions]
+
+set enc_url [ad_urlencode [ad_conn url]?[ad_conn query]]
+
+set user_id [ad_conn user_id]
Index: openacs-4/packages/rss-support/www/subscr-ae.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscr-ae.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/rss-support/www/subscr-ae.adp	19 Nov 2001 04:02:28 -0000	1.2
+++ openacs-4/packages/rss-support/www/subscr-ae.adp	12 Dec 2001 02:58:23 -0000	1.3
@@ -1,7 +1,7 @@
 <master>
 <property name="title">Add or Edit a Subcription</property>
 
-<h2>@action@ a Subscription</h2>
+<h2>@pretty_action@ a Subscription</h2>
 @context_bar@
 <hr>
 
@@ -19,7 +19,7 @@
 <input type=radio name=timeout_units value="h">hours
 <input type=radio name=timeout_units value="d">days
 </td></tr>
-<tr bgcolor=efefef><td colspan=2 align=center><input type=submit value="@action@"></tr>
+<tr bgcolor=efefef><td colspan=2 align=center><input type=submit value="@pretty_action@"></tr>
 </table>
 @formvars@
 </form>
Index: openacs-4/packages/rss-support/www/subscr-ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscr-ae.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/rss-support/www/subscr-ae.tcl	4 Dec 2001 04:57:20 -0000	1.4
+++ openacs-4/packages/rss-support/www/subscr-ae.tcl	12 Dec 2001 02:58:23 -0000	1.5
@@ -40,7 +40,8 @@
 }
 
 if [info exists subscr_id] {
-    set action Edit
+    set action edit
+    set pretty_action Edit
     ad_require_permission $subscr_id admin
     db_1row subscr_info {
 	select impl_id,
@@ -52,7 +53,8 @@
 	where subscr_id = :subscr_id
     }
 } else {
-    set action Add
+    set action add
+    set pretty_action Add
     ad_require_permission $summary_context_id admin
     set subscr_id [db_nextval acs_object_id_seq]
     set timeout 3600
@@ -69,7 +71,7 @@
 assistance."
 }
 
-if { [string equal $channel_title ""] || [string equal $channel_link ""] } {
+if { ![info exists channel_title] || [string equal $channel_title ""] || [string equal $channel_link ""] } {
     if !$meta {
 	if [string equal $channel_title ""] {
 	    set channel_title "Summary Context $summary_context_id"
Index: openacs-4/packages/rss-support/www/subscrs-include.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscrs-include.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/rss-support/www/subscrs-include.adp	12 Dec 2001 02:58:23 -0000	1.1
@@ -0,0 +1,21 @@
+<table cellpadding="2" cellspacing="1" border="0">
+<tr bgcolor=e0e0e0>
+ <th>Name</th>
+ <th>Timeout</th>
+ <th>Last Built</th>
+ <th>Last Time To Build</th>
+ <th>Created By</th>
+ <th>Actions</th>
+</tr>
+<multiple name="subscrs">
+<tr bgcolor=efefef><td><if @subscrs.channel_link@ eq "">@subscrs.channel_title@</if><else><a href="@subscrs.channel_link@">@subscrs.channel_title@</a></else></else></td>
+    <td>@subscrs.timeout@s</td>
+    <td><nobr><small>@subscrs.lastbuild@</small></nobr></td>
+    <td>@subscrs.last_ttb@ seconds</td>
+    <td>@subscrs.creator@</td>
+    <td><a href="../subscr-ae?subscr_id=@subscrs.subscr_id@">edit</a> |
+        <a href="../subscr-run?subscr_id=@subscrs.subscr_id@&return_url=@enc_url@">run</a> | 
+	<a href="../delete?subscr_id=@subscrs.subscr_id@&return_url=@enc_url@">delete</a></td>
+</tr>
+</multiple>
+</table>
Index: openacs-4/packages/rss-support/www/subscrs-include.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscrs-include.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/rss-support/www/subscrs-include.tcl	12 Dec 2001 02:58:23 -0000	1.1
@@ -0,0 +1,23 @@
+if [info exists user_id] {
+    set maybe_restrict_to_user "and creation_user = :user_id"
+} else {
+    set maybe_restrict_to_user ""
+}
+
+db_multirow subscrs get_subscrs "
+    select s.subscr_id,
+           s.timeout,
+           person__name(o.creation_user) as creator,
+           coalesce(to_char(s.lastbuild,'YYYY-MM-DD HH24:MI:SS'),'never built') as lastbuild,
+           s.last_ttb,
+           s.channel_title,
+           s.channel_link
+    from rss_gen_subscrs s,
+         acs_objects o
+    where o.object_id = s.subscr_id $maybe_restrict_to_user
+    order by s.last_ttb desc
+" {
+    if [string equal $channel_title ""] {
+	set channel_title "Subscription #$subscr_id"
+    }
+}
Index: openacs-4/packages/rss-support/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/admin/index.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/rss-support/www/admin/index.adp	19 Nov 2001 04:02:28 -0000	1.1
+++ openacs-4/packages/rss-support/www/admin/index.adp	12 Dec 2001 02:58:23 -0000	1.2
@@ -6,7 +6,7 @@
 <hr>
 
 <ul>
-<li><a href="subscrs">Report Generation Subscriptions</a>
+<li><a href="subscrs">All Report Generation Subscriptions</a>
 </ul>
 
 <br><br><br><br><br><br><br>
\ No newline at end of file
Index: openacs-4/packages/rss-support/www/admin/subscrs.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/admin/subscrs.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/rss-support/www/admin/subscrs.adp	4 Dec 2001 04:57:20 -0000	1.3
+++ openacs-4/packages/rss-support/www/admin/subscrs.adp	12 Dec 2001 02:58:23 -0000	1.4
@@ -5,24 +5,4 @@
 @context_bar@
 <hr>
 
-<table cellpadding="2" cellspacing="1" border="0">
-<tr bgcolor=e0e0e0>
- <th>Name</th>
- <th>Timeout</th>
- <th>Last Built</th>
- <th>Last Time To Build</th>
- <th>Created By</th>
- <th>Actions</th>
-</tr>
-<multiple name="subscrs">
-<tr bgcolor=efefef><td><if @subscrs.channel_link@ eq "">@subscrs.channel_title@</if><else><a href="@subscrs.channel_link@">@subscrs.channel_title@</a></else></else></td>
-    <td>@subscrs.timeout@s</td>
-    <td><nobr><small>@subscrs.lastbuild@</small></nobr></td>
-    <td>@subscrs.last_ttb@ seconds</td>
-    <td>@subscrs.creator@</td>
-    <td><a href="../subscr-ae?subscr_id=@subscrs.subscr_id@">edit</a> |
-        <a href="../subscr-run?subscr_id=@subscrs.subscr_id@&return_url=@enc_url@">run</a> | 
-	<a href="../delete?subscr_id=@subscrs.subscr_id@&return_url=@enc_url@">delete</a></td>
-</tr>
-</multiple>
-</table>
+<include src="../subscrs-include" enc_url="@enc_url@">
\ No newline at end of file
Index: openacs-4/packages/rss-support/www/admin/subscrs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/admin/subscrs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/rss-support/www/admin/subscrs.tcl	4 Dec 2001 04:57:20 -0000	1.3
+++ openacs-4/packages/rss-support/www/admin/subscrs.tcl	12 Dec 2001 02:58:23 -0000	1.4
@@ -1,21 +1,3 @@
-db_multirow subscrs get_subscrs {
-    select s.subscr_id,
-           s.timeout,
-           person__name(o.creation_user) as creator,
-           coalesce(to_char(s.lastbuild,'YYYY-MM-DD HH24:MI:SS'),'never built') as lastbuild,
-           s.last_ttb,
-           s.channel_title,
-           s.channel_link
-    from rss_gen_subscrs s,
-         acs_objects o
-    where o.object_id = s.subscr_id
-    order by s.last_ttb desc
-} {
-    if [string equal $channel_title ""] {
-	set channel_title "Subscription #$subscr_id"
-    }
-}
-
 set context_bar [ad_context_bar Subscriptions]
 
 set enc_url [ad_urlencode [ad_conn url]?[ad_conn query]]
\ No newline at end of file
Index: openacs-4/packages/rss-support/www/doc/bboard.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/doc/bboard.html,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/rss-support/www/doc/bboard.html	13 Nov 2001 03:18:20 -0000	1.2
+++ openacs-4/packages/rss-support/www/doc/bboard.html	12 Dec 2001 02:58:23 -0000	1.3
@@ -25,23 +25,19 @@
 
 <li>Define the implementation procs.  This <a href="bboard-rss-sc-procs-tcl.txt">example</a> implements the contracted procs.
 
-<li>Create a subscription for each context to be summarized.
-Until admin pages are available, do this by hand as follows:
+<li>Create a subscription for each forum to be summarized.
+This can be accomplished by querying for the implentation's
+<code>impl_id</code> as follows
+
 <blockquote><pre>
-select rss_gen_subscr__new (
-       null,				-- subscr_id
-       2752,				-- impl_id
-       2746,				-- summary_context_id (forum_id)
-       0,				-- timeout
-       null,				-- lastbuild
-       'rss_gen_subscr',		-- object_type
-       now(),				-- creation_date
-       null,				-- creation_user
-       null,				-- creation_ip
-       null				-- context_id
-);
+select acs_sc_impl__get_id('RssGenerationSubscriber','bboard_forum');
 </pre></blockquote>
 
+and navigating to
+/rss/subscr-ae?impl_id=$impl_id&summary_context_id=$forum_id (note
+that subscr-ae doesn't accept <code>impl_name</code> as a URL parameter
+for security reasons).
+
 <li>The scheduled proc <code>rss_gen_service</code> will create a
 binding for the implementation and generate summaries for each
 subscription if the conditions for summary generation are met (i.e. if
Index: openacs-4/packages/rss-support/www/doc/design.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/doc/design.html,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/rss-support/www/doc/design.html	19 Nov 2001 04:02:28 -0000	1.2
+++ openacs-4/packages/rss-support/www/doc/design.html	12 Dec 2001 02:58:23 -0000	1.3
@@ -126,13 +126,6 @@
 reasonably small, as we will have to parse this list-of-lists to
 generate a summary.
 
-<h3>2. Feed Parsing</h3>
-
-(aeg's vague ideas: needs can vary.  I can imagine slurping the content into
-the db or converting to includable ADPs using XSLT.  Service contract
-operations are used to generate mappings to RDBMS tables or stylesheets.
-
-
 <hr>
 <address>
 <a href="mailto:aegrumet@alum.mit.edu">aegrumet@alum.mit.edu</a>,
Index: openacs-4/packages/rss-support/www/doc/index.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/doc/index.html,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/rss-support/www/doc/index.html	13 Nov 2001 05:35:59 -0000	1.7
+++ openacs-4/packages/rss-support/www/doc/index.html	12 Dec 2001 02:58:23 -0000	1.8
@@ -15,7 +15,6 @@
 <p>
 <li>To-do's
   <ol>
-  <li>Admin screens for subscription management (** add/edit functional **)
   <li>Exception handling
   <li>Testing
   <li>Port to Oracle