]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/network_functions.php
Caching of expensive PHP functions:
[mailer.git] / inc / libs / network_functions.php
index 8f4e0a59f44f0879046326b953326d9b18766e3d..da20b81374de623e09200c14277b09daa030a084 100644 (file)
@@ -474,7 +474,7 @@ ORDER BY
 
        // Free the result
        SQL_FREERESULT($result);
-       //* DEBUG: */ die('<pre>'.htmlentities($content).'</pre>');
+       //* DEBUG: */ die('<pre>'.encodeEntities($content).'</pre>');
 
        // Return content
        return $content;
@@ -620,7 +620,7 @@ function doAdminNetworkProcessHandlenetworkForm () {
        // Do we have selections?
        if (countPostSelection() > 0) {
                // Something has been selected, so start displaying one by one
-               $SW = 2; $OUT = '';
+               $OUT = '';
                foreach (postRequestParameter('sel') as $id => $sel) {
                        // Is this selected?
                        if ($sel == 1) {
@@ -629,9 +629,6 @@ function doAdminNetworkProcessHandlenetworkForm () {
 
                                // Do we have found the network?
                                if (count($networkData) > 0) {
-                                       // Add color
-                                       $networkData['sw'] = $SW;
-
                                        if (isFormSent('edit')) {
                                                // Make selection box for network_request_type
                                                $networkData['network_request_type'] = generateOptionList(
@@ -641,8 +638,8 @@ function doAdminNetworkProcessHandlenetworkForm () {
                                                                'POST'
                                                        ),
                                                        array(
-                                                               getMessage('ADMIN_NETWORK_REQUEST_TYPE_GET'),
-                                                               getMessage('ADMIN_NETWORK_REQUEST_TYPE_POST')
+                                                               '{--ADMIN_NETWORK_REQUEST_TYPE_GET--}',
+                                                               '{--ADMIN_NETWORK_REQUEST_TYPE_POST--}'
                                                        ),
                                                        $networkData['network_request_type']
                                                );
@@ -659,9 +656,6 @@ function doAdminNetworkProcessHandlenetworkForm () {
                                                // Problem!
                                                debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                                        }
-
-                                       // Switch colors
-                                       $SW = 3 - $SW;
                                } // END - if
                        } // END - if
                } // END - foreach
@@ -695,7 +689,7 @@ function doAdminNetworkProcessHandlenetworktypeForm () {
                $networkData = getNetworkDataById(getRequestParameter('network'));
 
                // Something has been selected, so start displaying one by one
-               $SW = 2; $OUT = '';
+               $OUT = '';
                foreach (postRequestParameter('sel') as $id => $sel) {
                        // Is this selected?
                        if ($sel == 1) {
@@ -704,25 +698,16 @@ function doAdminNetworkProcessHandlenetworktypeForm () {
 
                                // Do we have found the network?
                                if (count($networkTypeData) > 0) {
-                                       // Add color
-                                       $networkTypeData['sw'] = $SW;
-
                                        if (isFormSent('edit')) {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_types_row', true, $networkTypeData);
                                        } elseif (isFormSent('del')) {
-                                               // Fix empty banner URL
-                                               if (trim($networkTypeData['network_type_banner_url']) == '') $networkTypeData['network_type_banner_url'] = '---';
-
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_del_network_types_row', true, $networkTypeData);
                                        } else {
                                                // Problem!
                                                debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                                        }
-
-                                       // Switch colors
-                                       $SW = 3 - $SW;
                                } // END - if
                        } // END - if
                } // END - foreach
@@ -765,7 +750,7 @@ function doAdminNetworkProcessHandlerequestparamsForm () {
                $networkData = getNetworkDataById(getRequestParameter('network'));
 
                // Something has been selected, so start displaying one by one
-               $SW = 2; $OUT = '';
+               $OUT = '';
                foreach (postRequestParameter('sel') as $id => $sel) {
                        // Is this selected?
                        if ($sel == 1) {
@@ -774,9 +759,6 @@ function doAdminNetworkProcessHandlerequestparamsForm () {
 
                                // Do we have found the network?
                                if (count($networkRequestData) > 0) {
-                                       // Add color
-                                       $networkRequestData['sw'] = $SW;
-
                                        if (isFormSent('edit')) {
                                                // Add options list for network type
                                                $networkRequestData['type_options'] = generateNetworkTypeOptions($networkRequestData['network_type_id']);
@@ -787,9 +769,6 @@ function doAdminNetworkProcessHandlerequestparamsForm () {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_params_row', true, $networkRequestData);
                                        } elseif (isFormSent('del')) {
-                                               // Fix empty banner URL
-                                               if (trim($networkRequestData['request_param_default']) == '') $networkRequestData['request_param_default'] = '---';
-
                                                // Get type data
                                                $networkRequestData['network_type_data'] = getNetworkTypeDataById($networkRequestData['network_type_id']);
 
@@ -799,9 +778,6 @@ function doAdminNetworkProcessHandlerequestparamsForm () {
                                                // Problem!
                                                debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                                        }
-
-                                       // Switch colors
-                                       $SW = 3 - $SW;
                                } // END - if
                        } // END - if
                } // END - foreach