]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Theme renamed, missing dash added (minor fixes)
[mailer.git] / inc / filters.php
index 1a03451c330ef7d4759dc0a5002ba3c6b05e73aa..2a099fe8026f25f775003715dfd625cc9c175825 100644 (file)
@@ -548,7 +548,7 @@ function FILTER_RUN_RESET_INCLUDES () {
        // Is the config entry set?
        if (isExtensionInstalledAndNewer('sql_patches', '0.4.2')) {
                // Create current week mark
-               $currWeek = date('W', time());
+               $currWeek = getWeek();
 
                // Has it changed?
                if ((getConfig('last_week') != $currWeek) || ((isConfigEntrySet('DEBUG_WEEKLY')) && (getConfig('DEBUG_WEEKLY') == 'Y'))) {
@@ -560,7 +560,7 @@ function FILTER_RUN_RESET_INCLUDES () {
                } // END - if
 
                // Create current month mark
-               $currMonth = date('m', time());
+               $currMonth = getMonth();
 
                // Has it changed?
                if ((getConfig('last_month') != $currMonth) || ((isConfigEntrySet('DEBUG_MONTHLY')) && (getConfig('DEBUG_MONTHLY') == 'Y'))) {
@@ -708,7 +708,7 @@ function FILTER_RUN_DAILY_RESET () {
        if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalled('sql_patches'))) return;
 
        // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
-       if (((date('d', getConfig('last_update')) != date('d', time())) || ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y'))) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (getOutputMode() != 1)) {
+       if (((getDay(getConfig('last_update')) != getDay()) || ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y'))) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (getOutputMode() != 1)) {
                // Tell every module we are in reset-mode!
                doReset();
        } // END - if
@@ -940,7 +940,7 @@ function FILTER_DO_LOGIN_ADMIN ($data) {
        $GLOBALS['admin_login_success'] = ((
                setSession('admin_md5', encodeHashForCookie($data['pass_hash']))
        ) && (
-               setSession('admin_login', $data['login'])
+               setSession('admin_id', $data['id'])
        ) && (
                setSession('admin_last', time())
        ));