Index: openacs-4/packages/acs-content-repository/tcl/doc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/doc-procs.tcl,v diff -u -N -r1.7 -r1.7.10.1 --- openacs-4/packages/acs-content-repository/tcl/doc-procs.tcl 10 Jan 2007 21:22:03 -0000 1.7 +++ openacs-4/packages/acs-content-repository/tcl/doc-procs.tcl 16 Oct 2013 10:13:27 -0000 1.7.10.1 @@ -91,14 +91,14 @@ } # Get all the stuff that is not a tag (at the top) - if { [template::util::is_nil tags(header)] } { + if { ![info exists tags(header)] } { set doc_head "" regexp {[^@]*} $doc_block doc_head set tags(header) $doc_head } # Determine whether we have a procedure or a function - if { [template::util::is_nil tags(type)] } { + if { ![info exists tags(type)] } { if { [regexp -nocase -line {(procedure|function) .*$} $code_block match type] } { set tags(type) [string totitle $type] } else { @@ -125,21 +125,21 @@ parse_proc_header $doc_block $code_block $param_ref $tags_ref $code_ref # Get the proc name - if { [template::util::is_nil tags(name)] } { + if { ![info exists tags(name)] } { set tags(name) "${package_name}.${proc_name}" } # Modify the "see" tag to dislplay links if { [info exists tags(see)] } { - if { [template::util::is_nil opts(link_url_stub)] } { + if { ![info exists opts(link_url_stub)] } { # Just remove the links regsub -all {\{([^\}]*)\}} $tags(see) {\1} new_see set tags(see) $new_see } else { - if { [template::util::is_nil opts(link_package_name)] } { + if { ![info exists opts(link_package_name)] } { set opts(link_package_name) package_name } - if { [template::util::is_nil opts(link_proc_name)] } { + if { ![info exists opts(link_proc_name)] } { set opts(link_proc_name) proc_name } Index: openacs-4/packages/acs-content-repository/tcl/item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/item-procs.tcl,v diff -u -N -r1.28.4.1 -r1.28.4.2 --- openacs-4/packages/acs-content-repository/tcl/item-procs.tcl 30 Sep 2013 17:44:27 -0000 1.28.4.1 +++ openacs-4/packages/acs-content-repository/tcl/item-procs.tcl 16 Oct 2013 10:13:27 -0000 1.28.4.2 @@ -101,7 +101,7 @@ template::util::get_opts $args - if { [template::util::is_nil opts(item_id)] } { + if { ![info exists opts(item_id)] } { # Get the item id set item_id [::content::revision::item_id -revision_id $revision_id] @@ -282,7 +282,7 @@ # Use item mime type if template extension does not exist # Determine live revision, if none specified - if { [template::util::is_nil opts(revision_id)] } { + if { ![info exists opts(revision_id)] } { set revision_id [::content::item::get_live_revision -item_id $item_id] if { [template::util::is_nil revision_id] } { Index: openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl,v diff -u -N -r1.10.2.3 -r1.10.2.4 --- openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 13 Oct 2013 14:25:22 -0000 1.10.2.3 +++ openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 16 Oct 2013 10:13:27 -0000 1.10.2.4 @@ -267,7 +267,7 @@ upvar $revision_id_ref revision_id set error_msg "" - if { [template::util::is_nil opts(revision_id)] } { + if { ![info exists opts(revision_id)] } { set revision_id [::content::item::get_live_revision -item_id $item_id] } else { set revision_id $opts(revision_id) @@ -445,7 +445,7 @@ template::util::get_opts $args # Either auto-get the live revision or use the parameter - if { ![template::util::is_nil opts(revision_id)] } { + if { [info exists opts(revision_id)] } { set revision_id $opts(revision_id) } else { set revision_id [::content::item::get_live_revision -item_id $item_id] @@ -466,7 +466,7 @@ set file_stub [ns_normalizepath "$root_path/$::content::template_url"] # Set the passed-in variables - if { ![template::util::is_nil opts(html)] } { + if { [info exists opts(html)] } { set adp_args $opts(html) } else { set adp_args "" @@ -491,7 +491,7 @@ template::util::get_opts $args - if { [template::util::is_nil opts(revision_id)] } { + if { ![info exists opts(revision_id)] } { set revision_id [::content::item::get_live_revision -item_id $item_id] } else { set revision_id $opts(revision_id) @@ -679,7 +679,7 @@ variable revision_html # Process options - if { [template::util::is_nil opts(revision_id)] } { + if { ![info exists opts(revision_id)] } { set revision_id [::content::item::get_live_revision -item_id $item_id] } else { set revision_id $opts(revision_id) @@ -690,15 +690,15 @@ return "" } - if { [template::util::is_nil opts(no_merge)] } { + if { ![info exists opts(no_merge)] } { set merge_str "merge" } else { set merge_str "no_merge" } # Create a unique key set revision_key "$merge_str $revision_id" - if { ![template::util::is_nil opts(html)] } { + if { [info exists opts(html)] } { lappend revision_key $opts(html) } @@ -1035,7 +1035,7 @@ template::util::get_opts $args - if { [template::util::is_nil opts(root_path)] } { + if { ![info exists opts(root_path)] } { set root_path "" } else { set root_path $opts(root_path) @@ -1044,7 +1044,7 @@ db_transaction { # Get the item id if none specified - if { [template::util::is_nil opts(item_id)] } { + if { ![info exists opts(item_id)] } { set item_id [db_string get_one_revision ""] if { [template::util::is_nil item_id] } { Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -N -r1.45.2.6 -r1.45.2.7 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 13 Oct 2013 12:26:33 -0000 1.45.2.6 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 16 Oct 2013 10:16:16 -0000 1.45.2.7 @@ -499,19 +499,19 @@ lappend form_properties(edit_buttons) [list $form_properties(cancel_label) cancel] } - if { ![template::util::is_nil form_properties(has_submit)] + if { [info exists form_properties(has_submit)] && [template::util::is_true $form_properties(has_submit)] } { set form_properties(edit_buttons) {} } - if { ![template::util::is_nil form_properties(has_edit)] + if { [info exists form_properties(has_edit)] && [template::util::is_true $form_properties(has_edit)] } { set form_properties(display_buttons) {} } - if { ![template::util::is_nil form_properties(actions)] + if { [info exists form_properties(actions)] && [template::util::is_true $form_properties(actions)] } { set form_properties(display_buttons) $form_properties(actions) Index: openacs-4/packages/acs-templating/tcl/list-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/list-procs.tcl,v diff -u -N -r1.57.8.5 -r1.57.8.6 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 11 Oct 2013 08:47:27 -0000 1.57.8.5 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 16 Oct 2013 10:16:16 -0000 1.57.8.6 @@ -1555,7 +1555,7 @@ if { $filter_properties($property) ne "" } { # We've found a where_clause to include - if { [string match *_eval $property] } { + if { [string match "*_eval" $property] } { # It's an _eval, subst it now lappend list_properties(filter_where_clauses) \ [uplevel $list_properties(ulevel) $filter_properties($property)] Index: openacs-4/packages/acs-templating/tcl/tab-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tab-procs.tcl,v diff -u -N -r1.5.10.1 -r1.5.10.2 --- openacs-4/packages/acs-templating/tcl/tab-procs.tcl 5 Oct 2013 12:55:10 -0000 1.5.10.1 +++ openacs-4/packages/acs-templating/tcl/tab-procs.tcl 16 Oct 2013 10:16:17 -0000 1.5.10.2 @@ -79,7 +79,7 @@ set code [list template::form create $dlg_name] # Determine cookie name - if { [template::util::is_nil opts(cookie_name)] } { + if { ![info exists opts(cookie_name)] } { set cookie_name $dlg_name } else { set cookie_name $opts(cookie_name) @@ -94,7 +94,7 @@ upvar #$level $dlg_name:properties form_properties # Check parameters - if { ![template::util::is_nil opts(current_tab)] } { + if { [info exists opts(current_tab)] } { set current_tab $opts(current_tab) } else { # Check http @@ -140,8 +140,8 @@ # Set tab-specific params - if { [template::util::is_nil opts(base_url)] } { - if { ![template::util::is_nil properties(base_url)] } { + if { ![info exists opts(base_url)] } { + if { [info exists properties(base_url)] } { # use global base_url lappend code -base_url $properties(base_url) } else { @@ -163,7 +163,7 @@ upvar #$level $dlg_name:$name element # If this is the first tab being added, set it as current - if { [template::util::is_nil properties(current_tab)] } { + if { ![info exists properties(current_tab)] } { set_current_tab $dlg_name [lindex $properties(element_names) 0] 3 } Index: openacs-4/packages/acs-templating/tcl/table-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/table-procs.tcl,v diff -u -N -r1.7.10.1 -r1.7.10.2 --- openacs-4/packages/acs-templating/tcl/table-procs.tcl 13 Oct 2013 10:03:24 -0000 1.7.10.1 +++ openacs-4/packages/acs-templating/tcl/table-procs.tcl 16 Oct 2013 10:16:17 -0000 1.7.10.2 @@ -87,7 +87,7 @@ upvar $level "tablewidget:${name}" widget - if { [template::util::is_nil widget(column_def)] } { + if { ![info exists widget(column_def)] } { # Get the column definition based on the first row of the datasource upvar $level "tw_${name}_rows:rowcount" rowcount if { $rowcount < 1 } { @@ -113,23 +113,23 @@ upvar $level "tablewidget:${name}" widget # Get the rows - if { [template::util::is_nil widget(rows_data)] } { - if { [template::util::is_nil widget(query)] } { + if { ![info exists widget(rows_data)] } { + if { ![info exists widget(query)] } { error "No row datasource available for tablewidget $name" } # fixme - need to get a statement name here set sql_query $widget(query) # Append the order by clause, if any - if { ![template::util::is_nil widget(orderby)] } { + if { [info exists widget(orderby)] } { if { ![regexp -nocase "order +by" $sql_query match] } { append sql_query "\n order by" } append sql_query " $widget(orderby)" } - if { ![template::util::is_nil widget(column_def)] } { + if { [info exists widget(column_def)] } { # Convert the column def list to an array for extra speed upvar $level "tablewidget:${name}_column_def" column_arr array set column_arr $widget(column_def) @@ -164,7 +164,7 @@ } - if { ![template::util::is_nil widget(eval)] } { + if { [info exists widget(eval)] } { append eval_code $widget(eval) } uplevel $level " @@ -173,7 +173,7 @@ " # Get the column definition if it does not exist - if { [template::util::is_nil widget(column_def)] } { + if { ![info exists widget(column_def)] } { template::widget::table::default_column_def widget \ [expr {$level + 1}] } @@ -185,7 +185,7 @@ } # Process the rows datasource and get the columns - if { [template::util::is_nil widget(columns_data)] } { + if { ![info exists widget(columns_data)] } { upvar $level "tw_${name}_columns:rowcount" rowcount # Get the base url for the page