Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 15 Mar 2002 20:09:27 -0000 1.11 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 13 Jan 2003 22:55:55 -0000 1.12 @@ -260,10 +260,9 @@ } ad_proc -private apm_files_load { - { - -callback apm_dummy_callback - -force_reload:boolean - } files + {-force_reload_p 0} + {-callback apm_dummy_callback} + files } { Load the set of files into the currently running Tcl interpreter. Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 3 Jan 2003 10:58:57 -0000 1.20 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 13 Jan 2003 22:55:55 -0000 1.21 @@ -372,7 +372,7 @@ loading the files. During installation of OpenACS when the acs-lang package hasn't been installed yet this procedure won't do anything. That's not a problem since catalog files will be loaded upon next server - restart. + restart. Also caches the messages it loads. @author Peter Marklund } { @@ -389,7 +389,10 @@ # Load message catalog files foreach catalog_rel_path $message_catalog_files { lang::catalog::import_messages_from_file "[acs_package_root_dir $package_key]/${catalog_rel_path}" - } + } + + # Cache the messages + lang::message::cache -package_key $package_key } @@ -521,6 +524,10 @@ apm_callback_and_log $callback "[string totitle $package_key] instantiated as $package_key.
" } } + + # Load Tcl libraries and xql queries so that restart is not necessary + apm_load_package -force_reload_p 1 $package_key + return $version_id } Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 13 Jan 2003 19:53:12 -0000 1.30 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 13 Jan 2003 22:55:55 -0000 1.31 @@ -250,6 +250,7 @@ } ad_proc -private apm_load_libraries { + {-force_reload_p 0} {-packages {}} {-callback apm_dummy_callback} {-procs:boolean} @@ -317,10 +318,11 @@ # Release all outstanding database handles (since the file we're sourcing # might be using the ns_db database API as opposed to the new db_* API). db_release_unused_handles - apm_files_load -callback $callback $files + apm_files_load -force_reload_p $force_reload_p -callback $callback $files } ad_proc -public apm_load_package { + {-force_reload_p 0} {-load_tests_p 0} package_key } { @@ -329,22 +331,22 @@ @author Peter Marklund } { # Load *-procs.tcl and *-init.tcl files for enabled packages. - apm_load_libraries -packages $package_key -procs + apm_load_libraries -force_reload_p $force_reload_p -packages $package_key -procs # Load up the Queries (OpenACS, ben@mit.edu) apm_load_queries -packages $package_key # Load up the Automated Tests and associated Queries if necessary if {$load_tests_p} { - apm_load_libraries -packages $package_key -test_procs + apm_load_libraries -force_reload_p $force_reload_p -packages $package_key -test_procs apm_load_queries -packages $package_key -test_queries } apm_load_libraries -packages $package_key -init # Load up the Automated Tests initialisation scripts is necessary if {$load_tests_p} { - apm_load_libraries -packages $package_key -test_init + apm_load_libraries -force_reload_p $force_reload_p -packages $package_key -test_init } }