We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e61c2b commit da8a93eCopy full SHA for da8a93e
main/calendar/agenda.php
@@ -81,7 +81,12 @@ function add_image_form() {
81
Event::event_access_tool(TOOL_CALENDAR_EVENT);
82
83
if ($type === 'fromjs') {
84
- $id_list = explode('_', $eventId);
+ // split the "id" parameter only if string and there are _ separators
85
+ if (preg_match('/_/', $eventId)) {
86
+ $id_list = explode('_', $eventId);
87
+ } else {
88
+ $id_list = $eventId;
89
+ }
90
$eventId = $id_list[1];
91
$event_type = $id_list[0];
92
$event_type = $event_type === 'platform' ? 'admin' : $event_type;
@@ -306,6 +311,8 @@ function add_image_form() {
306
311
"url" => $url,
307
312
"name" => get_lang('Agenda'),
308
313
];
314
+} else {
315
+ $actionName = '';
309
316
}
310
317
318
// Tool introduction
0 commit comments