]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/network_functions.php
debug_report_bug() should be used as a replacement for app_die() calls
[mailer.git] / inc / libs / network_functions.php
index 11ca2ba09d9984c2cb994c9557d783326e606faf..be9110404ba4f638118c66249b94da157c1b1830 100644 (file)
@@ -86,7 +86,7 @@ function doAdminNetworkProcessForm () {
        // Is the function valid?
        if (!function_exists($functionName)) {
                // Invalid function name
-               debug_report_bug('Invalid do ' . getRequestParameter('do') . ', function ' . $functionName .' does not exist.', false);
+               debug_report_bug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestParameter('do') . ', function ' . $functionName .' does not exist.', false);
        } // END - if
 
        // Call-back the method handling our request
@@ -146,7 +146,7 @@ function getNetworkDataById ($id, $column = '') {
        // Ids lower one are not accepted
        if ($id < 1) {
                // Not good, should be fixed
-               debug_report_bug('Network id ' . $id . ' is smaller than 1.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Network id ' . $id . ' is smaller than 1.');
        } // END - if
 
        // Set current network id
@@ -192,7 +192,7 @@ function getNetworkDataByTypeId ($id, $column = '') {
        // Ids lower one are not accepted
        if ($id < 1) {
                // Not good, should be fixed
-               debug_report_bug('Network type id ' . $id . ' is smaller than 1.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Network type id ' . $id . ' is smaller than 1.');
        } // END - if
 
        // Set current network id
@@ -243,7 +243,7 @@ function getNetworkTypeDataById ($id) {
        // Ids lower one are not accepted
        if ($id < 1) {
                // Not good, should be fixed
-               debug_report_bug('Network type id ' . $id . ' is smaller than 1.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Network type id ' . $id . ' is smaller than 1.');
        } // END - if
 
        // By default we have no data
@@ -277,7 +277,7 @@ function getNetworkRequestParamsDataById ($id) {
        // Ids lower one are not accepted
        if ($id < 1) {
                // Not good, should be fixed
-               debug_report_bug('Network request parameter id ' . $id . ' is smaller than 1.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $id . ' is smaller than 1.');
        } // END - if
 
        // By default we have no data
@@ -311,7 +311,7 @@ function doNetworkUpdateDataByArray ($id, $networkData) {
        // Ids lower one are not accepted
        if ($id < 1) {
                // Not good, should be fixed
-               debug_report_bug('Network id ' . $id . ' is smaller than 1.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Network id ' . $id . ' is smaller than 1.');
        } // END - if
 
        // Just call our inner method
@@ -323,7 +323,7 @@ function doNetworkUpdateTypeByArray ($id, $networkTypeData) {
        // Ids lower one are not accepted
        if ($id < 1) {
                // Not good, should be fixed
-               debug_report_bug('Network type handler id ' . $id . ' is smaller than 1.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Network type handler id ' . $id . ' is smaller than 1.');
        } // END - if
 
        // Just call our inner method
@@ -335,7 +335,7 @@ function doNetworkUpdateParamsByArray ($id, $networkParamData) {
        // Ids lower one are not accepted
        if ($id < 1) {
                // Not good, should be fixed
-               debug_report_bug('Network request parameter id ' . $id . ' is smaller than 1.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $id . ' is smaller than 1.');
        } // END - if
 
        // Just call our inner method
@@ -346,7 +346,7 @@ function doNetworkUpdateParamsByArray ($id, $networkParamData) {
 function doAdminRemoveNetworkEntry ($table, $column, $id, $limit = 1) {
        // Remove the entry
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_network_%s` WHERE `%s`=%s LIMIT %s",
-               array($table, $column, $id, $limit), __FILE__, __LINE__);
+               array($table, $column, $id, $limit), __FUNCTION__, __LINE__);
 
        // Return affected rows
        return SQL_AFFECTEDROWS();
@@ -363,7 +363,7 @@ function generateAdminNetworkList () {
 FROM
        `{?_MYSQL_PREFIX?}_network_data`
 ORDER BY
-       `network_short_name` ASC", __FILE__, __LINE__);
+       `network_short_name` ASC", __FUNCTION__, __LINE__);
 
        // Do we have entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -407,7 +407,7 @@ ORDER BY
        `network_type_handle` ASC",
                array(
                        bigintval($networkId)
-               ), __FILE__, __LINE__);
+               ), __FUNCTION__, __LINE__);
 
        // Do we have entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -451,7 +451,7 @@ ON
        t.`network_id`=d.`network_id`
 ORDER BY
        d.`network_short_name` ASC,
-       t.`network_type_handle` ASC", __FILE__, __LINE__);
+       t.`network_type_handle` ASC", __FUNCTION__, __LINE__);
 
        // Do we have entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -657,7 +657,7 @@ function doAdminNetworkProcessHandlenetworkForm () {
                                                $OUT .= loadTemplate('admin_del_networks_row', true, $networkData);
                                        } else {
                                                // Problem!
-                                               debug_report_bug('Cannot detect edit/del.');
+                                               debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                                        }
 
                                        // Switch colors
@@ -675,7 +675,7 @@ function doAdminNetworkProcessHandlenetworkForm () {
                                loadTemplate('admin_del_networks', false, $OUT);
                        } else {
                                // Problem!
-                               debug_report_bug('Cannot detect edit/del.');
+                               debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                        }
 
                        // Don't display the list/add new form
@@ -718,7 +718,7 @@ function doAdminNetworkProcessHandlenetworktypeForm () {
                                                $OUT .= loadTemplate('admin_del_network_types_row', true, $networkTypeData);
                                        } else {
                                                // Problem!
-                                               debug_report_bug('Cannot detect edit/del.');
+                                               debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                                        }
 
                                        // Switch colors
@@ -742,7 +742,7 @@ function doAdminNetworkProcessHandlenetworktypeForm () {
                                loadTemplate('admin_del_network_types', false, $content);
                        } else {
                                // Problem!
-                               debug_report_bug('Cannot detect edit/del.');
+                               debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                        }
 
                        // Don't display the list/add new form
@@ -797,7 +797,7 @@ function doAdminNetworkProcessHandlerequestparamsForm () {
                                                $OUT .= loadTemplate('admin_del_network_params_row', true, $networkRequestData);
                                        } else {
                                                // Problem!
-                                               debug_report_bug('Cannot detect edit/del.');
+                                               debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                                        }
 
                                        // Switch colors
@@ -821,7 +821,7 @@ function doAdminNetworkProcessHandlerequestparamsForm () {
                                loadTemplate('admin_del_network_params', false, $content);
                        } else {
                                // Problem!
-                               debug_report_bug('Cannot detect edit/del.');
+                               debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
                        }
 
                        // Don't display the list/add new form
@@ -855,7 +855,7 @@ function doAdminNetworkProcessChangenetworkForm () {
                                        // Do we have this enty?
                                        if (!isset($entry[$id])) {
                                                // Not found, needs fixing
-                                               debug_report_bug('No entry in key=' . $key . ', id=' . $id . ' found.');
+                                               debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $id . ' found.');
                                        } // END - if
 
                                        // Add this entry
@@ -969,7 +969,7 @@ function doAdminNetworkProcessChangenetworktypeForm () {
                                        // Do we have this enty?
                                        if (!isset($entry[$id])) {
                                                // Not found, needs fixing
-                                               debug_report_bug('No entry in key=' . $key . ', id=' . $id . ' found.');
+                                               debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $id . ' found.');
                                        } // END - if
 
                                        // Fix empty network_type_banner_url to NULL
@@ -1020,7 +1020,7 @@ function doAdminNetworkProcessChangenetworkparamForm () {
                                        // Do we have this enty?
                                        if (!isset($entry[$id])) {
                                                // Not found, needs fixing
-                                               debug_report_bug('No entry in key=' . $key . ', id=' . $id . ' found.');
+                                               debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $id . ' found.');
                                        } // END - if
 
                                        // Fix empty request_param_default to NULL