Skip to content

Commit bae4fc9

Browse files
committed
Merge branch '4.4-dev' into upmerge
2 parents 8b087bb + 4b2afc3 commit bae4fc9

File tree

2 files changed

+34
-97
lines changed

2 files changed

+34
-97
lines changed

administrator/language/en-GB/plg_quickicon_eos.ini

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,11 @@
33
; License GNU General Public License version 2 or later; see LICENSE.txt
44
; Note : All ini files need to be saved as UTF-8
55

6-
PLG_QUICKICON_EOS="Quick Icon - Joomla! End Of Support Notification"
7-
PLG_QUICKICON_EOS_GROUPNAME_EOS="End Of Support"
8-
PLG_QUICKICON_EOS_GROUPNAME_INFO="Upgrade Information"
9-
PLG_QUICKICON_EOS_GROUPNAME_WARNING="Support Status"
10-
PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED="<p>Support has ended for your version of Joomla. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to the next version</a> as soon as possible.</p>"
11-
PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED_SHORT="Support has ended for your version of Joomla <span class=\"icon-new-tab\"></span>"
12-
PLG_QUICKICON_EOS_MESSAGE_INFO_01="<p>The latest version of Joomla has arrived! Find out all that it has to offer you. Check the landing page for <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">its features</a> and improvements.</p>"
13-
PLG_QUICKICON_EOS_MESSAGE_INFO_01_SHORT="The latest version of Joomla has arrived! <span class=\"icon-new-tab\"></span>"
14-
PLG_QUICKICON_EOS_MESSAGE_INFO_02="<p>When is the time to migrate to the next version? Once the extensions your site needs are compatible. Learn <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">how to use the Pre-Update Checker</a>. </p>"
15-
PLG_QUICKICON_EOS_MESSAGE_INFO_02_SHORT="Use Pre-Update Check for extension compatibility <span class=\"icon-new-tab\"></span>"
16-
PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY="<p>This version of Joomla has entered security only mode. Support ends %1$s. Start <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">planning to migrate</a> to the next version of Joomla today.</p>"
17-
PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY_SHORT="This version of Joomla ends support on %1$s. <span class=\"icon-new-tab\"></span>"
18-
PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING="<p>Support ends on %1$s for this version of Joomla. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to the latest version of Joomla</a> as soon as possible.</p>"
19-
PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING_SHORT="End of support for this version of Joomla on %1$s. <span class=\"icon-new-tab\"></span>"
6+
PLG_QUICKICON_EOS="Quick Icon - Joomla 4.4 End Of Support Notification"
7+
PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED="<p>Support has ended for your version of Joomla 4.4. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Upgrade to Joomla 5</a> as soon as possible.</p>"
8+
PLG_QUICKICON_EOS_MESSAGE_INFO_01="<p>Joomla 5 has arrived! Find out all that Joomla 5 has to offer you. Check the landing page for <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Joomla 5 features</a> and improvements.</p>"
9+
PLG_QUICKICON_EOS_MESSAGE_INFO_02="<p>When is the time to upgrade to Joomla 5? Once the extensions your site needs are compatible. Learn <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\"> how to use the Pre-Update Checker</a>.</p>"
10+
PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY="<p>Joomla 4.4 has entered security only mode. Support ends %1$s. Start <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">planning to upgrade</a> to Joomla 5 today.</p>"
11+
PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING="<p>Support ends on %1$s for Joomla 4.4 <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Upgrade to Joomla 5</a> as soon as possible.</p>"
2012
PLG_QUICKICON_EOS_SNOOZE_BUTTON="Snooze this message for all users"
21-
PLG_QUICKICON_EOS_XML_DESCRIPTION="Checks for the end of support status of Joomla and notifies you when visiting the Control Panel page."
22-
; Below is a copy of the 3.10 text definitions for reference.
23-
PLG_QUICKICON_EOS310="Quick Icon - Joomla 3.10 End Of Support Notification"
24-
PLG_QUICKICON_EOS310_GROUPNAME_EOS="End Of Support"
25-
PLG_QUICKICON_EOS310_GROUPNAME_INFO="Upgrade Information"
26-
PLG_QUICKICON_EOS310_GROUPNAME_WARNING="Support Status"
27-
PLG_QUICKICON_EOS310_MESSAGE_ERROR_SUPPORT_ENDED="<p>Support has ended for your version of Joomla 3.10. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to Joomla 4</a> <span class=\"icon-new-tab\"></span>as soon as possible.</p>"
28-
PLG_QUICKICON_EOS310_MESSAGE_ERROR_SUPPORT_ENDED_SHORT="Support has ended for Joomla 3.10 <span class=\"icon-new-tab\"></span>"
29-
PLG_QUICKICON_EOS310_MESSAGE_INFO_01="<p>Joomla 4 has arrived! Find out all that Joomla 4 has to offer you. Check the landing page for <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Joomla 4 features</a> <span class=\"icon-new-tab\"></span>and improvements.</p>"
30-
PLG_QUICKICON_EOS310_MESSAGE_INFO_01_SHORT="Joomla 4 has arrived! <span class=\"icon-new-tab\"></span>"
31-
PLG_QUICKICON_EOS310_MESSAGE_INFO_02="<p>When is the time to migrate to Joomla 4? Once the extensions your site needs are compatible. Learn <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">how to use the Pre-Update Checker</a>. <span class=\"icon-new-tab\"></span></p>"
32-
PLG_QUICKICON_EOS310_MESSAGE_INFO_02_SHORT="Use Pre-Update Check for extension compatibility <span class=\"icon-new-tab\"></span>"
33-
PLG_QUICKICON_EOS310_MESSAGE_WARNING_SECURITY_ONLY="<p>Joomla 3.10 has entered security only mode. Support ends %1$s. Start <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">planning to migrate</a> <span class=\"icon-new-tab\"></span>to Joomla 4 today.</p>"
34-
PLG_QUICKICON_EOS310_MESSAGE_WARNING_SECURITY_ONLY_SHORT="Joomla 3.10 to end support on %1$s. <span class=\"icon-new-tab\"></span>"
35-
PLG_QUICKICON_EOS310_MESSAGE_WARNING_SUPPORT_ENDING="<p>Support ends on %1$s for Joomla 3.10. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Migrate to Joomla 4</a> <span class=\"icon-new-tab\"></span>as soon as possible.</p>"
36-
PLG_QUICKICON_EOS310_MESSAGE_WARNING_SUPPORT_ENDING_SHORT="End of support for Joomla 3.10 on %1$s. <span class=\"icon-new-tab\"></span>"
37-
PLG_QUICKICON_EOS310_SNOOZE_BUTTON="Snooze this message for all users"
38-
PLG_QUICKICON_EOS310_XML_DESCRIPTION="Checks for the end of support status of Joomla 3.10 and notifies you when visiting the Control Panel page."
39-
;All of this text is currently being written for Joomla 5 by Phil Watson and Jenn Gress. TODO
13+
PLG_QUICKICON_EOS_XML_DESCRIPTION="Checks for the end of support status of Joomla 4.4 and notifies you when visiting the Control Panel page."

