Index: openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info,v diff -u -r1.45.2.8 -r1.45.2.9 --- openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 16 Sep 2021 08:27:06 -0000 1.45.2.8 +++ openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 22 Aug 2022 17:06:39 -0000 1.45.2.9 @@ -9,7 +9,7 @@ f t - + Don Baccus Bootstraps an OpenACS installation. 2021-09-15 @@ -18,7 +18,7 @@ GPL 3 - + Index: openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl,v diff -u -r1.66.2.26 -r1.66.2.27 --- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 13 Jul 2022 07:53:12 -0000 1.66.2.26 +++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 22 Aug 2022 17:06:39 -0000 1.66.2.27 @@ -555,7 +555,7 @@ set log_code "" if { $warn_p } { - set log_code "ns_log Notice \"Deprecated proc $proc_name used:\\n\[ad_get_tcl_call_stack\]\"\n" + set log_code [list ad_log_deprecated proc $proc_name] } if { $callback ne "" && $impl ne "" } { @@ -1039,6 +1039,37 @@ } +ad_proc ad_log_deprecated {what oldCmd {newCmd ""}} { + + Provide a standardized interface for reporting deprecated ad_procs + or other artifacts. In some situations, the flag "-deprecated" in + the proc is not sufficient. When "newCmd" is not specified, this + function tries to get the replacement command from the @see + specification of the documentation. + + @param what type of artifact being used (e.g. "proc" or "class") + @param oldCmd the name of the deprecated command + @param newCmd replacement command, when specified + +} { + set msg "*** $what $oldCmd is deprecated." + if {$newCmd eq "" && $what eq "proc"} { + # + # If no replacement command is provided, use whatever is + # specified in the @see property of the definition. + # + if {[nsv_get api_proc_doc template::util::date::now_min_interval_plus_hour dict] + && [dict exists $dict see] + } { + set newCmd [dict get $dict see] + } + } + if {$newCmd ne ""} { + append msg " Use '$newCmd' instead." + } + ns_log warning "$msg\n[uplevel ad_get_tcl_call_stack]" +} + ad_proc ad_library { doc_string } { Index: openacs-4/packages/xotcl-core/xotcl-core.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v diff -u -r1.106.2.43 -r1.106.2.44 --- openacs-4/packages/xotcl-core/xotcl-core.info 20 Aug 2022 15:43:59 -0000 1.106.2.43 +++ openacs-4/packages/xotcl-core/xotcl-core.info 22 Aug 2022 17:06:40 -0000 1.106.2.44 @@ -10,7 +10,7 @@ t xotcl - + Gustaf Neumann XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes) 2021-09-16 @@ -42,8 +42,9 @@ BSD-Style 2 - + + Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.148.2.55 -r1.148.2.56 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 30 Mar 2022 13:45:20 -0000 1.148.2.55 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 22 Aug 2022 17:06:40 -0000 1.148.2.56 @@ -578,10 +578,10 @@ } proc ::xo::db::pg_0or1row {sql} { - ns_log notice "::xo::db::pg_0or1row deprecated" + ad_log_deprecated proc ::xo::db::pg_0or1row "ns_pg_bind 0or1row" ::db_with_handle h { return [uplevel [list ns_pg_bind 0or1row $h {*}$bindOpt $sql]] - } + } } # Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -r1.41.2.50 -r1.41.2.51 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 15 Mar 2022 12:01:53 -0000 1.41.2.50 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 22 Aug 2022 17:06:40 -0000 1.41.2.51 @@ -118,8 +118,8 @@ set fn $::acs::rootdir/packages/$package_key/$location/prototypes/$name.page if {[file exists $fn]} { if {$location eq "www"} { - ns_log warning "deprecated location: you should move prototype page" \ - "'$fn' to /packages/$package_key/resources/prototypes/" + ad_log_deprecated "location of prototype page" $fn \ + packages/$package_key/resources/prototypes/ } break } Index: openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl,v diff -u -r1.24.2.19 -r1.24.2.20 --- openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl 12 Apr 2022 09:36:39 -0000 1.24.2.19 +++ openacs-4/packages/xotcl-core/tcl/06-param-procs.tcl 22 Aug 2022 17:06:40 -0000 1.24.2.20 @@ -291,7 +291,7 @@ [::xo::cc package_id] : [ns_conn isconnected] ? [ad_conn package_id] : $::acs::kernel_id}] } - ns_log notice "deprecated xo::parameter get -parameter $parameter called (replaced by ::parameter::get)" + ad_log_deprecated proc "xo::parameter get -parameter $parameter" parameter::get return [::parameter::get -parameter $parameter -package_id $package_id \ {*}[expr {[info exists default] ? [list -default $default] : ""}]] @@ -325,8 +325,8 @@ [::xo::cc package_id] : [ns_conn isconnected] ? [ad_conn package_id] : $::acs::kernel_id}] } - ns_log notice "deprecated xo::parameter set_value -parameter $parameter called " \ - "(replaced by ::parameter::set_value)" + + ad_log_deprecated proc "xo::parameter set_value -parameter $parameter" parameter::set_value return [::parameter::set_value -package_id $package_id -parameter $parameter -value $value] set parameter_obj [:get_parameter_object -parameter_name $parameter -package_id $package_id] Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.180.2.105 -r1.180.2.106 --- openacs-4/packages/xowiki/xowiki.info 20 Aug 2022 15:43:59 -0000 1.180.2.105 +++ openacs-4/packages/xowiki/xowiki.info 22 Aug 2022 17:06:40 -0000 1.180.2.106 @@ -10,7 +10,7 @@ t xowiki - + Gustaf Neumann A xotcl-based enterprise wiki system with multiple object types 2021-09-15 @@ -55,8 +55,8 @@ BSD-Style 2 - - + + Index: openacs-4/packages/xowiki/lib/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/view.tcl,v diff -u -r1.14.2.5 -r1.14.2.6 --- openacs-4/packages/xowiki/lib/view.tcl 2 Sep 2021 13:24:28 -0000 1.14.2.5 +++ openacs-4/packages/xowiki/lib/view.tcl 22 Aug 2022 17:06:40 -0000 1.14.2.6 @@ -27,12 +27,14 @@ # # TODO: This branch should be removed after the release of OpenACS 5.10 # - ns_log warning "deprecated call of xowiki/lib/view.tcl: use 'url' as parameter instead" - - set page [::xowiki::Package instantiate_page_from_id \ - -item_id $item_id \ - -parameter $parameter] - ::xo::cc export_vars + #ns_log warning "deprecated call of xowiki/lib/view.tcl: use 'url' as parameter instead" + # + #set page [::xowiki::Package instantiate_page_from_id \ + # -item_id $item_id \ + # -parameter $parameter] + # ::xo::cc export_vars + + ad_log_deprecated "view.tcl" "item_id $item_id" "-url $url" } template::head::add_css \ Index: openacs-4/packages/xowiki/tcl/menu-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/menu-procs.tcl,v diff -u -r1.19.2.19 -r1.19.2.20 --- openacs-4/packages/xowiki/tcl/menu-procs.tcl 20 Aug 2022 15:44:00 -0000 1.19.2.19 +++ openacs-4/packages/xowiki/tcl/menu-procs.tcl 22 Aug 2022 17:06:40 -0000 1.19.2.20 @@ -497,7 +497,7 @@ entry { # sample entry: entry -name New.YouTubeLink -label YouTube -form en:YouTube.form if {$kind eq "form_link"} { - ad_log warning "$me, name 'form_link' is deprecated, use 'entry' instead" + ad_log_deprecated menu-entry $link entry } if {[dict exists $properties -link]} { set link [dict get $properties -link] Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.332.2.121 -r1.332.2.122 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 21 Aug 2022 16:46:07 -0000 1.332.2.121 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 22 Aug 2022 17:06:40 -0000 1.332.2.122 @@ -1802,8 +1802,7 @@ #ns_log notice "template is <$result>" if {$result ne ""} { if {$location eq "www"} { - ns_log warning "deprecated location: you should move template" \ - "'$tmpl' to /packages/$package_key/resources/templates/" + ad_log_deprecated "template" $tmpl /packages/$package_key/resources/templates/ } return $result } Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.542.2.162 -r1.542.2.163 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 13 Jul 2022 11:00:12 -0000 1.542.2.162 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 22 Aug 2022 17:06:40 -0000 1.542.2.163 @@ -1311,12 +1311,15 @@ } Page proc import {-user_id -package_id -folder_id {-replace 0} -objects} { - :log "DEPRECATED" - if {![info exists package_id]} {set package_id [::xo::cc package_id]} + ad_log_deprecated "::xowiki::Page proc" "import" "::$package_id import ..." + + if {![info exists package_id]} { + set package_id [::xo::cc package_id] + } set cmd [list ::$package_id import -replace $replace] - if {[info exists user_id]} {lappend cmd -user_id $user_id} - if {[info exists objects]} {lappend cmd -objects $objects} + if {[info exists user_id]} {lappend cmd -user_id $user_id} + if {[info exists objects]} {lappend cmd -objects $objects} {*}$cmd } @@ -4128,7 +4131,7 @@ # empty. In these cases, call child-resources manually. # if {$html eq "" && [:is_folder_page]} { - ns_log warning "render_content: [:item_id] '${:name}' is a folder page without a content (deprecated)" + ad_log_deprecated "folder page without a content" "[:item_id] '${:name}'" set html [:include child-resources] } Index: openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl,v diff -u -r1.57.2.32 -r1.57.2.33 --- openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 19 Apr 2022 12:29:26 -0000 1.57.2.32 +++ openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 22 Aug 2022 17:06:40 -0000 1.57.2.33 @@ -527,17 +527,17 @@ } proc read_file {fn} { - ns_log warning "::xowiki::write_file deprecated. Use ::xo::write_file instead" + ad_log_deprecated proc xowiki::read_file xo::read_file return [::xo::read_file $fn] } proc write_file {fn content} { - ns_log warning "::xowiki::write_file deprecated. Use ::xo::write_file instead" + ad_log_deprecated proc xowiki::write_file xo::write_file return [::xo::write_file $fn $content] } nsf::proc ::xowiki::get_raw_request_body {-as_string:switch -as_file:switch} { - ns_log warning "::xowiki::get_raw_request_body deprecated. Use ::xo::get_raw_request_body instead" + ad_log_deprecated proc xowiki::get_raw_request_body xo::get_raw_request_body return [::xo::get_raw_request_body -as_string $as_string_p -as_file $as_file_p] }