Index: openacs-4/packages/lars-blogger/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/index.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/lars-blogger/www/index.tcl 29 Sep 2003 11:03:31 -0000 1.11 +++ openacs-4/packages/lars-blogger/www/index.tcl 29 Sep 2003 19:41:23 -0000 1.12 @@ -18,25 +18,25 @@ set package_url [ad_conn package_url] set package_url_with_extras $package_url -set l_context_bar [list] +set context [list] set context_base_url [ad_conn package_url] if { ![empty_string_p $screen_name] } { # Show Screen Name in context bar append context_base_url /user/$screen_name - lappend l_context_bar [list $context_base_url $screen_name] + lappend context [list $context_base_url $screen_name] append package_url_with_extras user/$screen_name/ } if { ![empty_string_p $category_short_name] } { - if { ![db_0or1row get_category_from_short_name { *SQL* }] } { + if { ![db_0or1row get_category_from_short_name {}] } { ad_return_error "Category doesn't exist" "The specified category wasn't valid." return } # Show Category in context bar append context_base_url /category/$category_short_name - lappend l_context_bar [list $context_base_url $category_name] + lappend context [list $context_base_url $category_name] } else { set category_id "" } @@ -62,7 +62,7 @@ set display_bloggers_p 1 - db_multirow bloggers bloggers { *SQL* } + db_multirow bloggers bloggers {} set user_has_blog_p 0 multirow foreach bloggers { @@ -97,23 +97,23 @@ # Show Archive, Year and Month i context append context_base_url /archive - lappend l_context_bar [list $context_base_url Archive] + lappend context [list $context_base_url Archive] append context_base_url /$year - lappend l_context_bar [list $context_base_url $year] + lappend context [list $context_base_url $year] append context_base_url /$month - lappend l_context_bar [list $context_base_url $month] + lappend context [list $context_base_url $month] if { [exists_and_not_null day] } { set interval "day" - db_1row archive_date_month_day { *SQL* } + db_1row archive_date_month_day {} # Day in context append context_base_url /$day - lappend l_context_bar [list $context_base_url $day] + lappend context [list $context_base_url $day] } else { set interval "month" - db_1row archive_date_month { *SQL* } + db_1row archive_date_month {} } append page_title " Archive" @@ -127,13 +127,13 @@ set archive_date "" } -db_multirow categories categories { *SQL* } +db_multirow categories categories {} # Cut the URL off the last item in the context bar -set l_context_bar [lreplace $l_context_bar end end [lindex [lindex $l_context_bar end] end]] -eval "set context_bar \[ad_context_bar $l_context_bar\]" +if { [llength $context] > 0 } { + set context [lreplace $context end end [lindex [lindex $context end] end]] +} # Load the StylesheetURL into $stylesheet_url regsub \% [lars_blog_stylesheet_url] $package_url stylesheet_url -ad_return_template