]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_network_api_translation.php
More wrapper functions used, removed bigintval() which caused a lot trouble
[mailer.git] / inc / modules / admin / what-list_network_api_translation.php
index 97f0a622f38b87d52222b3c19605c42db90f48da..a2d5150a5e9797385056563e00bc19d6b7cf9423 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -68,6 +66,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 +78,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 +110,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
@@ -123,9 +126,6 @@ ORDER BY
                loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_API_TRANSLATION_404', $networkData['network_title']));
        }
 
-       // Add options list for network type
-       $networkData['translation_index'] = (SQL_NUMROWS($result) + 1);
-
        // Free result
        SQL_FREERESULT($result);