More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / admin / what-list_rallyes.php
index 65cf9f270d6ecba6aacfa69343325ad6289ebf25..fa0d0a2ee912fbb408efd0230f5eec737ae9c30f 100644 (file)
@@ -104,7 +104,7 @@ if (isGetRequestParameterSet('rallye')) {
        runFilterChain('run_sqls');
 } elseif (isFormSent('remove')) {
        // Delete rallyes
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // Init SQLs
                initSqls();
 
@@ -130,7 +130,7 @@ if (isGetRequestParameterSet('rallye')) {
        }
 } elseif (isFormSent('change')) {
        // Change rallye
-       if (countSelection(postRequestParameter('title')) > 0) {
+       if (ifPostContainsSelections('title')) {
                // Init SQLs
                initSqls();
 
@@ -179,7 +179,7 @@ LIMIT 1",
 
 if (isFormSent('edit')) {
        // Check for selections
-       if (countPostSelection() > 0) {
+       if (ifPostContainsSelections()) {
                // Make all selected and deactivated rallyes editable
                $OUT = '';
                foreach (postRequestParameter('sel') as $id => $selected) {
@@ -239,7 +239,7 @@ WHERE
 ORDER BY
        `userid` ASC",
                array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                $OUT = '';
                $content['rallye'] = getRequestParameter('rallye');
                while ($row = SQL_FETCHARRAY($result)) {
@@ -295,7 +295,7 @@ ORDER BY
        `start_time` DESC", __FILE__, __LINE__);
 
        // Records found?
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // List found rallyes
                $OUT = '';
                while ($data = SQL_FETCHARRAY($result)) {