Index: openacs-4/packages/theme-selva/tcl/selva-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/tcl/selva-procs.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/theme-selva/tcl/selva-procs.tcl 4 Jan 2007 08:59:32 -0000 1.13
+++ openacs-4/packages/theme-selva/tcl/selva-procs.tcl 28 Jun 2015 13:01:05 -0000 1.14
@@ -101,7 +101,7 @@
incr which_tab
}
- if { [exists_and_not_null community_id] } {
+ if { ([info exists community_id] && $community_id ne "") } {
set type [dotlrn_community::get_community_type_from_community_id $community_id]
if { $type eq "dotlrn_community" || $type eq "dotlrn_pers_community" } {
set community_message_key "#dotlrn.subcommunities_pretty_name#"
@@ -146,7 +146,7 @@
ns_log Debug "NAME:: $name"
if { $which_tab == $which_tab_selected } {
append navbar "\n
"
- #if {$picture != "null" } { append navbar "" }
+ #if {$picture ne "null" } { append navbar "" }
append navbar "[lang::util::localize $name]"
} else {
append navbar "\n[lang::util::localize $name]"
@@ -251,7 +251,7 @@
set subnavbar "\n"
db_foreach list_page_nums_select {} {
- if {[string equal $page_num $sort_key]} {
+ if {$page_num eq $sort_key} {
append subnavbar "\n- $pretty_name
"
} else {
append subnavbar "\n- $pretty_name
"
Index: openacs-4/packages/theme-selva/www/communities.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/communities.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/theme-selva/www/communities.tcl 6 Dec 2005 21:26:05 -0000 1.2
+++ openacs-4/packages/theme-selva/www/communities.tcl 28 Jun 2015 13:01:05 -0000 1.3
@@ -31,10 +31,10 @@
referer:onevalue
}
-set portal_id [dotlrn::get_portal_id -user_id [ad_get_user_id]]
+set portal_id [dotlrn::get_portal_id -user_id [ad_conn user_id]]
set dotlrn_url [dotlrn::get_url]
# Make sure user is logged in
-set user_id [ad_maybe_redirect_for_registration]
+set user_id [auth::require_login]
set portlet_title [_ theme-selva.Communities]
set title [parameter::get -localize -parameter admin_page_name]
set admin_p [dotlrn::admin_p]
Index: openacs-4/packages/theme-selva/www/selva-blank-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/selva-blank-master.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/theme-selva/www/selva-blank-master.tcl 18 Sep 2005 12:27:08 -0000 1.3
+++ openacs-4/packages/theme-selva/www/selva-blank-master.tcl 28 Jun 2015 13:01:06 -0000 1.4
@@ -14,7 +14,7 @@
set doc_type {}
}
-if { [template::util::is_nil title] } {
+if { ![info exists title] } {
set title [ad_conn instance_name]
}
@@ -53,7 +53,7 @@
# Additional Body Attributes
-if {[exists_and_not_null body_attributes]} {
+if {([info exists body_attributes] && $body_attributes ne "")} {
foreach body_attribute $body_attributes {
multirow append attribute [lindex $body_attribute 0] [lindex $body_attribute 1]
}
@@ -82,7 +82,7 @@
# Toggle translator mode link
set acs_lang_url [apm_package_url_from_key "acs-lang"]
-if { [empty_string_p $acs_lang_url] } {
+if { $acs_lang_url eq "" } {
set lang_admin_p 0
} else {
set lang_admin_p [permission::permission_p \
Index: openacs-4/packages/theme-selva/www/selva-lrn-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/selva-lrn-master.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/theme-selva/www/selva-lrn-master.tcl 4 Jan 2008 18:47:18 -0000 1.9
+++ openacs-4/packages/theme-selva/www/selva-lrn-master.tcl 28 Jun 2015 13:01:06 -0000 1.10
@@ -1,7 +1,7 @@
# $Id$
#append url [ad_url] [ad_return_url]
-set user_id [ad_get_user_id]
+set user_id [ad_conn user_id]
set community_id [dotlrn_community::get_community_id]
set dotlrn_url [dotlrn::get_url]
@@ -31,21 +31,21 @@
set portal_id [dotlrn::get_portal_id -user_id $user_id]
}
-if {![empty_string_p $community_id]} {
+if {$community_id ne ""} {
set have_comm_id_p 1
} else {
set have_comm_id_p 0
}
-if {[exists_and_not_null portal_id]} {
+if {([info exists portal_id] && $portal_id ne "")} {
set have_portal_id_p 1
} else {
set have_portal_id_p 0
}
# navbar vars
set show_navbar_p 1
-if {[exists_and_not_null no_navbar_p] && $no_navbar_p} {
+if {([info exists no_navbar_p] && $no_navbar_p ne "") && $no_navbar_p} {
set show_navbar_p 0
}
@@ -63,7 +63,7 @@
set link_control_panel 1
}
-if { ![string equal [ad_conn package_key] [dotlrn::package_key]] } {
+if { [ad_conn package_key] ne [dotlrn::package_key] } {
# Peter M: We are in a package (an application) that may or may not be under a dotlrn instance
# (i.e. in a news instance of a class)
# and we want all links in the navbar to be active so the user can return easily to the class homepage
@@ -81,7 +81,7 @@
set link [dotlrn_community::get_community_url $community_id]
set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id -community_id $community_id]
- if {[empty_string_p $portal_id] && !$admin_p } {
+ if {$portal_id eq "" && !$admin_p } {
# not a member yet
set portal_id [dotlrn_community::get_non_member_portal_id -community_id $community_id]
}
@@ -124,14 +124,14 @@
}
# Set up some basic stuff
-set user_id [ad_get_user_id]
+set user_id [ad_conn user_id]
if { [ad_conn untrusted_user_id] == 0 } {
set user_name {}
} else {
set user_name [acs_user::get_element -user_id [ad_conn untrusted_user_id] -element name]
}
-if {![exists_and_not_null title]} {
+if {(![info exists title] || $title eq "")} {
set title [ad_system_name]
}
@@ -145,7 +145,7 @@
set control_panel_text [_ "dotlrn.control_panel"]
-if {![empty_string_p $community_id]} {
+if {$community_id ne ""} {
# in a community or just under one in a mounted package like /calendar
set comm_type [dotlrn_community::get_community_type_from_community_id $community_id]
set control_panel_text [_ acs-subsite.Admin]
@@ -155,7 +155,7 @@
set comm_type [dotlrn_community::get_community_type_from_community_id [dotlrn_community::get_parent_id -community_id $community_id]]
}
- if {$comm_type == "dotlrn_club"} {
+ if {$comm_type eq "dotlrn_club"} {
#community colors
set scope_name "comm"
set scope_main_color "#CC6633"
@@ -197,7 +197,7 @@
-attribute_name header_font
]
- if {![empty_string_p $community_header_font]} {
+ if {$community_header_font ne ""} {
set header_font "$community_header_font,$header_font"
}
@@ -218,7 +218,7 @@
-attribute_name header_logo_item_id
]
- if {![empty_string_p $header_logo_item_id]} {
+ if {$header_logo_item_id ne ""} {
# Need filename
set header_img_url "[dotlrn_community::get_community_url $community_id]/file-storage/download/?version_id=$header_logo_item_id"
@@ -230,13 +230,13 @@
-attribute_name header_logo_alt_text
]
- if {![empty_string_p $header_logo_alt_text]} {
+ if {$header_logo_alt_text ne ""} {
set header_img_alt_text $header_logo_alt_text
}
set text [dotlrn::user_context_bar -community_id $community_id]
- if { [string equal [ad_conn package_key] [dotlrn::package_key]] } {
+ if {[ad_conn package_key] eq [dotlrn::package_key]} {
set text ""
}
@@ -263,7 +263,7 @@
set link_control_panel 0
- if {[exists_and_not_null community_id]} {
+ if {([info exists community_id] && $community_id ne "")} {
set youarehere "[dotlrn_community::get_community_name $community_id]"
} else {
set youarehere "[_ theme-selva.MySpace]"
@@ -308,7 +308,7 @@
set ds_link {}
}
-set change_locale_url "/acs-lang/?[export_vars { { package_id "[ad_conn package_id]" } }]"
+set change_locale_url [export_vars -base /acs-lang { { package_id "[ad_conn package_id]" } }]
# Hack for title and context bar outside of dotlrn
Index: openacs-4/packages/theme-selva/www/selva-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/selva-master.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/theme-selva/www/selva-master.tcl 4 Jan 2008 18:47:18 -0000 1.13
+++ openacs-4/packages/theme-selva/www/selva-master.tcl 28 Jun 2015 13:01:06 -0000 1.14
@@ -5,15 +5,15 @@
# this should also allow for pages to call the dotlrn template (i.e. tabs) off
# maybe by passing a propery in a page
-if {![exists_and_not_null displayed_object_id]} {
+if {(![info exists displayed_object_id] || $displayed_object_id eq "")} {
set displayed_object_id ""
}
-if {[exists_and_not_null title]} {
+if {([info exists title] && $title ne "")} {
set doc(title) $title
}
-if {![exists_and_not_null context]} {
+if {(![info exists context] || $context eq "")} {
set context ""
}
Index: openacs-4/packages/theme-selva/www/selva-site-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/selva-site-master.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/theme-selva/www/selva-site-master.tcl 4 Jan 2008 18:47:18 -0000 1.8
+++ openacs-4/packages/theme-selva/www/selva-site-master.tcl 28 Jun 2015 13:01:06 -0000 1.9
@@ -19,9 +19,9 @@
# class parent. A top-level community that's not a class or club will keep the
# top-level Selva colors.
-if { [string match /dotlrn/clubs/* [ad_conn url]] } {
+if { [string match "/dotlrn/clubs/*" [ad_conn url]] } {
set css_url [parameter::get_from_package_key -package_key "theme-selva" -parameter "communityCssUrl" -default "/resources/theme-selva/Selva/turquoise/Selva.css"]
-} elseif { [string match /dotlrn/classes/* [ad_conn url]] } {
+} elseif { [string match "/dotlrn/classes/*" [ad_conn url]] } {
set css_url [parameter::get_from_package_key -package_key "theme-selva" -parameter "courseCssUrl" -default "/resources/theme-selva/Selva/green/Selva.css"]
} else {
set css_url [parameter::get_from_package_key -package_key "theme-selva" -parameter "cssUrl" -default "/resources/theme-selva/Selva/default/Selva.css"]
@@ -30,7 +30,7 @@
# Get system name
set system_name [ad_system_name]
set system_url [ad_url]
-if { [string equal [ad_conn url] "/"] } {
+if {[ad_conn url] eq "/"} {
set system_url ""
}
@@ -42,7 +42,7 @@
set user_name [person::name -person_id $untrusted_user_id]
set pvt_home_url [ad_pvt_home]
set pvt_home_name [ad_pvt_home_name]
- if [empty_string_p $pvt_home_name] {
+ if {$pvt_home_name eq ""} {
set pvt_home_name [_ acs-subsite.Your_Account]
}
set logout_url [ad_get_logout_url]
@@ -85,12 +85,11 @@
# change locale
set num_of_locales [llength [lang::system::get_locales]]
if { $num_of_locales > 1 } {
- set change_locale_url \
- "/acs-lang/?[export_vars { { package_id "[ad_conn package_id]" } }]"
+ set change_locale_url [export_vars -base /acs-lang { { package_id "[ad_conn package_id]" } }]
}
# Curriculum bar
-if { [empty_string_p [site_node::get_package_url -package_key curriculum]] } {
+if { [site_node::get_package_url -package_key curriculum] eq "" } {
set curriculum_bar_p 0
} else {
set curriculum_bar_p 1
Index: openacs-4/packages/theme-selva/www/doc/selva-blank-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/doc/selva-blank-master.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/theme-selva/www/doc/selva-blank-master.tcl 18 Sep 2005 11:49:37 -0000 1.3
+++ openacs-4/packages/theme-selva/www/doc/selva-blank-master.tcl 28 Jun 2015 13:01:06 -0000 1.4
@@ -14,7 +14,7 @@
set doc_type {}
}
-if { [template::util::is_nil title] } {
+if { ![info exists title] } {
set title [ad_conn instance_name]
}
@@ -53,7 +53,7 @@
# Additional Body Attributes
-if {[exists_and_not_null body_attributes]} {
+if {([info exists body_attributes] && $body_attributes ne "")} {
foreach body_attribute $body_attributes {
multirow append attribute [lindex $body_attribute 0] [lindex $body_attribute 1]
}
@@ -92,7 +92,7 @@
# Toggle translator mode link
set acs_lang_url [apm_package_url_from_key "acs-lang"]
-if { [empty_string_p $acs_lang_url] } {
+if { $acs_lang_url eq "" } {
set lang_admin_p 0
} else {
set lang_admin_p [permission::permission_p \
Index: openacs-4/packages/theme-selva/www/doc/selva-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/doc/selva-master.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/theme-selva/www/doc/selva-master.tcl 18 Sep 2005 11:49:37 -0000 1.3
+++ openacs-4/packages/theme-selva/www/doc/selva-master.tcl 28 Jun 2015 13:01:06 -0000 1.4
@@ -42,7 +42,7 @@
#
# $Id$
-set user_id [ad_get_user_id]
+set user_id [ad_conn user_id]
set community_id [dotlrn_community::get_community_id]
set dotlrn_url [dotlrn::get_url]
@@ -69,7 +69,7 @@
set td_align "align=\"center\" valign=\"top\""
-if {![empty_string_p $community_id]} {
+if {$community_id ne ""} {
set have_comm_id_p 1
} else {
set have_comm_id_p 0
@@ -79,7 +79,7 @@
# navbar vars
set show_navbar_p 1
-if {[exists_and_not_null no_navbar_p] && $no_navbar_p} {
+if {([info exists no_navbar_p] && $no_navbar_p ne "") && $no_navbar_p} {
set show_navbar_p 0
}
@@ -97,7 +97,7 @@
set link_control_panel 1
}
-if { ![string equal [ad_conn package_key] [dotlrn::package_key]] } {
+if { [ad_conn package_key] ne [dotlrn::package_key] } {
# Peter M: We are in a package (an application) that may or may not be under a dotlrn instance
# (i.e. in a news instance of a class)
# and we want all links in the navbar to be active so the user can return easily to the class homepage
@@ -150,14 +150,14 @@
}
# Set up some basic stuff
-set user_id [ad_get_user_id]
+set user_id [ad_conn user_id]
if { [ad_conn untrusted_user_id] == 0 } {
set user_name {}
} else {
set user_name [acs_user::get_element -user_id [ad_conn untrusted_user_id] -element name]
}
-if {![exists_and_not_null title]} {
+if {(![info exists title] || $title eq "")} {
set title [ad_system_name]
}
@@ -171,7 +171,7 @@
set control_panel_text [_ "dotlrn.control_panel"]
-if {![empty_string_p $community_id]} {
+if {$community_id ne ""} {
# in a community or just under one in a mounted package like /calendar
set comm_type [dotlrn_community::get_community_type_from_community_id $community_id]
set control_panel_text [_ acs-subsite.Admin]
@@ -181,7 +181,7 @@
set comm_type [dotlrn_community::get_community_type_from_community_id [dotlrn_community::get_parent_id -community_id $community_id]]
}
- if {$comm_type == "dotlrn_club"} {
+ if {$comm_type eq "dotlrn_club"} {
#community colors
set scope_name "comm"
set scope_main_color "#CC6633"
@@ -223,7 +223,7 @@
-attribute_name header_font
]
- if {![empty_string_p $community_header_font]} {
+ if {$community_header_font ne ""} {
set header_font "$community_header_font,$header_font"
}
@@ -244,7 +244,7 @@
-attribute_name header_logo_item_id
]
- if {![empty_string_p $header_logo_item_id]} {
+ if {$header_logo_item_id ne ""} {
# Need filename
set header_img_url "[dotlrn_community::get_community_url $community_id]/file-storage/download/?version_id=$header_logo_item_id"
@@ -256,13 +256,13 @@
-attribute_name header_logo_alt_text
]
- if {![empty_string_p $header_logo_alt_text]} {
+ if {$header_logo_alt_text ne ""} {
set header_img_alt_text $header_logo_alt_text
}
set text [dotlrn::user_context_bar -community_id $community_id]
- if { [string equal [ad_conn package_key] [dotlrn::package_key]] } {
+ if {[ad_conn package_key] eq [dotlrn::package_key]} {
set text ""
}
@@ -352,7 +352,7 @@
set ds_link {}
}
-set change_locale_url "/acs-lang/?[export_vars { { package_id "[ad_conn package_id]" } }]"
+set change_locale_url [export_vars -base /acs-lang { { package_id "[ad_conn package_id]" } }]
# Hack for title and context bar outside of dotlrn
Index: openacs-4/packages/theme-selva/www/doc/selva-site-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/doc/selva-site-master.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/theme-selva/www/doc/selva-site-master.tcl 26 Jul 2005 14:28:30 -0000 1.1
+++ openacs-4/packages/theme-selva/www/doc/selva-site-master.tcl 28 Jun 2015 13:01:06 -0000 1.2
@@ -22,7 +22,7 @@
# Get system name
set system_name [ad_system_name]
set system_url [ad_url]
-if { [string equal [ad_conn url] "/"] } {
+if {[ad_conn url] eq "/"} {
set system_url ""
}
@@ -34,7 +34,7 @@
set user_name [person::name -person_id $untrusted_user_id]
set pvt_home_url [ad_pvt_home]
set pvt_home_name [ad_pvt_home_name]
- if [empty_string_p $pvt_home_name] {
+ if {$pvt_home_name eq ""} {
set pvt_home_name [_ acs-subsite.Your_Account]
}
set logout_url [ad_get_logout_url]
@@ -77,12 +77,11 @@
# change locale
set num_of_locales [llength [lang::system::get_locales]]
if { $num_of_locales > 1 } {
- set change_locale_url \
- "/acs-lang/?[export_vars { { package_id "[ad_conn package_id]" } }]"
+ set change_locale_url [export_vars -base /acs-lang { { package_id "[ad_conn package_id]" } }]
}
# Curriculum bar
-if { [empty_string_p [site_node::get_package_url -package_key curriculum]] } {
+if { [site_node::get_package_url -package_key curriculum] eq "" } {
set curriculum_bar_p 0
} else {
set curriculum_bar_p 1