plugins/quickicon/eos/src/Extension/Eos.php

Lines changed: 27 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,10 @@ public static function getSubscribedEvents(): array
8282
}
8383

8484
/**
85-
* Check and show the the alert and quickicon message.
85+
* Check and show the the alert.
8686
*
8787
* This method is called when the Quick Icons module is constructing its set
88-
* of icons. You can return an array which defines a single icon and it will
89-
* be rendered right after the stock Quick Icons.
88+
* of icons.
9089
*
9190
* @param QuickIconsEvent $event The event object
9291
*
@@ -128,27 +127,6 @@ public function getEndOfServiceNotification(QuickIconsEvent $event): void
128127

129128
$app->getDocument()->getWebAssetManager()
130129
->registerAndUseScript('plg_quickicon_eos.script', 'plg_quickicon_eos/snooze.js', [], ['type' => 'module']);
131-
132-
$result = $event->getArgument('result', []);
133-
$messageTextQuickIcon = sprintf(
134-
$app->getLanguage()->_($this->currentMessage['quickiconText']),
135-
HTMLHelper::_('date', Eos::EOS_DATE, $app->getLanguage()->_('DATE_FORMAT_LC3'))
136-
);
137-
138-
// The message as quickicon
139-
140-
$result[] = [
141-
[
142-
'link' => $this->currentMessage['messageLink'],
143-
'image' => $this->currentMessage['image'],
144-
'text' => $messageTextQuickIcon,
145-
'id' => 'plg_quickicon_eos',
146-
'group' => $this->currentMessage['groupText'],
147-
'class' => $this->currentMessage['messageType'],
148-
],
149-
];
150-
151-
$event->setArgument('result', $result);
152130
}
153131

154132
/**
@@ -209,70 +187,55 @@ private function getMessageInfo(int $monthsUntilEOS, int $inverted): array
209187
// The EOS date has passed - Support has ended
210188
if ($inverted === 1) {
211189
return [
212-
'id' => 5,
213-
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED',
214-
'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED_SHORT',
215-
'messageType' => 'error',
216-
'image' => 'fa fa-life-ring',
217-
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
218-
'groupText' => 'PLG_QUICKICON_EOS_GROUPNAME_EOS',
219-
'snoozable' => false,
190+
'id' => 5,
191+
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_ERROR_SUPPORT_ENDED',
192+
'messageType' => 'error',
193+
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step',
194+
'snoozable' => false,
220195
];
221196
}
222197

223198
// The security support is ending in 6 months
224199
if ($monthsUntilEOS < 6) {
225200
return [
226-
'id' => 4,
227-
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING',
228-
'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING_SHORT',
229-
'messageType' => 'warning',
230-
'image' => 'fa fa-life-ring',
231-
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
232-
'groupText' => 'PLG_QUICKICON_EOS_GROUPNAME_WARNING',
233-
'snoozable' => true,
201+
'id' => 4,
202+
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SUPPORT_ENDING',
203+
'messageType' => 'warning',
204+
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step',
205+
'snoozable' => true,
234206
];
235207
}
236208

237209
// We are in security only mode now, 12 month to go from now on
238210
if ($monthsUntilEOS < 12) {
239211
return [
240-
'id' => 3,
241-
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY',
242-
'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY_SHORT',
243-
'messageType' => 'warning',
244-
'image' => 'fa fa-life-ring',
245-
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
246-
'groupText' => 'PLG_QUICKICON_EOS_GROUPNAME_WARNING',
247-
'snoozable' => true,
212+
'id' => 3,
213+
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_WARNING_SECURITY_ONLY',
214+
'messageType' => 'warning',
215+
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step',
216+
'snoozable' => true,
248217
];
249218
}
250219

251220
// We still have 16 month to go, lets remind our users about the pre upgrade checker
252221
if ($monthsUntilEOS < 16) {
253222
return [
254-
'id' => 2,
255-
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_02',
256-
'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_02_SHORT',
257-
'messageType' => 'info',
258-
'image' => 'fa fa-life-ring',
259-
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check',
260-
'groupText' => 'PLG_QUICKICON_EOS_GROUPNAME_INFO',
261-
'snoozable' => true,
223+
'id' => 2,
224+
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_02',
225+
'messageType' => 'info',
226+
'messageLink' => 'https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check',
227+
'snoozable' => true,
262228
];
263229
}
264230

265231
// Lets start our messages 2 month after the initial release, still 22 month to go
266232
if ($monthsUntilEOS < 22) {
267233
return [
268-
'id' => 1,
269-
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_01',
270-
'quickiconText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_01_SHORT',
271-
'messageType' => 'info',
272-
'image' => 'fa fa-life-ring',
273-
'messageLink' => 'https://www.joomla.org/4/#features',
274-
'groupText' => 'PLG_QUICKICON_EOS_GROUPNAME_INFO',
275-
'snoozable' => true,
234+
'id' => 1,
235+
'messageText' => 'PLG_QUICKICON_EOS_MESSAGE_INFO_01',
236+
'messageType' => 'info',
237+
'messageLink' => 'https://joomla.org/5',
238+
'snoozable' => true,
276239
];
277240
}
278241

0 commit comments

Comments
 (0)