]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_network_api_translation.php
Naming convention applied to language strings, new API function added:
[mailer.git] / inc / modules / admin / what-list_network_api_translation.php
index 21fd6682915a77d19419f8eb5f51d286efa75fd7..97894cda8be4c907f37a682350834ce0920bcba2 100644 (file)
@@ -68,6 +68,9 @@ if (isGetRequestParameterSet('network')) {
        // Get its data for template
        $networkData = getNetworkDataById(getRequestParameter('network'));
 
+       // Init type
+       $networkData['network_type_id'] = 0;
+
        // Init disabled list
        $GLOBALS['network_translation_disabled'] = array();
 
@@ -77,14 +80,16 @@ if (isGetRequestParameterSet('network')) {
                // Only show from current type handler
                $ADD = sprintf(" AND p.`network_type_id`=%s", bigintval(postRequestParameter('network_type_id')));
 
+               // Overwrite type
+               $networkData['network_type_id'] = bigintval(postRequestParameter('network_type_id'));
+
                // Display message
                loadTemplate('admin_settings_saved', false, '{--ADMIN_NETWORK_API_TRANSLATION_LIST_LIMITED_TO_TYPE--}');
        } // END - if
 
-
        // Load all advert codes for given network
        $result = SQL_QUERY_ESC("SELECT
-       p.`network_api_id`, t.`network_type_id`, t.`network_type_handle`, p.`network_api_index`
+       p.`network_api_id`, t.`network_type_id`, t.`network_type_handle`, p.`network_api_index`, p.`sort`
 FROM
        `{?_MYSQL_PREFIX?}_network_api_translation` AS p
 INNER JOIN
@@ -107,7 +112,7 @@ ORDER BY
                $OUT = '';
                while ($row = SQL_FETCHARRAY($result)) {
                        // Add it to network if the type matches selected
-                       if ($row['network_type_id'] == getRequestParameter('network_type_id')) {
+                       if ($row['network_type_id'] == postRequestParameter('network_type_id')) {
                                // Matches, then add it for disabling this entry
                                $GLOBALS['network_translation_disabled'][$row['network_api_index']] = true;
                        } // END - if