X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_network_params.php;h=d607a8e225846f5674d5e289d9d7e99c38846ac0;hb=879d21c8fbaf8868194aeb456a77ab95b0dc43b0;hp=a09cae196ea70d96ee498d3021c963647f6e6fb5;hpb=04b69ac9f33369cbf654396c4a42cb1fff710ff4;p=mailer.git diff --git a/inc/modules/admin/what-list_network_params.php b/inc/modules/admin/what-list_network_params.php index a09cae196e..d607a8e225 100644 --- a/inc/modules/admin/what-list_network_params.php +++ b/inc/modules/admin/what-list_network_params.php @@ -67,6 +67,7 @@ if ($GLOBALS['network_display'] === false) { if (isGetRequestParameterSet('network')) { // Get its data for template $networkData = getNetworkDataById(getRequestParameter('network')); + $networkData['network_type_id'] = 0; // Init disabled list $GLOBALS['network_params_disabled'] = array(); @@ -77,6 +78,9 @@ if (isGetRequestParameterSet('network')) { // Only show from current type handler $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestParameter('network_type_id'))); + // Overwrite type id + $networkData['network_type_id'] = bigintval(postRequestParameter('network_type_id')); + // Display message loadTemplate('admin_settings_saved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE--}'); } // END - if @@ -98,13 +102,10 @@ ORDER BY array(getRequestParameter('network')), __FILE__, __LINE__); // Do we have entries? - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // List all entries - $OUT = ''; $SW = 2; + $OUT = ''; while ($row = SQL_FETCHARRAY($result)) { - // Add color switching - $row['sw'] = $SW; - // Add it to network if the type matches selected if ($row['network_type_id'] == postRequestParameter('network_type_id')) { // Matches, then add it for disabling this entry @@ -116,19 +117,10 @@ ORDER BY // Add row template and switch color $OUT .= loadTemplate('admin_list_network_params_row', true, $row); - $SW = 3 - $SW; } // END - while - // Prepare data for template - $content = array( - 'rows' => $OUT, - 'network_id' => bigintval(getRequestParameter('network')), - 'network_title' => $networkData['network_title'], - 'network_reflink' => $networkData['network_reflink'], - ); - // Load main template - loadTemplate('admin_list_network_params', false, $content); + loadTemplate('admin_list_network_params', false, $OUT); } else { // No entries found loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_404', $networkData['network_title']));