From 69105928f5601f57795b1019afd1db8255d1847d Mon Sep 17 00:00:00 2001 From: Hypolite Petovan <hypolite@mrpetovan.com> Date: Fri, 6 Sep 2019 08:33:19 -0400 Subject: [PATCH 1/3] Use destination URL when provided in Contact::magicLink --- src/Model/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index ffdee6aa0e..0a202cef41 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2668,7 +2668,7 @@ class Contact extends BaseObject // Prevents endless loop in case only a non-public contact exists for the contact URL unset($data['uid']); - return self::magicLinkByContact($data, $contact_url); + return self::magicLinkByContact($data, $url ?: $contact_url); } /** From c2c3bb207414defb35e38fccc180a1d730e9d5cf Mon Sep 17 00:00:00 2001 From: Hypolite Petovan <hypolite@mrpetovan.com> Date: Fri, 6 Sep 2019 08:33:41 -0400 Subject: [PATCH 2/3] Remove deprecated defaults() call in mod/events --- mod/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/events.php b/mod/events.php index 86cec9a7d4..82257a8481 100644 --- a/mod/events.php +++ b/mod/events.php @@ -321,7 +321,7 @@ function events_content(App $a) // put the event parametes in an array so we can better transmit them $event_params = [ - 'event_id' => intval(defaults($_GET, 'id', 0)), + 'event_id' => intval($_GET['id'] ?? 0), 'start' => $start, 'finish' => $finish, 'adjust_start' => $adjust_start, From 4d411c284ff6c7c3971e872ceb19d83bb56525ea Mon Sep 17 00:00:00 2001 From: Hypolite Petovan <hypolite@mrpetovan.com> Date: Fri, 6 Sep 2019 08:34:22 -0400 Subject: [PATCH 3/3] [frio] Improve accessibility of event Link to source button --- view/theme/frio/templates/event.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/frio/templates/event.tpl b/view/theme/frio/templates/event.tpl index 39695819af..9a6f747e57 100644 --- a/view/theme/frio/templates/event.tpl +++ b/view/theme/frio/templates/event.tpl @@ -18,7 +18,7 @@ {{if $event.edit}}<button type="button" class="btn" onclick="eventEdit('{{$event.edit.0}}')" title="{{$event.edit.1}}"><i class="fa fa-pencil" aria-hidden="true"></i></button>{{/if}} {{if $event.copy}}<button type="button" class="btn" onclick="eventEdit('{{$event.copy.0}}')" title="{{$event.copy.1}}"><i class="fa fa-files-o" aria-hidden="true"></i></button>{{/if}} {{if $event.drop}}<a href="{{$event.drop.0}}" onclick="return confirmDelete();" title="{{$event.drop.1}}" class="drop-event-link btn"><i class="fa fa-trash-o" aria-hidden="true"></i></a>{{/if}} - {{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" class="plink-event-link btn "><i class="fa fa-external-link" aria-hidden="true"></i></a>{{/if}} + {{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" class="plink-event-link btn" aria-label="{{$event.plink.1}}"><i class="fa fa-external-link" aria-hidden="true"></i></a>{{/if}} </div> <div class="clear"></div> </div>