More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / libs / network_functions.php
index da20b81374de623e09200c14277b09daa030a084..246e054dfc7823cfb59a8702d6445797e58ab5a0 100644 (file)
@@ -366,7 +366,7 @@ ORDER BY
        `network_short_name` ASC", __FUNCTION__, __LINE__);
 
        // Do we have entries?
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // List all entries
                $rows = array();
                while ($row = SQL_FETCHARRAY($result)) {
@@ -410,7 +410,7 @@ ORDER BY
                ), __FUNCTION__, __LINE__);
 
        // Do we have entries?
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // List all entries
                $rows = array();
                while ($row = SQL_FETCHARRAY($result)) {
@@ -454,7 +454,7 @@ ORDER BY
        t.`network_type_handle` ASC", __FUNCTION__, __LINE__);
 
        // Do we have entries?
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // List all entries
                $rows = array();
                while ($row = SQL_FETCHARRAY($result)) {
@@ -618,7 +618,7 @@ function doAdminNetworkProcessAddnetworkForm () {
 // Displays selected networks for editing
 function doAdminNetworkProcessHandlenetworkForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // Something has been selected, so start displaying one by one
                $OUT = '';
                foreach (postRequestParameter('sel') as $id => $sel) {
@@ -684,7 +684,7 @@ function doAdminNetworkProcessHandlenetworkForm () {
 // Handle network type form
 function doAdminNetworkProcessHandlenetworktypeForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // Load network data
                $networkData = getNetworkDataById(getRequestParameter('network'));
 
@@ -742,7 +742,7 @@ function doAdminNetworkProcessHandlenetworktypeForm () {
 // Handle network request parameter form
 function doAdminNetworkProcessHandlerequestparamsForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // Init cache array
                $GLOBALS['network_params_disabled'] = array();
 
@@ -812,7 +812,7 @@ function doAdminNetworkProcessHandlerequestparamsForm () {
 // Changes given networks
 function doAdminNetworkProcessChangenetworkForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // By default nothing is updated
                $updated = 0;
 
@@ -857,7 +857,7 @@ function doAdminNetworkProcessChangenetworkForm () {
 // Removes given networks
 function doAdminNetworkProcessRemovenetworkForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // By default nothing is removed
                $removed = 0;
 
@@ -926,7 +926,7 @@ function doAdminNetworkProcessAddnetworktypeForm () {
 // Changes given network type handlers
 function doAdminNetworkProcessChangenetworktypeForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // By default nothing is updated
                $updated = 0;
 
@@ -977,7 +977,7 @@ function doAdminNetworkProcessChangenetworktypeForm () {
 // Changes given network request parameters
 function doAdminNetworkProcessChangenetworkparamForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // By default nothing is updated
                $updated = 0;
 
@@ -1028,7 +1028,7 @@ function doAdminNetworkProcessChangenetworkparamForm () {
 // Removes given network type handlers
 function doAdminNetworkProcessRemovenetworktypeForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // By default nothing is removed
                $removed = 0;
 
@@ -1055,7 +1055,7 @@ function doAdminNetworkProcessRemovenetworktypeForm () {
 // Removes given network request parameters
 function doAdminNetworkProcessRemovenetworkparamForm () {
        // Do we have selections?
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // By default nothing is removed
                $removed = 0;