From b50929bbd0bac925e7df43ed067f234fdbf9b5d6 Mon Sep 17 00:00:00 2001 From: totoro Date: Mon, 16 Dec 2019 02:54:20 +0100 Subject: [PATCH] add _CXM_MAILING_CHECK_CONTACT in message constant move db_get_xxx helpers into db_get_helpers.anubis add add_DB_id and find_DB_id functions to able to add and find DB_id in Muscle Message web controller web argument has 2 names versions. The legacy "aws_controller" and the short version"aws_c" web action web argment has 2 names versions. The legacy "aws_action" and the short version "aws_a" add detect_browser_language in /web/CXM_common.anubis --- CXM_message_constants.anubis | 1 + database/db_get_helpers.anubis | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ database/db_types.anubis | 71 +++++++++++++++++++++++++++++++++++++++++++++++------------------------ database/db_utils.anubis | 151 +------------------------------------------------------------------------------------------------------------------------------------------------------ database/migration_common.anubis | 4 ++-- database/migration_common_sqlite3.anubis | 3 ++- database/migration_sqlite3.anubis | 1 + web/CXM_common.anubis | 34 +++++++++++++++++++++++++++++++--- web/CXM_multihost_http_server.anubis | 6 +++--- web/CXM_web_arg_utils.anubis | 1 + web/CXM_web_session.anubis | 5 +++++ web/controllers_web_site.anubis | 40 +++++++++++++++++++++++++++++----------- 12 files changed, 338 insertions(+), 194 deletions(-) create mode 100644 database/db_get_helpers.anubis diff --git a/CXM_message_constants.anubis b/CXM_message_constants.anubis index 64f6604..e60aed4 100644 --- a/CXM_message_constants.anubis +++ b/CXM_message_constants.anubis @@ -123,6 +123,7 @@ public define Word32 _CXM_MAILING_SERVICE_ID = 0x33772200. // s public define Word32 _CXM_MAILING_CREATE_CONTACT = 0x33772201. public define Word32 _CXM_MAILING_UPDATE_CONTACT = 0x33772202. public define Word32 _CXM_MAILING_DELETE_CONTACT = 0x33772203. +public define Word32 _CXM_MAILING_CHECK_CONTACT = 0x33772204. public define Word32 _CXM_MAILING_CREATE_MAILING = 0x33772211. public define Word32 _CXM_MAILING_UPDATE_MAILING = 0x33772212. diff --git a/database/db_get_helpers.anubis b/database/db_get_helpers.anubis new file mode 100644 index 0000000..725ceab --- /dev/null +++ b/database/db_get_helpers.anubis @@ -0,0 +1,215 @@ +/* + * Created by PyramIDE. + * User: フランスのトトロ aka (David RENÉ) + * Date: 15/12/2019 + * Time: 13:32 + * © David RENÉ + */ + +read tools/basis.anubis +read system/logger.anubis +read calexium_lib/net_services_protocols/logger_client.anubis +read system/string.anubis +read data_base/db_tools.anubis +read data_base/sqlite.anubis + +transmit calexium_lib/database/db_types.anubis + +// -- Extractors HELPERS --------------- + + +// sqlite3 API +public define String + db_get_String + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_String")); "", + no_more_row then "", //can't find the symbol in the table, because the row is empty + row(explorer) then text(explorer)(0) + } +. + +public define List(String) + db_get_List_String + ( + One -> DbRow table_cursor, + List(String) so_far + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_string_list")); reverse(so_far), + no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty + row(explorer) then + with s = text(explorer)(0), + db_get_List_String(table_cursor, [s . so_far]) + }. + +// sqlite3 API +public define List(String) + db_get_List_String + ( + One -> SQLite3Row table_cursor, + List(String) so_far + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_string_list")); reverse(so_far), + no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty + row(explorer) then + with s = text(explorer)(0), + db_get_List_String(table_cursor, [s . so_far]) + }. + +// sqlite3 API +public define List(String) + db_get_List_String + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_string_list")); [], + no_more_row then [], //can't find the symbol in the table, because the row is empty + row(explorer) then + with s = text(explorer)(0), + [ s . db_get_List_String(table_cursor)] + }. + +public define Bool + db_get_Bool + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_Bool")); false, + no_more_row then false, //can't find the symbol in the table, because the row is empty + row(explorer) then db_bool(explorer)(0) + } +. + +// sqlite3 API +public define Int + db_get_Int + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_integer")); 0, + no_more_row then 0, + row(explorer) then (Int)db_integer(explorer)(0) + } +. + +public define Maybe(Int) + db_get_mb_Int + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_mb_integer")); failure, + no_more_row then failure, + row(explorer) then db_integer(explorer)(0) + }. + +// sqlite3 API +public define List(Int) + db_get_List_Int + ( + One -> SQLite3Row table_cursor, + List(Int) so_far + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_integer_list")); reverse(so_far), + no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty + row(explorer) then + with s = (Int)db_integer(explorer)(0), + db_get_List_Int(table_cursor, [s . so_far]) + }. + +public define List(Int) + db_get_List_Int + ( + One -> SQLite3Row table_cursor + ) = + db_get_List_Int(table_cursor, []). + +// sqlite3 API +public define Float + db_get_Float + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_Float")); 0.0, + no_more_row then 0.0, + row(explorer) then db_float(explorer)(0) + }. + +// sqlite3 API +public define DB_id + db_get_DB_id + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_DB_id")); none, + no_more_row then none, + row(explorer) then + with result = (Int)db_integer(explorer)(0), + if result = -1 | result = 0 then none else db_id(result) + } +. + +public define Maybe(DB_id) + db_get_mb_DB_id + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_mb_DB_id")); failure, + no_more_row then failure, + row(explorer) then + with result = (Int)db_integer(explorer)(0), + if result = -1 | result = 0 then success(none) else success(db_id(result)) + } +. + + /***********************************/ + +public define List(Int) + db_get_List_Int + ( + One -> DbRow table_cursor, + List(Int) so_far + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_integer_list")); reverse(so_far), + no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty + row(explorer) then + with s = (Int)db_integer(explorer)(0), + db_get_List_Int(table_cursor, [s . so_far]) + }. + +public define List(Int) + db_get_List_Int + ( + One -> DbRow table_cursor, + ) = + db_get_List_Int(table_cursor, []). + + + Help to construct clause and a list of bind according to list of SQLite3_update_field. + This is useful when we want to construct a SQL query with only needs fields. + + diff --git a/database/db_types.anubis b/database/db_types.anubis index 31e5361..4043097 100644 --- a/database/db_types.anubis +++ b/database/db_types.anubis @@ -21,9 +21,32 @@ transmit calexium_lib/web/CXM_json.anubis // none, // db_id(Int value). -public type DB_ID: - none, - pk(Int value). +//public type DB_ID: +// none, +// pk(Int value). + +public define Maybe(One) + add_DB_id + ( + Message msg, + String name, + DB_id db_id + )= + add_message(msg, name, to_Message(db_id)) +. + +public define Maybe(DB_id) + find_DB_id + ( + Message msg, + String name, + )= + if find_message(msg, name) is + { + failure then failure, + success(_db_id__msg) then (Maybe(DB_id))from_Message(_db_id__msg) + } +. public define String to_String @@ -150,27 +173,27 @@ public define String } . -public define String - to_String - ( - DB_ID idx - )= - if idx is - { - none then "none", - pk(_idx) then abs_to_decimal(_idx) - }. - -public define Int - to_Int - ( - DB_ID idx - )= - if idx is - { - none then (Int)-1, - pk(_idx) then _idx - }. +//public define String +// to_String +// ( +// DB_ID idx +// )= +// if idx is +// { +// none then "none", +// pk(_idx) then abs_to_decimal(_idx) +// }. +// +//public define Int +// to_Int +// ( +// DB_ID idx +// )= +// if idx is +// { +// none then (Int)-1, +// pk(_idx) then _idx +// }. public define String to_String diff --git a/database/db_utils.anubis b/database/db_utils.anubis index 8339cb5..b060d22 100644 --- a/database/db_utils.anubis +++ b/database/db_utils.anubis @@ -17,7 +17,7 @@ transmit calexium_lib/database/db_types.anubis transmit calexium_lib/database/db_utils.anubis transmit calexium_lib/database/db_binds.anubis transmit calexium_lib/database/db_update_fields.anubis - +transmit calexium_lib/database/db_get_helpers.anubis read calexium_lib/net_services_protocols/logger_client.anubis public define Int one_year_seconds = 365 * 86400. // amount of seconds during 1 year @@ -194,155 +194,6 @@ public define SQLite3Row row(data) }. -// -- Extractors HELPERS --------------- - -// sqlite3 API -public define String - db_get_String - ( - One -> SQLite3Row table_cursor - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_String")); "", - no_more_row then "", //can't find the symbol in the table, because the row is empty - row(explorer) then text(explorer)(0) - }. - -public define List(String) - db_get_string_list - ( - One -> DbRow table_cursor, - List(String) so_far - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_string_list")); reverse(so_far), - no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty - row(explorer) then - with s = text(explorer)(0), - db_get_string_list(table_cursor, [s . so_far]) - }. - -// sqlite3 API -public define List(String) - db_get_string_list - ( - One -> SQLite3Row table_cursor, - List(String) so_far - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_string_list")); reverse(so_far), - no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty - row(explorer) then - with s = text(explorer)(0), - db_get_string_list(table_cursor, [s . so_far]) - }. - -// sqlite3 API -public define List(String) - db_get_string_list - ( - One -> SQLite3Row table_cursor - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_string_list")); [], - no_more_row then [], //can't find the symbol in the table, because the row is empty - row(explorer) then - with s = text(explorer)(0), - [ s . db_get_string_list(table_cursor)] - }. - -// sqlite3 API -public define Int - db_get_integer - ( - One -> SQLite3Row table_cursor - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_integer")); 0, - no_more_row then 0, - row(explorer) then (Int)db_integer(explorer)(0) - }. - -public define Maybe(Int) - db_get_mb_integer - ( - One -> SQLite3Row table_cursor - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_mb_integer")); failure, - no_more_row then failure, - row(explorer) then db_integer(explorer)(0) - }. - -// sqlite3 API -public define List(Int) - db_get_integer_list - ( - One -> SQLite3Row table_cursor, - List(Int) so_far - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_integer_list")); reverse(so_far), - no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty - row(explorer) then - with s = (Int)db_integer(explorer)(0), - db_get_integer_list(table_cursor, [s . so_far]) - }. - -public define List(Int) - db_get_integer_list - ( - One -> SQLite3Row table_cursor - ) = - db_get_integer_list(table_cursor, []). - -// sqlite3 API -public define Float - db_get_Float - ( - One -> SQLite3Row table_cursor - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_Float")); 0.0, - no_more_row then 0.0, - row(explorer) then db_float(explorer)(0) - }. - -public define List(Int) - db_get_integer_list - ( - One -> DbRow table_cursor, - List(Int) so_far - ) = - if table_cursor(unique) is - { - error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_integer_list")); reverse(so_far), - no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty - row(explorer) then - with s = (Int)db_integer(explorer)(0), - db_get_integer_list(table_cursor, [s . so_far]) - }. - -public define List(Int) - db_get_integer_list - ( - One -> DbRow table_cursor, - ) = - db_get_integer_list(table_cursor, []). - - - Help to construct clause and a list of bind according to list of SQLite3_update_field. - This is useful when we want to construct a SQL query with only needs fields. - - diff --git a/database/migration_common.anubis b/database/migration_common.anubis index 9bf8da9..0e9efe7 100644 --- a/database/migration_common.anubis +++ b/database/migration_common.anubis @@ -143,8 +143,8 @@ public define Maybe(One) [h . t] then if sql_query_timeout(db, h, "Version "+version_string+": create indexes") is { - failure then failure, - success(_) then + failure then failure, + success(_) then create_indexes(db, logger, t, version_string) } }. diff --git a/database/migration_common_sqlite3.anubis b/database/migration_common_sqlite3.anubis index 6ea956a..fb1c2ad 100644 --- a/database/migration_common_sqlite3.anubis +++ b/database/migration_common_sqlite3.anubis @@ -12,6 +12,7 @@ read data_base/sqlite.anubis read data_base/alter_table.anubis //for sqlite3 version of alter_table read data_base/db_types.anubis //FK... read data_base/sqlite_foreign_key.anubis +read db_get_helpers.anubis read calexium_lib/database/db_utils.anubis //read calexium_lib/net_services_protocols/logger_service.anubis @@ -90,7 +91,7 @@ public define Maybe(One) error(err2) then log(logError, db_error(err2, "Failed to drop trigger '" + name + "'")), ok(_, cursor, _) then unique }, - map_forget(drop_trigger, db_get_string_list(cursor, [])); + map_forget(drop_trigger, db_get_List_String(cursor, [])); success(unique) }. diff --git a/database/migration_sqlite3.anubis b/database/migration_sqlite3.anubis index bb16049..8beee07 100644 --- a/database/migration_sqlite3.anubis +++ b/database/migration_sqlite3.anubis @@ -13,6 +13,7 @@ read system/string.anubis read data_base/sqlite.anubis read calexium_lib/database/alter_table.anubis read calexium_lib/database/db_utils.anubis +read calexium_lib/database/db_get_helpers.anubis //read calexium_lib/net_services_protocols/logger_client.anubis read calexium_lib/types/version.anubis diff --git a/web/CXM_common.anubis b/web/CXM_common.anubis index 3e4b173..7928a05 100644 --- a/web/CXM_common.anubis +++ b/web/CXM_common.anubis @@ -3,8 +3,8 @@ *Title* Some common stuff for the web. *Copyright* - Copyright (c) Alain Prouté 2003~2007. - © David RENÉ2007~2017 + Copyright © Alain Prouté 2003~2007. + © David RENÉ2007~2019 *Authors:* @@ -17,7 +17,7 @@ transmit tools/basis.anubis transmit system/string.anubis - +read system/logger.anubis /** * The type 'HTTP_header' describes HTTP headers, which are just pairs '(name,value)'. */ @@ -267,3 +267,31 @@ public define List(String) } . +public define String + detect_browser_language + ( + HTTP_Info http_info, + String default_language, + (LogLevel, String) -> One logger + ) = + logger(logInfo,"Detecting language... "); + if http_header_value(http_info.http_headers, "Accept-Language") is + { + failure then logger(logDebug, "FAILED: unable to find 'Accept-Language' header, use the default one ["+default_language+"]."); default_language , + success(value) then + if split_by_token(value, ',') is + { + [] then logger(logDebug, "FAILED: language header is empty, use the default one ["+default_language+"]."); default_language, + [h . _] then + //TODO real managment of language and country like fr-be for + // belgium french. + //but now we only extract the language and forget the country + if split_by_token(trim(h), '-') is + { + [] then default_language, + [browser_lang . _] then + logger(logDebug, "Language = " + browser_lang);browser_lang + } + } + } +. diff --git a/web/CXM_multihost_http_server.anubis b/web/CXM_multihost_http_server.anubis index 798565f..19da853 100644 --- a/web/CXM_multihost_http_server.anubis +++ b/web/CXM_multihost_http_server.anubis @@ -3,9 +3,9 @@ *Title* A Multi Host HTTP/HTTPS Server - *Copyright* Copyright (c) Anubis Team 2003-2007. - (c) Calexium 2007-2013 - (c) David René 2014-2019 + *Copyright* Copyright © Anubis Team 2003-2007. + © Calexium 2007-2013 + © David René 2014-2019 *Authors* Alain Prouté diff --git a/web/CXM_web_arg_utils.anubis b/web/CXM_web_arg_utils.anubis index 954d577..74b49fd 100644 --- a/web/CXM_web_arg_utils.anubis +++ b/web/CXM_web_arg_utils.anubis @@ -599,3 +599,4 @@ public define Word8 success(value) then value }. + diff --git a/web/CXM_web_session.anubis b/web/CXM_web_session.anubis index ca0ad19..67bb21b 100644 --- a/web/CXM_web_session.anubis +++ b/web/CXM_web_session.anubis @@ -1017,18 +1017,23 @@ public define One "AWS_CURRENT_PAGE_RENDERER" String current page renderer public define One set_web_app(WEB_Session s, String n) = replace_String(s.fields, "AWS_CURRENT_APP", n). +public define One set_web_app(Var(List(WEB_Session_Field)) fields, String n) = replace_String(fields, "AWS_CURRENT_APP", n). public define String get_web_app(WEB_Session s) = get_String (s.fields, "AWS_CURRENT_APP", ""). public define One set_web_space(WEB_Session s, String n)= replace_String(s.fields, "AWS_CURRENT_SPACE", n). +public define One set_web_space(Var(List(WEB_Session_Field)) fields, String n)= replace_String(fields, "AWS_CURRENT_SPACE", n). public define String get_web_space(WEB_Session s) = get_String (s.fields, "AWS_CURRENT_SPACE", ""). public define One set_web_content(WEB_Session s, String n)= replace_String(s.fields, "AWS_CURRENT_CONTENT", n). +public define One set_web_content(Var(List(WEB_Session_Field)) fields, String n)= replace_String(fields, "AWS_CURRENT_CONTENT", n). public define String get_web_content(WEB_Session s) = get_String (s.fields, "AWS_CURRENT_CONTENT", ""). public define One set_page_title(WEB_Session s, String n)= replace_String(s.fields, "AWS_CURRENT_PAGE_TITLE", n). +public define One set_page_title(Var(List(WEB_Session_Field)) fields, String n)= replace_String(fields, "AWS_CURRENT_PAGE_TITLE", n). public define String get_page_title(WEB_Session s) = get_String (s.fields, "AWS_CURRENT_PAGE_TITLE", ""). public define One set_renderer(WEB_Session s, String n) = replace_String(s.fields, "AWS_CURRENT_PAGE_RENDERER", n). +public define One set_renderer(Var(List(WEB_Session_Field)) fields, String n) = replace_String(fields, "AWS_CURRENT_PAGE_RENDERER", n). public define String get_renderer(WEB_Session s) = get_String (s.fields, "AWS_CURRENT_PAGE_RENDERER", ""). diff --git a/web/controllers_web_site.anubis b/web/controllers_web_site.anubis index f31d813..9629b19 100644 --- a/web/controllers_web_site.anubis +++ b/web/controllers_web_site.anubis @@ -24,7 +24,7 @@ read plugin/plugin.anubis read CXM_making_a_web_site.anubis read calexium_lib/web/plugin/plugin.anubis -read config/logger_config.anubis + read config/logger_config.anubis @@ -419,7 +419,20 @@ define WEB_Page_Renderer public define JsonValue to_html_ajax_content(Printable_tree content_HTML, String additional_script). public define JsonValue to_html_ajax_content(HTML_Partial_Content content_HTML, CommonInfo cinfo, String additional_script). - + +define String + get_controller_from_web_arg + ( + List(Web_arg) lwa, + String default + )= + if get_String(lwa, "aws_controller") is { failure then + if get_String(lwa, "aws_c") is { failure then default, + success(controller) then controller} + success(controller) then controller + } +. + define (Maybe(WEB_Session), HTTP_Answer) apply_controller_action ( @@ -438,10 +451,15 @@ define (Maybe(WEB_Session), HTTP_Answer) )= //get the action name with mb_action_name = - if _mb_action_name is - { - failure then get_String(*_session.web_request.lwa, "aws_action"), - success(_an) then success(_an) + if _mb_action_name is + { + failure then + if get_String(*_session.web_request.lwa, "aws_action") is + { + failure then get_String(*_session.web_request.lwa, "aws_a"), + success(_an) then success(_an) + } + success(_an) then success(_an) }, if mb_action_name is @@ -449,7 +467,7 @@ define (Maybe(WEB_Session), HTTP_Answer) failure then //(failure, error_page(http_not_found, "Action name failure", _session)), with new_session = initial_session(_session.web_request.http_info, _session.web_request.lwa, _session.web_request.is_https), - if get_controller(get_String(*new_session.web_request.lwa, "aws_controller", "root"), controllers, logger) is + if get_controller(get_controller_from_web_arg(*new_session.web_request.lwa, "root"), controllers, logger) is { failure then (failure, error_page(http_not_found, "Initial Session Controller not found", new_session)), success(new_controller) then apply_controller_action(new_controller, plugins, controllers, _current_page_renderer, page_renderers, cinfo, new_session, failure, initial_session, logger), @@ -477,7 +495,7 @@ define (Maybe(WEB_Session), HTTP_Answer) (success(new_web_session), answer), redirect(new_session) then - if get_controller(get_String(*new_session.web_request.lwa, "aws_controller", "root"), controllers, logger) is + if get_controller(get_controller_from_web_arg(*new_session.web_request.lwa, "root"), controllers, logger) is { failure then (failure, error_page(http_not_found, "Redirect Controller not found", new_session)), success(new_controller) then apply_controller_action(new_controller, plugins, controllers, _current_page_renderer, page_renderers, cinfo, new_session, failure, initial_session, logger), @@ -492,7 +510,7 @@ define (Maybe(WEB_Session), HTTP_Answer) }, redirect_to_previous then - if get_controller(get_String(*_session.previous_web_request.lwa, "aws_controller", "root"), controllers, logger) is + if get_controller(get_controller_from_web_arg(*_session.previous_web_request.lwa, "root"), controllers, logger) is { failure then (failure, error_page(http_not_found, "Redirect to previous Controller not found", _session)), success(new_controller) then @@ -500,7 +518,7 @@ define (Maybe(WEB_Session), HTTP_Answer) apply_controller_action(new_controller, plugins, controllers, _current_page_renderer, page_renderers, cinfo, web_session(id, lang, entries, previous, previous, draw), failure, initial_session, logger), }, redirect_to_previous(entries) then - if get_controller(get_String(*_session.previous_web_request.lwa, "aws_controller", "root"), controllers, logger) is + if get_controller(get_controller_from_web_arg(*_session.previous_web_request.lwa, "root"), controllers, logger) is { failure then (failure, error_page(http_not_found, "Redirect to previous Controller not found", _session)), success(new_controller) then @@ -622,7 +640,7 @@ public define Web_Site //apply the action according to current session //since apply_controller_action(get_controller(get_String(lwa, "aws_controller", "root"), *web_controllers), *web_controllers, current_session) - since if get_controller(get_String(*current_session.web_request.lwa, "aws_controller", "root"), *web_controllers, logger) is + since if get_controller(get_controller_from_web_arg(*current_session.web_request.lwa, "root"), *web_controllers, logger) is { failure then (failure, error_page(http_not_found, "Controller not found", current_session)), -- libgit2 0.21.4