return;
}
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
// Get current day (01 to 31), month (01 to 12) and year (4-digits year)
$day = getDay();
$month = getMonth();
`userid` ASC",
array($day, $month, $value), __FILE__, __LINE__);
-if (SQL_NUMROWS($result_birthday) > 0) {
+if (!SQL_HASZERONUMS($result_birthday)) {
// Start sending out birthday mails
while ($content = SQL_FETCHARRAY($result_birthday)) {
// Calculate own timestamp for birthday and today
// @TODO 4 is hard-coded here, should we move it out in config?
for ($idx = '0'; $idx < 4; $idx++) {
- $content['check'] .= generateRandomCode('8', mt_rand(0, $month.$day), $content['userid'], ($age * ($idx + 1)));
+ $content['check'] .= generateRandomCode('8', mt_rand(0, $month . $day), $content['userid'], ($age * ($idx + 1)));
} // END - for
// Insert row into database
SQL_FREERESULT($result_birthday);
} // END - if
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
// [EOF]
?>