Index: openacs-4/packages/curriculum-central/tcl/stream-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/tcl/stream-procs-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/tcl/stream-procs-postgresql.xql 24 Nov 2005 23:08:32 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+ postgresql7.4
+
+
+
+ SELECT * FROM cc_stream LIMIT 1
+
+
+
Index: openacs-4/packages/curriculum-central/tcl/stream-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/tcl/stream-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/tcl/stream-procs.tcl 24 Nov 2005 23:08:32 -0000 1.1
@@ -0,0 +1,25 @@
+ad_library {
+
+ Curriculum Central Stream Library
+
+ Procedures that deal with streams.
+
+ @creation-date 2005-11-25
+ @author Nick Carroll
+ @cvs-id $Id: stream-procs.tcl,v 1.1 2005/11/24 23:08:32 ncarroll Exp $
+
+}
+
+namespace eval curriculum_central::stream {}
+
+ad_proc -public curriculum_central::stream::streams_exist_p {} {
+ Checks if at least one stream has been created for an instance of
+ Curriculum Central.
+
+ @param package_id The mounted instance of Curriculum Central.
+ @return Returns true 1 at least one stream has been created, otherwise
+ 0 is returned.
+} {
+ # Return 1 if at least one stream has been created, otherwise 0.
+ return [db_0or1row streams_exist {}]
+}
Index: openacs-4/packages/curriculum-central/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/index.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/curriculum-central/www/index.tcl 20 Nov 2005 23:51:11 -0000 1.1
+++ openacs-4/packages/curriculum-central/www/index.tcl 24 Nov 2005 23:08:32 -0000 1.2
@@ -11,7 +11,7 @@
set admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin]
# Check for streams. If no streams, then display no-streams template.
-if { 1 } {
+if { ![curriculum_central::stream::streams_exist_p] } {
ad_return_template "no-streams"
return
}