]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-unlock_emails.php
Performance hacks, encapsulation and more EL code usage:
[mailer.git] / inc / modules / admin / what-unlock_emails.php
index dda8be3586256490b0b190f371be54bc803dc8c2..35c99671363bcb5474a24701629b45ba26e8eba9 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -43,7 +41,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 // Check for mails
 $result_main = SQL_QUERY("SELECT
@@ -82,9 +80,6 @@ LIMIT 1",
                                        // Load data
                                        $content = SQL_FETCHARRAY($result);
 
-                                       // Free result
-                                       SQL_FREERESULT($result);
-
                                        // Is the surfbar installed?
                                        // @TODO Rewrite these if-blocks to a filter
                                        if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) {
@@ -112,6 +107,9 @@ LIMIT 1",
                                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='NEW' WHERE `id`=%s AND `data_type`='ADMIN' LIMIT 1",
                                                array($id), __FILE__, __LINE__);
                                } // END - if
+
+                               // Free result
+                               SQL_FREERESULT($result);
                        } // END - foreach
 
                        // Set message
@@ -123,7 +121,7 @@ LIMIT 1",
 
                // Mails unlocked for mail delivery
                loadTemplate('admin_settings_saved', false, $message);
-       } elseif (isPostRequestParameterSet(('reject'))) {
+       } elseif (isPostRequestParameterSet('reject')) {
                if (ifPostContainsSelections()) {
                        // Reject mail orders
                        $OUT = '';
@@ -168,7 +166,7 @@ LIMIT 1",
                        // Nothing selected
                        loadTemplate('admin_settings_saved', false, '{--ADMIN_MAILS_NOTHING_CHECKED--}');
                }
-       } elseif ((isFormSent('lock')) && (ifPostContainsSelections()) && (getConfig('url_blacklist') == 'Y')) {
+       } elseif ((isFormSent('lock')) && (ifPostContainsSelections()) && (isUrlBlacklistEnabled())) {
                // Lock URLs
                foreach (postRequestParameter('sel') as $id => $url) {
                        // Secure id number
@@ -208,7 +206,7 @@ LIMIT 1",
 
                // Load main template
                loadTemplate('admin_unlock_emails', false, $content);
-       } elseif ((isFormSent('lock')) && (getConfig('url_blacklist') != 'Y')) {
+       } elseif ((isFormSent('lock')) && (!isUrlBlacklistEnabled())) {
                // URL blacklist not activated
                loadTemplate('admin_settings_saved', false, '{--ADMIN_URL_BLACKLIST_DISABLED--}');
        } else {