]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/network_functions.php
Heacy rewrite/cleanup:
[mailer.git] / inc / libs / network_functions.php
index e811faed5ad61780e36158cdf19e8c08a64c4ac4..deabc187338e61f96b79ead8aa03659a3ebf9a01 100644 (file)
@@ -102,7 +102,7 @@ function detectNetworkProcessForm () {
 // Handle a (maybe) sent form here
 function doNetworkHandleForm () {
        // Is there a form sent?
-       if (countRequestPost() > 0) {
+       if ((!isPostRequestElementSet('save_expert')) && (countRequestPost() > 0)) {
                // Detect sent POST form
                detectNetworkProcessForm();
        } elseif (!isGetRequestElementSet('do')) {
@@ -120,7 +120,7 @@ function doNetworkHandleForm () {
 // Processes an admin form
 function doAdminNetworkProcessForm () {
        // Create function name
-       $functionName = sprintf("doAdminNetworkProcess%s", capitalizeUnderscoreString(getRequestElement('do')));
+       $functionName = sprintf('doAdminNetworkProcess%s', capitalizeUnderscoreString(getRequestElement('do')));
 
        // Is the function valid?
        if (!function_exists($functionName)) {
@@ -686,7 +686,7 @@ ORDER BY
                } // END - while
 
                // Nothing found?
-               if (count($rows) == 0) {
+               if (!isFilledArray($rows)) {
                        // Then return nothing ... ;-)
                        return '';
                } // END - if
@@ -1852,7 +1852,7 @@ function doAdminNetworkProcessHandleNetworks () {
                                $networkData = getNetworkDataFromId($networkId);
 
                                // Is there found the network?
-                               if (count($networkData) > 0) {
+                               if (isFilledArray($networkData)) {
                                        // Add row template with given form name
                                        $OUT .= loadTemplate('admin_' . getNetworkFormName() . '_networks_row', TRUE, $networkData);
                                } // END - if
@@ -1894,7 +1894,7 @@ function doAdminNetworkProcessHandleNetworkTypes () {
                                $networkTypeData = getNetworkTypeDataByTypeId($networkId);
 
                                // Is there found the network?
-                               if (count($networkTypeData) > 0) {
+                               if (isFilledArray($networkTypeData)) {
                                        if (getNetworkFormName() == 'edit') {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_types_row', TRUE, $networkTypeData);
@@ -1955,7 +1955,7 @@ function doAdminNetworkProcessHandleRequestParams () {
                                $networkRequestData = getNetworkRequestParamsDataFromId($networkId);
 
                                // Is there found the network?
-                               if (count($networkRequestData) > 0) {
+                               if (isFilledArray($networkRequestData)) {
                                        if (getNetworkFormName() == 'edit') {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_request_params_row', TRUE, $networkRequestData);
@@ -2442,7 +2442,7 @@ function doAdminNetworkProcessHandleArrayTranslations () {
                                $networkTranslationsData = getNetworkArrayTranslationsDataFromId($networkId);
 
                                // Is there found the network?
-                               if (count($networkTranslationsData) > 0) {
+                               if (isFilledArray($networkTranslationsData)) {
                                        if (getNetworkFormName() == 'edit') {
                                                // Add row template for deleting
                                                $OUT .= loadTemplate('admin_edit_network_array_translation_row', TRUE, $networkTranslationsData);
@@ -3064,7 +3064,7 @@ function doAjaxAdminNetworkQuerySingleApi () {
        $requestParams = getNetworkRequestParametersByTypeId(postRequestElement('network_type_id'));
 
        // Is there at least one entry?
-       if (count($requestParams) == 0) {
+       if (!isFilledArray($requestParams)) {
                // No entry found, please setup some first
                reportBug(__FUNCTION__, __LINE__, 'Network ' . $networkData['network_title'] . ' with id ' . $networkData['network_id'] . ' has no request parameters.');
        } // END - if