Repository navigation
Commit 4ef0e61
isWorkingDay(): ignore the Holiday add-on when its files are missing
isWorkingDay() did an unguarded require_once of
modules/holiday/holiday_functions.class.php whenever the holiday module
row was active. If the add-on's folder was removed or never deployed
(a server move, deleting the folder instead of uninstalling), that was a
fatal error, and task scheduling and every calendar view stopped
loading.
Treat the add-on as present only when it is active, the file exists,
and it defines HolidayFunctions::isHoliday(). The check is still made
once per request.
The add-on (web2project/modules-holiday, master) still ships
holiday/holiday_functions.class.php with a static
HolidayFunctions::isHoliday($date, $userid = 0).
Checked from the CLI with an active holiday row: without the folder
the old code is fatal and the new one falls back to the working-day
setting; with a stub add-on, its holiday is non-working.
Fixes #452.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01K315UgUazvx8qspudiHKjg1 parent 5591b79 commit 4ef0e61
1 file changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
172 | 181 | | |
173 | 182 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 183 | + | |
| 184 | + | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
| |||
0 commit comments