make-euros has replied me, now when you add request parameters only those from select...
[mailer.git] / inc / modules / admin / what-list_network_params.php
index 881a69c..e951930 100644 (file)
@@ -70,6 +70,16 @@ if (isGetRequestParameterSet('network')) {
        // Init disabled list
        $networkData['disabled'] = array();
 
+       // Only show params from given type handler if choosen
+       $ADD = '';
+       if (isPostRequestParameterSet('network_type_id')) {
+               // Only show from current type handler
+               $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestParameter('network_type_id')));
+
+               // Display message
+               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_PARAMS_LIST_LIMITED_TO_TYPE'));
+       } // END - if
+
        // Load all advert types for given network
        $result = SQL_QUERY_ESC("SELECT
        p.`network_param_id`, t.`network_type_id`, t.`network_type_handle`, p.`request_param_key`, p.`request_param_value`, p.`request_param_default`
@@ -80,7 +90,7 @@ INNER JOIN
 ON
        p.`network_type_id`=t.`network_type_id`
 WHERE
-       p.`network_id`=%s
+       p.`network_id`=%s".$ADD."
 ORDER BY
        t.`network_type_handle` ASC,
        p.`network_param_id` ASC",