A big software update is on its way!

Status
Not open for further replies.
Christmas was cancelled

It was a coding error that triggered the xmas decorations for only one day! All sorted now

Spot the mistake:

PHP:
       $time = XenForo_Application::$time;
     
        // CHRISTMAS (1ST DEC - 7TH JAN)
        $christmasStart = mktime(0, 0, 0, 12, 1, date('Y'));
        $christmasEnd = mktime(23, 59, 59, 12, 1, date('Y'));
        $christmas1Start = mktime(0, 0, 0, 1, 1, date('Y'));
        $christmas1End = mktime(23, 59, 59, 1, 7, date('Y'));
     
        if ($christmasStart <= $time && $christmasEnd >= $time) {
            return "showChristmasHeader";
        } else if ($christmas1Start <= $time && $christmas1End >= $time) {
            return "showChristmasHeader";
        }
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…