X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_network_types.php;h=a2666bb8ef51b4c53e4187a6f121ee1f538ecf4c;hb=87a1790a6620f46451f1a8865c7153aa6b7ffec9;hp=9fdb6e7ca8b72660dde3438c83c4aaf9a5132c90;hpb=64eecfb13d8618ddcf0e9d53920a21b0401b3971;p=mailer.git diff --git a/inc/modules/admin/what-config_network_types.php b/inc/modules/admin/what-config_network_types.php index 9fdb6e7ca8..a2666bb8ef 100644 --- a/inc/modules/admin/what-config_network_types.php +++ b/inc/modules/admin/what-config_network_types.php @@ -67,9 +67,7 @@ if (isGetRequestElementSet('network_id')) { `network_id`, `network_type_id`, `network_type_handle`, - `network_type_api_url`, - `network_type_click_url`, - `network_type_banner_url`, + `network_type_reload_time_unit`, NULL AS `network_data_id`, NULL AS `network_max_reload_time`, NULL AS `network_min_waiting_time`, @@ -111,17 +109,26 @@ LIMIT 1', bigintval($content['network_type_id']) ), __FUNCTION__, __LINE__); + // Use template for adding + $templateName = 'admin_add_config_network_type_form'; + // Do we also have configuration? if (SQL_NUMROWS($result_config) == 1) { // Load as well and merge it $content = merge_array($content, SQL_FETCHARRAY($result_config)); + + // Use template for editing + $templateName = 'admin_edit_config_network_type_form'; } // END - if // Free result SQL_FREERESULT($result_config); + // "Translate" some values + $content['network_max_reload_time'] = createTimeSelections($content['network_max_reload_time'], 'network_max_reload_time', 'WDhms'); + // Load template - loadTemplate('admin_add_config_network_type_form', false, $content); + loadTemplate($templateName, false, $content); // Abort here return; @@ -139,9 +146,7 @@ LIMIT 1', `network_id`, `network_type_id`, `network_type_handle`, - `network_type_api_url`, - `network_type_click_url`, - `network_type_banner_url` + `network_type_reload_time_unit` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE @@ -181,7 +186,7 @@ LIMIT 1', // Do we have an entry? if (SQL_NUMROWS($result_config) == 1) { // Load this data as well - $contentConfig = SQL_FETCHARRAY($result_config); + $contentConfig = merge_array($content, SQL_FETCHARRAY($result_config)); // Add it with extra template $content['network_type_config_content'] = loadTemplate('admin_show_config_network_type', true, $contentConfig);