mailer project continued:
[mailer.git] / inc / modules / admin / what-list_country.php
index 2523a39fe130f4b84638341d2a92997284007791..35cb31746597b727eef8dba7671e790fe4e6ac5a 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -79,7 +79,9 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl
                'title' => '{--ADMIN_COUNTRY_ACTIVATION_NEXT_LINK--}'
        ));
 } elseif (((isFormSent('edit')) || (isPostRequestElementSet('delete'))) && (isPostRequestElementSet('id'))) {
-       if (count(postRequestElement('id')) > 0) {
+       // Do we have entries?
+       if (ifPostContainsSelections('id')) {
+               // Is the proper form sent?
                if (isFormSent('edit')) {
                        // Edit template
                        $row    = 'admin_edit_country_row';
@@ -155,7 +157,7 @@ LIMIT 1");
        } elseif ((isFormSent('do_delete')) && (isPostRequestElementSet('id'))) {
                // Remove
                $IDs = implode(',', array_keys(postRequestElement('id')));
-               addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestElement('id'))."");
+               addSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (' . $IDs . ') LIMIT ' . countPostSelection('id') . '');
 
                // Create message
                $message = '{--ADMIN_COUNTRIES_REMOVED--}';