Renamed function so it might be more understandable
[mailer.git] / inc / filters.php
index d05ec3d5e1999ef350b71dff38c53adbfc6ec4c0..0b07e67b7eec01c714a4e8d4944ab105e3c5f55b 100644 (file)
@@ -109,10 +109,10 @@ function FILTER_FLUSH_FILTERS () {
                // Update all counters
                foreach ($GLOBALS['cache_array']['filter']['counter'] as $filterName => $filterArray) {
                        // Walk through all filters
-                       foreach ($filterArray as $filterFunction => $cnt) {
+                       foreach ($filterArray as $filterFunction => $count) {
                                // Construct and add the query
                                addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1",
-                                       bigintval($cnt),
+                                       bigintval($count),
                                        $filterName,
                                        $filterFunction
                                ));
@@ -330,7 +330,7 @@ function FILTER_INIT_RANDOMIZER () {
        setConfigEntry('_PRIME', 591623);
 
        // Calculate "entropy" with the prime number (for code generation)
-       setConfigEntry('_ADD', (getPrime() * getPrime() / (pi() * getConfig('code_length') + 1)));
+       setConfigEntry('_ADD', (getPrime() * getPrime() / (pi() * getCodeLength() + 1)));
 
        // Simply init the randomizer with seed and _ADD value
        mt_srand(generateSeed() + getConfig('_ADD'));
@@ -580,7 +580,7 @@ function FILTER_RUN_RESET_INCLUDES () {
                $currMonth = getMonth();
 
                // Has it changed?
-               if ((getConfig('last_month') != $currMonth) || (isMonthlyResetDebugEnabled())) {
+               if ((getLastMonth() != $currMonth) || (isMonthlyResetDebugEnabled())) {
                        // Include monthly reset scripts
                        mergeIncludePool('reset', getArrayFromDirectory('inc/monthly/', 'monthly_'));
 
@@ -1020,7 +1020,7 @@ function FILTER_SET_CURRENT_DATE () {
        setConfigEntry('CURRENT_DATE', generateDateTime(time(), '3'));
 
        // Timestamp for yesterday, today ... all at 00:00 am
-       setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getConfig('ONE_DAY')));
+       setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getOneDay()));
        setConfigEntry('START_TDAY', makeTime(0, 0, 0, time()));
 }