Extension ext-coupon continued, naming convention, many improvements:
[mailer.git] / inc / filter / admins_filter.php
index 81beec2b1920ee17ab0fe9d758a2c26169479687..677f1d295b8d951952b2b769f57f15545084a4fe 100644 (file)
@@ -43,18 +43,21 @@ if (!defined('__SECURITY')) {
 // Filter for adding extra data to the query
 function FILTER_ADD_EXTRA_SQL_DATA ($add = '') {
        // Is the admins extension updated? (should be!)
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (isExtensionInstalledAndNewer('admins', '0.3.0')) $add .= ', `default_acl` AS def_acl';
        if (isExtensionInstalledAndNewer('admins', '0.6.7')) $add .= ', `la_mode`';
        if (isExtensionInstalledAndNewer('admins', '0.7.2')) $add .= ', `login_failures`, UNIX_TIMESTAMP(`last_failure`) AS last_failure';
        if (isExtensionInstalledAndNewer('admins', '0.7.3')) $add .= ', `expert_settings`, `expert_warning`';
 
        // Return it
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $add;
 }
 
 // Reset the login failures
 function FILTER_RESET_ADMINS_LOGIN_FAILURES ($data) {
        // Store it in session
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        setSession('mailer_admin_failures'    , getAdminLoginFailures($data['id']));
        setSession('mailer_admin_last_failure', getAdminLastFailure($data['id']));
 
@@ -70,12 +73,14 @@ function FILTER_RESET_ADMINS_LOGIN_FAILURES ($data) {
        rebuildCache('admin');
 
        // Return the data for further processing
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $data;
 }
 
 // Count the login failure
 function FILTER_COUNT_ADMINS_LOGIN_FAILURE ($data) {
        // Prepare update data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        $postData['login'][getCurrentAdminId()]          = $data['login'];
        $postData['login_failures'][getCurrentAdminId()] = '`login_failures`+1';
        $postData['last_failure'][getCurrentAdminId()]   = 'NOW()';
@@ -87,12 +92,14 @@ function FILTER_COUNT_ADMINS_LOGIN_FAILURE ($data) {
        rebuildCache('admin');
 
        // Return the data for further processing
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $data;
 }
 
 // Rehashes the given plain admin password and stores it the database
 function FILTER_REHASH_ADMINS_PASSWORD ($data) {
        // Generate new hash
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        $newHash = generateHash($data['plain_pass']);
 
        // Prepare update data
@@ -110,6 +117,7 @@ function FILTER_REHASH_ADMINS_PASSWORD ($data) {
        rebuildCache('admin');
 
        // Return the data for further processing
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $data;
 }