Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v
diff -u -r1.36 -r1.37
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 9 Dec 2001 04:21:58 -0000 1.36
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 10 Feb 2002 22:11:31 -0000 1.37
@@ -945,7 +945,7 @@
child_id integer;
start_pos integer default 1;
end_pos integer;
- counter integer default 0;
+ counter integer default 1;
item_name varchar;
begin
@@ -967,12 +967,13 @@
LOOP
- end_pos := instr(v_item_path, ''/'', start_pos);
+ end_pos := instr(v_item_path, ''/'', 1, counter);
if end_pos = 0 then
item_name := substr(v_item_path, start_pos);
else
item_name := substr(v_item_path, start_pos, end_pos - start_pos);
+ counter := counter + 1;
end if;
select
Index: openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql 13 Jul 2001 02:41:39 -0000 1.1
+++ openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql 10 Feb 2002 22:11:31 -0000 1.2
@@ -903,7 +903,7 @@
v_timespan_id, -- timespan_id
event_row.activity_id, -- activity_id`
event_row.recurrence_id, -- recurrence_id
- ''acs_event'', -- object_type (default)
+ object_row.object_type, -- object_type (default)
now(), -- creation_date (default)
object_row.creation_user, -- creation_user
object_row.creation_ip, -- creation_ip
Index: openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl 13 Mar 2001 22:59:26 -0000 1.1
+++ openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl 10 Feb 2002 22:11:31 -0000 1.2
@@ -97,7 +97,10 @@
"
if {[llength $expand] == 0} {
- lappend expand [db_string node_id {select site_node.node_id('/') from dual}]
+ lappend expand $root_id
+ if { ![empty_string_p $parent_id] } {
+ lappend expand $parent_id
+ }
}
# You might wonder why level is aliased as mylevel here. Well, for some
Index: openacs-4/packages/acs-subsite/www/register/awaiting-email-verification-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/Attic/awaiting-email-verification-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-subsite/www/register/awaiting-email-verification-postgresql.xql 15 May 2001 16:59:01 -0000 1.2
+++ openacs-4/packages/acs-subsite/www/register/awaiting-email-verification-postgresql.xql 10 Feb 2002 22:11:31 -0000 1.3
@@ -6,10 +6,12 @@
- select member_state, email, oid as rowid
- from cc_users
- where user_id = :user_id and
- email_verified_p = 'f'
+ select mr.member_state, p.email, u.oid as rowid
+ from users u
+ JOIN parties p on (p.party_id = u.user_id)
+ LEFT JOIN membership_rels mr on (mr.rel_id = u.user_id)
+ where u.user_id = :user_id
+ and u.email_verified_p = 'f'
Index: openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl 14 Jul 2001 23:03:25 -0000 1.3
+++ openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl 10 Feb 2002 22:11:31 -0000 1.4
@@ -220,4 +220,4 @@
# store in cache and return
nsv_set NSXML comments_ok_p $result
return $result
-}
\ No newline at end of file
+}
Index: openacs-4/packages/acs-tcl/tcl/admin-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/admin-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 20 Nov 2001 21:49:52 -0000 1.2
+++ openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 10 Feb 2002 22:11:31 -0000 1.3
@@ -37,7 +37,8 @@
set ssl_port [ns_config -int "ns/server/[ns_info server]/module/nsopenssl" Port 443]
}
- set host [ns_set iget [ad_conn headers] "host"]
+ set host [ad_conn host]
+ #set host [ns_set iget [ad_conn headers] "host"]
if { [regexp {^(.*?):(.*)$} $host match host port] == 0 || [string compare $port $http_port] == 0 } {
set url [ad_conn url]
if { $ssl_port == 443 } {
Index: openacs-4/packages/acs-templating/tcl/parse-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/parse-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-templating/tcl/parse-procs.tcl 19 Jan 2002 22:10:14 -0000 1.3
+++ openacs-4/packages/acs-templating/tcl/parse-procs.tcl 10 Feb 2002 22:11:31 -0000 1.4
@@ -501,15 +501,81 @@
ns_adp_trunc
}
+ad_proc -private template::tag_attribute {
+ tag
+ attribute
+} {
+ Return an attribute from a tag that has already been processed.
+
+ @author Lee Denison (lee@runtime-collective.com)
+ @creation-date 2002-01-30
+
+ @return the value of the tag's attribute
+ @param tag the tag identifier
+ @param attribute the attribute name
+} {
+ return [ns_set get $tag $attribute]
+}
+
+ad_proc -private template::current_tag {} {
+ Return the top level tag from the stack.
+
+ @author Lee Denison (lee@runtime-collective.com)
+ @creation-date 2002-01-30
+
+ @return the tag from the top of the tag stack.
+} {
+ variable tag_stack
+
+ return [lindex [lindex $tag_stack end] 1]
+}
+
+ad_proc -private template::enclosing_tag {
+ tag
+} {
+ Reach back into the tag stack for the last enclosing instance of a tag.
+
+ Typically used where the usage of a tag depends on its context, such
+ as the "group" tag within a "multiple" tag.
+
+ @author Lee Denison (lee@runtime-collective.com)
+ @creation-date 2002-01-30
+
+ @return the tag identifier for the enclosing tag
+ @param tag the type (eg. multiple) of the enclosing tag to look for.
+} {
+ set name ""
+
+ variable tag_stack
+
+ set last [expr [llength $tag_stack] - 1]
+
+ for { set i $last } { $i >= 0 } { incr i -1 } {
+
+ set pair [lindex $tag_stack $i]
+
+ if { [string equal [lindex $pair 0] $tag] } {
+ set name [lindex $pair 1]
+ break
+ }
+ }
+
+ return $name
+}
+
# @private get_enclosing_tag
# Reach back into the tag stack for the last enclosing instance of a tag.
# Typically used where the usage of a tag depends on its context, such
# as the "group" tag within a "multiple" tag.
+#
+# Deprecated, use:
+# set tag [template::enclosing_tag ]
+# set attribute [template::tag_attribute tag ]
# @param tag The name of the enclosing tag to look for.
-ad_proc -public template::get_enclosing_tag { tag } {
+ad_proc -public -deprecated template::get_enclosing_tag { tag } {
set name ""
Index: openacs-4/packages/acs-templating/tcl/tag-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-init.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-templating/tcl/tag-init.tcl 17 Sep 2001 05:16:40 -0000 1.2
+++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 10 Feb 2002 22:11:31 -0000 1.3
@@ -102,21 +102,33 @@
set startrow [template::get_attribute multiple $params startrow 0]
set maxrows [template::get_attribute multiple $params maxrows -1]; #unlimit
+ set tag_id [template::current_tag]
+
+ set i "__${tag_id}_i"
+
template::adp_append_code "
- for { set __i [expr 1 + $startrow] } { \$__i <= \${$name:rowcount}"
+ if {\[info exists $name\]} {
+ upvar 0 $name __${tag_id}_swap
+ }
+ for { set $i [expr 1 + $startrow] } { \$$i <= \${$name:rowcount}"
+
if {$maxrows >= 0} {
- template::adp_append_code " && \$__i <= [expr $maxrows + $startrow]" \
+ template::adp_append_code " && \$$i <= [expr $maxrows + $startrow]" \
-nobreak
}
- template::adp_append_code " } { incr __i } {
- upvar 0 $name:\$__i $name
+ template::adp_append_code " } { incr $i } {
+ upvar 0 $name:\$$i $name
" -nobreak
template::adp_compile_chunk $chunk
- template::adp_append_code "}"
+ template::adp_append_code "}
+
+ if {\[info exists __${tag_id}_swap\]} {
+ upvar 0 __${tag_id}_swap $name
+ }"
}
# Repeat a template chunk for each item in a list
@@ -164,34 +176,38 @@
# Scan the parameter stack backward, looking for the tag name
- set name [template::get_enclosing_tag multiple]
+ set tag_id [template::enclosing_tag multiple]
- if { [string equal $name {}] } {
+ if { [string equal $tag_id {}] } {
error "No enclosing MULTIPLE tag for GROUP tag on column $column"
}
+ set name [template::tag_attribute $tag_id name]
+
+ set i "__${tag_id}_i"
+
# while the value of name(column) stays the same
template::adp_append_code "
- set __ats_group_rowcount 1
+ set __${tag_id}_group_rowcount 1
while { 1 } {
- set ${name}(groupnum) \$__ats_group_rowcount
+ set ${name}(groupnum) \$__${tag_id}_group_rowcount
"
template::adp_compile_chunk $chunk
# look ahead to the next value and break if it is different
# otherwise advance the cursor to the next row
template::adp_append_code "
- if { \$__i == \${$name:rowcount} } {
+ if { \$$i >= \${$name:rowcount} } {
break
}
- upvar 0 ${name}:\[expr \$__i + 1\] $name:next
+ upvar 0 ${name}:\[expr \$$i + 1\] $name:next
if { !\[string equal \${${name}:next($column)} \$${name}($column)\] } {
break
}
- incr __i
- upvar 0 $name:\$__i $name
- incr __ats_group_rowcount
+ incr $i
+ upvar 0 $name:\$$i $name
+ incr __${tag_id}_group_rowcount
}
"
}