Changeset 3432146
- Timestamp:
- 01/04/2026 03:34:10 PM (7 weeks ago)
- File:
-
- 1 edited
-
opening-hours/trunk/index.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
opening-hours/trunk/index.php
r3390038 r3432146 2339 2339 ); 2340 2340 sort($closure_timestrings); 2341 $day_start_offset = round(($closure_timestrings[0] - $this->offset - $this->today_timestamp) /DAY_IN_SECONDS);2342 $day_end_display_offset = round(($closure_timestrings[1] - $this->offset - $this->today_timestamp) /DAY_IN_SECONDS);2341 $day_start_offset = round(($closure_timestrings[0] - $this->offset - $this->today_timestamp) / DAY_IN_SECONDS); 2342 $day_end_display_offset = round(($closure_timestrings[1] - $this->offset - $this->today_timestamp) / DAY_IN_SECONDS); 2343 2343 $day_end_offset = $day_end_display_offset + 1; 2344 2344 $closure_date_start = $closure_date_start_display = $this->get_day_timestamp($day_start_offset); … … 2905 2905 { 2906 2906 $end = ($end - WEEK_IN_SECONDS - $start > YEAR_IN_SECONDS) ? $start + YEAR_IN_SECONDS + WEEK_IN_SECONDS : $end; 2907 $count = ceil(($end - $start) /DAY_IN_SECONDS);2907 $count = ceil(($end - $start) / DAY_IN_SECONDS); 2908 2908 } 2909 2909 else 2910 2910 { 2911 2911 $end = ($end - WEEK_IN_SECONDS - $this->today_timestamp > YEAR_IN_SECONDS) ? $this->today_timestamp + YEAR_IN_SECONDS + WEEK_IN_SECONDS : $end; 2912 $count = ceil(($end - $this->today_timestamp) /DAY_IN_SECONDS);2912 $count = ceil(($end - $this->today_timestamp) / DAY_IN_SECONDS); 2913 2913 } 2914 2914 } … … 2918 2918 { 2919 2919 $end = ($end - $start > 31 * DAY_IN_SECONDS) ? $this->today_timestamp + 31 * DAY_IN_SECONDS : $end; 2920 $count = ceil(($end - $start) /DAY_IN_SECONDS);2920 $count = ceil(($end - $start) / DAY_IN_SECONDS); 2921 2921 } 2922 2922 else 2923 2923 { 2924 2924 $end = ($end - $this->today_timestamp > 31 * DAY_IN_SECONDS) ? $this->today_timestamp + 31 * DAY_IN_SECONDS : $end; 2925 $count = ceil(($end - $this->today_timestamp) /DAY_IN_SECONDS);2925 $count = ceil(($end - $this->today_timestamp) / DAY_IN_SECONDS); 2926 2926 } 2927 2927 } … … 2936 2936 $closed_show = (!isset($closed_show) || isset($closed_show) && $closed_show); 2937 2937 $week_start = (isset($week_start) && is_numeric($week_start)) ? (($week_start < 0) ? (($week_start == -2) ? $this->yesterday : $this->today) : $week_start) : $this->week_start; 2938 $start_modifier = (is_numeric($start) && abs(round(($start - $this->today_timestamp) /DAY_IN_SECONDS)) <= 731) ? round(($start - $this->today_timestamp)/DAY_IN_SECONDS) : 0;2938 $start_modifier = (is_numeric($start) && abs(round(($start - $this->today_timestamp) / DAY_IN_SECONDS)) <= 731) ? round(($start - $this->today_timestamp) / DAY_IN_SECONDS) : 0; 2939 2939 2940 2940 for ($i = (($start_modifier != 0 || $this->today == $week_start) ? 0 : -7); $i <= ((!$regular && ($special || $closure)) ? 372 : 31); $i++) … … 4810 4810 $start = (is_string($start) && preg_match('#^(\d{4})[ .-/](\d{1,2})[ .-/](\d{1,2})$#', $start, $m)) ? mktime(0, 0, ($this->offset * -1), $m[2], $m[3], $m[1]) : ((is_numeric($start) && $start >= -91 && $start <= 724) ? intval($start) : NULL); 4811 4811 $end = (is_string($end) && preg_match('#^(\d{4})[ .-/](\d{1,2})[ .-/](\d{1,2})$#', $end, $m)) ? mktime(0, 0, ($this->offset * -1), $m[2], $m[3] + 1, $m[1]) : ((is_numeric($end) && $end >= -7 && $end <= 731) ? intval($end) : NULL); 4812 $count = (is_numeric($count) && $count >= 1 && $count <= ((!$regular && $special) ? 366: 31)) ? intval($count) : NULL;4812 $count = (is_numeric($count) && $count >= 1 && $count <= ((!$regular && $special) ? 400 : 31)) ? intval($count) : NULL; 4813 4813 $update_immediate = (array_key_exists('update', $atts) && is_string($update) && preg_match('/^(?:immediate|instant)(?:ly)?$/i', $update)); 4814 4814 $update = ($update_immediate || array_key_exists('update', $atts) && (is_bool($update) && $update || is_string($update) && preg_match('/^(?:t(?:rue)?|y(?:es)?|1|on|show)$/i', $update))); … … 5601 5601 $start = (is_string($start) && preg_match('#^(\d{4})[ .-/](\d{1,2})[ .-/](\d{1,2})$#', $start, $m)) ? mktime(0, 0, ($this->offset * -1), $m[2], $m[3], $m[1]) : ((is_numeric($start) && $start >= -91 && $start <= 724) ? intval($start) : NULL); 5602 5602 $end = (is_string($end) && preg_match('#^(\d{4})[ .-/](\d{1,2})[ .-/](\d{1,2})$#', $end, $m)) ? mktime(0, 0, ($this->offset * -1), $m[2], $m[3] + 1, $m[1]) : ((is_numeric($end) && $end >= -7 && $end <= 731) ? intval($end) : NULL); 5603 $count = (is_numeric($count) && $count >= 1 && $count <= 366) ? intval($count) : NULL;5603 $count = (is_numeric($count) && $count >= 1 && $count <= 400) ? intval($count) : NULL; 5604 5604 $week_start = (is_numeric($week_start) && $week_start < 0 || is_string($week_start) && preg_match('/^(?:today|now|yesterday|-\d+)$/i', $week_start)) ? ((is_numeric($week_start) && $week_start == -2 || is_string($week_start) && preg_match('/^(?:yesterday|-2)$/i', $week_start)) ? $this->yesterday : $this->today) : ((is_numeric($week_start) && $week_start >= 0 && $week_start <= 6) ? intval($week_start) : $this->week_start); 5605 5605 $empty = (is_bool($empty) && $empty || is_string($empty) && preg_match('/^(?:t(?:rue)?|y(?:es)?|1|on|show)$/i', $empty));
Note: See TracChangeset
for help on using the changeset viewer.