diff options
Diffstat (limited to 'brep/mod-package-search.cxx')
-rw-r--r-- | brep/mod-package-search.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/brep/mod-package-search.cxx b/brep/mod-package-search.cxx index 7505e02..77a06b6 100644 --- a/brep/mod-package-search.cxx +++ b/brep/mod-package-search.cxx @@ -27,6 +27,18 @@ using namespace odb::core; using namespace brep::cli; +// While currently the user-defined copy constructor is not required (we don't +// need to deep copy nullptr's), it is a good idea to keep the placeholder +// ready for less trivial cases. +// +brep::package_search:: +package_search (const package_search& r) + : module (r), + options_ (r.initialized_ ? r.options_ : nullptr), + db_ (r.initialized_ ? r.db_ : nullptr) +{ +} + void brep::package_search:: init (scanner& s) { @@ -74,13 +86,8 @@ handle (request& rq, response& rs) MODULE_DIAG; - // The module options object is not changed after being created once per - // server process. - // - static const size_t res_page (options_->search_results ()); - static const dir_path& root (options_->root ()); - static const fragment& logo (options_->logo ()); - static const vector<page_menu>& menu (options_->menu ()); + const size_t res_page (options_->search_results ()); + const dir_path& root (options_->root ()); params::package_search params; @@ -124,7 +131,7 @@ handle (request& rq, response& rs) << SCRIPT << " " << ~SCRIPT << ~HEAD << BODY - << DIV_HEADER (root, logo, menu) + << DIV_HEADER (root, options_->logo (), options_->menu ()) << DIV(ID="content"); session sn; |