From: b Date: Tue, 26 Mar 2024 19:25:58 +0000 (+0000) Subject: move merge_settings to common library X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=482aab046a60b0293d516b9d618b0fe5eab3f150;p=ott%2Fbsta move merge_settings to common library --- diff --git a/2words.1.pl b/2words.1.pl index 5f0f941..a1894c6 100644 --- a/2words.1.pl +++ b/2words.1.pl @@ -28,6 +28,7 @@ use Encode ('encode', 'decode'); ###PERL_LIB: use lib /botm/lib/bsta use botm_common ( 'HTTP_STATUS', + 'merge_settings', 'fail_method', 'fail_content_type', 'http_header_status', 'http_header_allow', 'merge_url', @@ -44,7 +45,6 @@ use bsta_lib ( 'print_html_body_start', 'print_html_body_end', 'write_index', 'get_remote_addr', 'get_password', - 'merge_settings', 'ong', 'read_story', 'write_story', 'read_settings', 'read_state' diff --git a/attach.1.pl b/attach.1.pl index 4adfce4..23c003c 100644 --- a/attach.1.pl +++ b/attach.1.pl @@ -28,6 +28,7 @@ use Encode ('encode', 'decode'); ###PERL_LIB: use lib /botm/lib/bsta use botm_common ( 'HTTP_STATUS', + 'merge_settings', 'fail_method', 'fail_content_type', 'fail_attachment', 'fail_500', 'redirect', 'read_header_env', @@ -39,7 +40,6 @@ use botm_common ( ); use bsta_lib ( 'STATE', - 'merge_settings', 'get_id', 'get_password', 'read_settings', 'read_state', 'read_attachment' ); diff --git a/bbcode.1.pl b/bbcode.1.pl index 089d557..04a0ff4 100644 --- a/bbcode.1.pl +++ b/bbcode.1.pl @@ -32,12 +32,12 @@ use botm_common ( 'read_header_env', 'url_query_decode', 'merge_url', - 'http_header_status' + 'http_header_status', + 'merge_settings' ); use bsta_lib ( 'STATE', 'get_frame', 'get_password', - 'merge_settings', 'eval_bb', 'bb_to_bbcode', 'get_frame_file', 'read_frame_data', 'read_default', 'read_noaccess', diff --git a/botm-common b/botm-common index 599a7e9..111fb5f 160000 --- a/botm-common +++ b/botm-common @@ -1 +1 @@ -Subproject commit 599a7e9a41f68c89f64cd982db730167d2acf28e +Subproject commit 111fb5f38624401ac7f332dd8bf7fa65e7bf5b23 diff --git a/bsta_lib.1.pm b/bsta_lib.1.pm index 781ee0e..90e6e44 100644 --- a/bsta_lib.1.pm +++ b/bsta_lib.1.pm @@ -37,7 +37,6 @@ our @EXPORT = (); our @EXPORT_OK = ( 'STATE', 'TEXT_MODE', 'INTF_STATE', 'CHAT_STATE', 'CHAT_ACTION', 'get_remote_addr', 'get_id', 'get_frame', 'get_password', - 'merge_settings', 'print_html_start', 'print_html_end', 'print_html_head_start', 'print_html_head_end', 'print_html_body_start', 'print_html_body_end', @@ -67,7 +66,8 @@ use botm_common ( 'join_path', 'copy_encoded', 'open_encoded', '_x_encoded', 'http_header_line', 'http_status', - 'http_header_status', 'http_header_allow', 'http_header_location' + 'http_header_status', 'http_header_allow', 'http_header_location', + 'merge_settings' ); ###PERL_PATH_SEPARATOR: PATH_SEPARATOR = / @@ -281,18 +281,6 @@ sub get_password { } -sub merge_settings { - my %final_settings; - - foreach my $settings (@_) { - foreach my $ind (keys %$settings) { - $final_settings{$ind} = $settings->{$ind}; - } - } - return %final_settings; -} - - # BB code stuff # different & simpler implementation than in post library # to consider: diff --git a/chat.1.pl b/chat.1.pl index 73c7ce9..325ca29 100644 --- a/chat.1.pl +++ b/chat.1.pl @@ -35,7 +35,8 @@ use botm_common ( 'merge_url', 'html_entity_encode_dec', 'open_encoded', - 'http_header_status' + 'http_header_status', + 'merge_settings' ); use bsta_lib ( 'STATE', 'CHAT_STATE', 'CHAT_ACTION', @@ -43,7 +44,6 @@ use bsta_lib ( 'print_html_start', 'print_html_end', 'print_html_head_start', 'print_html_head_end', 'print_html_body_start', 'print_html_body_end', - 'merge_settings', 'read_chat', 'write_chat', 'read_coincidence', 'read_settings', 'read_state' ); diff --git a/frame.1.pl b/frame.1.pl index ea9db03..60595ae 100644 --- a/frame.1.pl +++ b/frame.1.pl @@ -34,12 +34,12 @@ use botm_common ( 'join_path', 'merge_url', 'open_encoded', 'stat_encoded', - 'http_header_line', 'http_header_content_length', 'http_header_content_disposition' + 'http_header_line', 'http_header_content_length', 'http_header_content_disposition', + 'merge_settings' ); use bsta_lib ( 'STATE', 'INTF_STATE', 'get_frame', 'get_password', - 'merge_settings', 'get_frame_file', 'read_frame_data', 'read_default', 'read_noaccess', 'read_settings', 'read_state', 'read_story' diff --git a/goto.1.pl b/goto.1.pl index 8588e25..26eef98 100644 --- a/goto.1.pl +++ b/goto.1.pl @@ -31,13 +31,13 @@ use botm_common ( 'redirect', 'read_header_env', 'url_query_decode', - '_x_encoded' + '_x_encoded', + 'merge_settings' ); use bsta_lib ( 'STATE', 'get_password', 'print_goto', - 'merge_settings', 'read_settings', 'read_state', 'read_goto' ); diff --git a/info.1.pl b/info.1.pl index dfab493..58a675f 100644 --- a/info.1.pl +++ b/info.1.pl @@ -32,12 +32,12 @@ use botm_common ( 'http_header_status', 'read_header_env', 'write_data_file', - 'url_query_decode' + 'url_query_decode', + 'merge_settings' ); use bsta_lib ( 'STATE', 'get_password', - 'merge_settings', 'get_page_file', 'get_frame_file', 'read_frame_data', 'read_default', 'read_noaccess', 'read_settings', 'read_default', 'read_state', diff --git a/opomba.1.pl b/opomba.1.pl index 1821df5..bee3b49 100644 --- a/opomba.1.pl +++ b/opomba.1.pl @@ -35,6 +35,7 @@ use botm_common ( 'html_entity_encode_dec', 'open_encoded', 'join_path', + 'merge_settings', 'merge_url', 'make_id', 'http_header_status' @@ -46,7 +47,6 @@ use bsta_lib ( 'print_html_head_start', 'print_html_head_end', 'print_html_body_start', 'print_html_body_end', 'bb_to_html', 'eval_bb', - 'merge_settings', 'write_index', 'write_static_viewer_page', 'read_settings', 'read_state', 'read_words', 'write_words', diff --git a/reset.1.pl b/reset.1.pl index 9aa9541..f57cf9c 100644 --- a/reset.1.pl +++ b/reset.1.pl @@ -28,12 +28,12 @@ use Encode ('encode', 'decode'); use botm_common ( 'write_data_file', 'opendir_encoded', 'readdir_decoded', 'unlink_encoded', - 'join_path' + 'join_path', + 'merge_settings' ); use bsta_lib ( 'STATE', 'INTF_STATE', 'CHAT_STATE', 'write_index', - 'merge_settings', 'get_page_file', 'get_frame_file', 'read_settings', 'read_default', 'read_frame_data', 'read_attachment', 'read_state' ); diff --git a/viewer.1.pl b/viewer.1.pl index 69c0aba..f0ed2c2 100644 --- a/viewer.1.pl +++ b/viewer.1.pl @@ -34,12 +34,12 @@ use botm_common ( 'join_path', 'open_encoded', '_x_encoded', 'http_header_status', + 'merge_settings', 'merge_url' ); use bsta_lib ( 'STATE', 'TEXT_MODE', 'INTF_STATE', 'get_remote_addr', 'get_frame', 'get_password', - 'merge_settings', 'print_viewer_page', 'write_index', 'write_static_goto', 'write_static_viewer_page', 'ong',