> I see that we are still using ns_formvalueput in some very old, but still
> used, code.
I noticed that OpenACS is still using "ns_formvalueput" in some legacy packages
within the OpenACS repository.
To help identify and manage outdated functions, I have created a small utility
script available on my GitHub:
https://github.com/gustafn/ns-modernizer/
How the Script Works:
The script recursively scans .tcl files in a directory tree, flags deprecated
commands, and optionally replaces some of the simpler ones automatically.
Here’s an example of its output:
-----
/usr/local/oacs-head/openacs-4/packages/dotlrn-ecommerce/tcl/dotlrn-ecommerce-init.tcl
use of deprecated command: 'ns_register_adptag'
... updating ./dotlrn-ecommerce/tcl/dotlrn-ecommerce-init.tcl (1 changes)
-----
/usr/local/oacs-head/openacs-4/packages/imsld/www/admin/imsld-export-xo.tcl
use of deprecated command: 'ns_tmpnam'
... updating ./imsld/www/admin/imsld-export-xo.tcl (1 changes)
The full README on GitHub provides additional details, including how to enable
the "change mode" for automatic replacements.
Next Steps for Deprecation
Based on feedback, I plan to mark some TBD functions as deprecated. However,
this does not imply their immediate removal; they will remain available for the
foreseeable future.
Additionally, I identified two more functions with unclear distinctions that
I’ve added to the TBD section:
ns_requestauthorize
ns_checkurl
Both functions are implemented using the same core method
(NsTclRequestAuthorizeObjCmd) but have different manual pages [1, 2]. My
current understanding is:
NaviServer allows authentication procs to be registered at the C level,
used primarily by the nsperm module.
These two noted Tcl functions allow manual invocation of this
functionality, which can be useful for testing or specific scenarios.
However, having two separate functions seems unnecessary.
Proposal
I suggest keeping "ns_requestauthorize" because its name better reflects its
purpose and marking "ns_checkurl" as deprecated. However, I propose preserving
the more concise documentation from "ns_checkurl" for clarity with the other
name.
Since OpenACS uses its own database-driven permission and authority management
system and does not rely on "nsperm", I lack direct experience with these
commands.
I welcome your insights, especially from anyone more familiar with nsperm or
related functionality.
all the best
-g
[1]
https://naviserver.sourceforge.io/n/naviserver/files/ns_requestauthorize.html
[2] https://naviserver.sourceforge.io/n/naviserver/files/ns_checkurl.html
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel