| @@ 237-240 (lines=4) @@ | ||
| 234 | $_REQUEST['eventid'] = (int) $_REQUEST['eventid']; |
|
| 235 | ||
| 236 | // We want a fairly compact version of the time, but as close as possible to the user's settings. |
|
| 237 | if (preg_match('~%[HkIlMpPrRSTX](?:[^%]*%[HkIlMpPrRSTX])*~', $user_info['time_format'], $matches) == 0 || empty($matches[0])) |
|
| 238 | $time_string = '%k:%M'; |
|
| 239 | else |
|
| 240 | $time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]); |
|
| 241 | ||
| 242 | $js_time_string = str_replace( |
|
| 243 | array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
| @@ 256-259 (lines=4) @@ | ||
| 253 | isAllowedTo('calendar_post'); |
|
| 254 | ||
| 255 | // We want a fairly compact version of the time, but as close as possible to the user's settings. |
|
| 256 | if (preg_match('~%[HkIlMpPrRSTX](?:[^%]*%[HkIlMpPrRSTX])*~', $user_info['time_format'], $matches) == 0 || empty($matches[0])) |
|
| 257 | $time_string = '%k:%M'; |
|
| 258 | else |
|
| 259 | $time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]); |
|
| 260 | ||
| 261 | $js_time_string = str_replace( |
|
| 262 | array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
| @@ 1422-1425 (lines=4) @@ | ||
| 1419 | $date_format = $matches[0]; |
|
| 1420 | ||
| 1421 | // We want a fairly compact version of the time, but as close as possible to the user's settings. |
|
| 1422 | if (preg_match('~%[HkIlMpPrRSTX](?:[^%]*%[HkIlMpPrRSTX])*~', $user_info['time_format'], $matches) == 0 || empty($matches[0])) |
|
| 1423 | $time_format = '%k:%M'; |
|
| 1424 | else |
|
| 1425 | $time_format = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]); |
|
| 1426 | ||
| 1427 | // Should this be an all day event? |
|
| 1428 | $allday = (empty($row['start_time']) || empty($row['end_time']) || empty($row['timezone']) || !in_array($row['timezone'], timezone_identifiers_list(DateTimeZone::ALL_WITH_BC))) ? true : false; |
|