-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5] add2scheduler-updatenotification #40788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
44f832c
updnft2task
alikon 2ff3e4f
better name
alikon 88fe7c4
Update administrator/components/com_admin/script.php
alikon 8f4fcda
Update administrator/components/com_admin/script.php
alikon 73da95a
cache_timeout
alikon fcb1192
lastrun
alikon 1942166
cs
alikon 4552456
Merge branch '5.0-dev' into updatenotfication2task
alikon 370afe9
Merge branch '5.0-dev' into updatenotfication2task
alikon da7a409
Merge branch '5.0-dev' into updatenotfication2task
alikon 7b7c047
Update administrator/components/com_admin/script.php
alikon 196808d
Update installation/sql/mysql/base.sql
alikon 083e8d5
Update installation/sql/postgresql/base.sql
alikon 3fe4435
Update administrator/components/com_admin/script.php
alikon 17a733e
Update administrator/components/com_admin/script.php
alikon 9e8fe79
Update plugins/task/updatenotification/src/Extension/UpdateNotificati…
alikon 632354a
Update plugins/task/updatenotification/src/Extension/UpdateNotificati…
alikon 63ff70f
Update plugins/task/updatenotification/src/Extension/UpdateNotificati…
alikon 8794b73
Merge branch '5.0-dev' into updatenotfication2task
alikon 301a079
Merge branch '5.0-dev' into updatenotfication2task
alikon a6a88d8
delete system plugin
alikon db3e4e8
settingson install
alikon 526f839
bettersyntax
alikon 213efe2
Merge remote-tracking branch 'upstream/5.0-dev' into updatenotficatio…
richard67 dfcc617
Merge branch '5.0-dev' into updatenotfication2task
alikon eafd89a
hardcode-nestedset
alikon 8bfc527
hardcode-nestedset
alikon 21305b9
grr
alikon 11c3136
hardcode-nestedset
alikon c3ff33a
hardcode-nestedset
alikon 4a1ca8d
prefix
alikon a5c710d
fix pgsql
alikon 7003f72
Merge branch '5.0-dev' into updatenotfication2task
alikon be5bbe4
Rename 5.0.0-2023-06-18.sql to 5.0.0-2023-08-04.sql
alikon f6a8a28
Rename 5.0.0-2023-06-18.sql to 5.0.0-2023-08-04.sql
alikon 94c0090
Merge branch '5.0-dev' into updatenotfication2task
alikon 523f494
Merge branch '5.0-dev' into updatenotfication2task
richard67 c9b795b
Update administrator/language/en-GB/plg_task_updatenotification.ini
alikon c5740a4
Update administrator/components/com_admin/script.php
alikon cb76cc4
Update administrator/language/en-GB/plg_task_updatenotification.ini
alikon 8ad5ac3
Update plugins/task/updatenotification/services/provider.php
alikon 5269e50
Update plugins/task/updatenotification/forms/sendForm.xml
alikon 737e8b9
Update administrator/language/en-GB/plg_task_updatenotification.ini
alikon 2500b2e
remove old language files
heelc29 4ba9f45
add mail template for new installations
heelc29 c67b05a
remove postinstall message
heelc29 43dfb68
alphasort
heelc29 35e486b
upper case
heelc29 485cd0e
class Text not imported
heelc29 09610f2
Merge pull request #24 from heelc29/5.0/40788-updatenotfication
alikon ed00600
feedback from session gc
alikon a5f9c11
remove old mail template on update
heelc29 354a74b
set created_by for new task
heelc29 9a51eca
cs
heelc29 02f0e49
Merge pull request #25 from heelc29/5.0/40788-updatenotfication
alikon b22576b
Merge branch '5.0-dev' into updatenotfication2task
alikon 58dd800
exec-day
alikon 682e7e2
Update administrator/components/com_admin/script.php
alikon e827a79
Merge branch '5.0-dev' into updatenotfication2task
richard67 ee577d7
Merge branch '5.0-dev' into updatenotfication2task
alikon 6f4a333
Rename 5.0.0-2023-08-04.sql to 5.0.0-2023-08-24.sql
alikon 553b06b
Rename 5.0.0-2023-08-04.sql to 5.0.0-2023-08-24.sql
alikon a629736
Merge branch '5.0-dev' into updatenotfication2task
richard67 b723e80
Merge branch '5.0-dev' into updatenotfication2task
alikon 77de9e6
Merge branch '5.0-dev' into updatenotfication2task
alikon 0313d90
Rename 5.0.0-2023-08-24.sql to 5.0.0-2023-08-30.sql
richard67 45d8cbe
Rename 5.0.0-2023-08-24.sql to 5.0.0-2023-08-30.sql
richard67 e92099f
Merge branch '5.0-dev' into updatenotfication2task
richard67 7ab7fcf
SQL CS
richard67 ee9c042
SQL CS
richard67 6458a2e
Fix plugin name in email body
richard67 c6f1cd8
Single quotes
richard67 825bd90
Revert text function for plugins
richard67 06c11a7
Remove extra reference assignment for dispatcher argument
richard67 122813e
Set last and next execution and locked of task on new installation
richard67 27ba35c
SQL CS
richard67 e8d3476
Task should be enabled on a new installation
richard67 dd8d54c
Make sure to have UTC timestamps on PostgreSQL
richard67 94fde83
Rename 5.0.0-2023-08-30.sql to 5.0.0-2023-09-02.sql
richard67 b9d1794
Rename 5.0.0-2023-08-30.sql to 5.0.0-2023-09-02.sql
richard67 ba35fad
Merge branch '5.0-dev' into updatenotfication2task
richard67 ffdce58
Merge branch '5.0-dev' into updatenotfication2task
richard67 82087e2
Merge branch '5.0-dev' into updatenotfication2task
richard67 67a603e
Merge branch '5.0-dev' into updatenotfication2task
richard67 1d873fa
Merge branch '5.0-dev' into updatenotfication2task
richard67 0e850b8
Merge branch '5.0-dev' into updatenotfication2task
richard67 858f4d3
Fix lastrun default on update
richard67 9a0d63f
Add parameters to SQL insert of task
richard67 bd2ddd7
Merge branch 'updatenotfication2task' of https://github.com/alikon/jo…
richard67 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
administrator/components/com_admin/sql/updates/mysql/5.0.0-2023-06-18.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES | ||
| ('plg_task_updatenotification', 'plugin', 'updatenotification', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0); | ||
| INSERT INTO `#__mail_templates` (`template_id`, `extension`, `language`, `subject`, `body`, `htmlbody`, `attachments`, `params`) VALUES | ||
| ('plg_task_updatenotification.mail', 'plg_task_updatenotification', '', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_SUBJECT', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_BODY', '', '', '{"tags":["newversion","curversion","sitename","url","link","releasenews"]}'); |
4 changes: 4 additions & 0 deletions
4
administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-06-18.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| INSERT INTO "#__extensions" ("name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "checked_out", "checked_out_time", "ordering", "state") VALUES | ||
| ('plg_task_updatenotification', 'plugin', 'updatenotification', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0); | ||
| INSERT INTO "#__mail_templates" ("template_id", "extension", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES | ||
| ('plg_task_updatenotification.mail', 'plg_task_updatenotification', '', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_SUBJECT', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_BODY', '', '', '{"tags":["newversion","curversion","sitename","url","link","releasenews"]}'); |
19 changes: 19 additions & 0 deletions
19
administrator/language/en-GB/plg_task_updatenotification.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| PLG_TASK_UPDATENOTIFICATION="Task - Joomla! Update Notification" | ||
alikon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| PLG_TASK_UPDATENOTIFICATION_EMAIL_DESC="A comma separated list of the email addresses which will receive the update notification emails. The addresses in the list MUST belong to existing users of your site who have the Super User privilege. If none of the listed emails belongs to Super Users, or if it's left blank, all Super Users of this site will receive the update notification email." | ||
| PLG_TASK_UPDATENOTIFICATION_EMAIL_LBL="Super User Emails" | ||
| PLG_TASK_UPDATENOTIFICATION_SEND_TITLE="Joomla! Update Notification" | ||
| PLG_TASK_UPDATENOTIFICATION_SEND_DESC="This task periodically checks for the availability of new Joomla! versions. When one is found it will send you an email, reminding you to update. You can customise the email at System → Mail Templates." | ||
| PLG_TASK_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_DESC="Select a language for the update notification emails. Set to Auto to send them in the site language at the time." | ||
| PLG_TASK_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_LBL="Email Language" | ||
| PLG_TASK_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_NONE="Auto" | ||
| PLG_TASK_UPDATENOTIFICATION_EMAIL_BODY="This email IS NOT sent by the Joomla! project. It is sent automatically by your own site,\n{SITENAME} - {URL} \n\n================================================================================\nUPDATE INFORMATION\n================================================================================\n\nYour site has discovered that there is an updated version of Joomla! available for download.\n\nJoomla! version currently installed: {CURVERSION}\nJoomla! version available for installation: {NEWVERSION}\n\nThis email is sent to you by your site to remind you of this fact.\nThe Joomla! project will never contact you directly about available updates of Joomla! on your site.\n\n================================================================================\nUPDATE INSTRUCTIONS\n================================================================================\n\nTo install the update on {SITENAME} please select the following link. (If the URL is not a link, copy & paste it to your browser).\n\nUpdate link: {LINK}\n\nRelease News can be found here: {RELEASENEWS}\n\n================================================================================\nWHY AM I RECEIVING THIS EMAIL?\n================================================================================\n\nThis email has been automatically sent by a plugin provided by Joomla!, the software which powers your site.\nThis plugin looks for updated versions of Joomla! and sends an email notification to its administrators.\nYou will receive several similar emails from your site until you either update the software or disable these emails.\n\nTo disable these emails, please unpublish the 'System - Joomla! Update Notification' plugin in the Plugin Manager on your site.\n\nIf you do not understand what Joomla! is and what you need to do please do not contact the Joomla! project.\nThey are NOT sending you this email and they cannot help you. Instead, please contact the person who built or manages your site.\n\nIf you are the person who built or manages your website, please note that this plugin may have been activated automatically when you installed or updated Joomla! on your site.\n\n================================================================================\nWHO SENT ME THIS EMAIL?\n================================================================================\n\nThis email is sent to you by your own site, {SITENAME}" | ||
alikon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ; You can use the following merge codes: | ||
| ; {NEWVERSION} New Joomla! version, e.g. 1.2.3 | ||
| ; {CURVERSION} Currently installed Joomla! version, e.g. 1.2.0 | ||
| ; {SITENAME} Site name, as set in Global Configuration. | ||
| ; {URL} URL of the site's frontend page. | ||
| ; {LINK} Update URL (link to com_joomlaupdate, will request login if the Super User isn't already logged in). | ||
| ; {RELEASENEWS} URL to the release news on joomla.org | ||
| ; \n Newline character. Use it to start a new line in the email. | ||
| PLG_TASK_UPDATENOTIFICATION_EMAIL_SUBJECT="Joomla! Update available for {SITENAME} – {URL}" | ||
alikon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| PLG_TASK_UPDATENOTIFICATION_XML_DESCRIPTION="This task periodically checks for the availability of new Joomla! versions. When one is found it will send you an email, reminding you to update. You can customise the email at System → Mail Templates." | ||
7 changes: 7 additions & 0 deletions
7
administrator/language/en-GB/plg_task_updatenotification.sys.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ; Joomla! Project | ||
| ; (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> | ||
| ; License GNU General Public License version 2 or later; see LICENSE.txt | ||
| ; Note : All ini files need to be saved as UTF-8 | ||
|
|
||
| PLG_TASK_UPDATENOTIFICATION="Task - Joomla! Update Notification" | ||
| PLG_TASK_UPDATENOTIFICATION_XML_DESCRIPTION="This task periodically checks for the availability of new Joomla! versions. When one is found it will send you an email, reminding you to update. You can customise the email at System → Mail Templates." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <form> | ||
| <fields name="params"> | ||
| <fieldset name="task_params"> | ||
| <field | ||
| name="email" | ||
| type="text" | ||
| label="PLG_TASK_UPDATENOTIFICATION_EMAIL_LBL" | ||
| description="PLG_TASK_UPDATENOTIFICATION_EMAIL_DESC" | ||
| default="" | ||
| /> | ||
| <field | ||
| name="language_override" | ||
| type="language" | ||
| label="PLG_TASK_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_LBL" | ||
| description="PLG_TASK_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_DESC" | ||
| default="" | ||
| client="administrator" | ||
| > | ||
| <option value="">PLG_TASK_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_NONE</option> | ||
| </field> | ||
alikon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </fieldset> | ||
| </fields> | ||
| </form> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * @package Joomla.Plugin | ||
| * @subpackage Task.updatenotification | ||
| * | ||
| * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> | ||
| * @license GNU General Public License version 2 or later; see LICENSE.txt | ||
| */ | ||
|
|
||
| defined('_JEXEC') or die; | ||
|
|
||
| use Joomla\CMS\Extension\PluginInterface; | ||
| use Joomla\CMS\Factory; | ||
| use Joomla\CMS\Plugin\PluginHelper; | ||
| use Joomla\Database\DatabaseInterface; | ||
| use Joomla\DI\Container; | ||
| use Joomla\DI\ServiceProviderInterface; | ||
| use Joomla\Event\DispatcherInterface; | ||
| use Joomla\Plugin\Task\UpdateNotification\Extension\UpdateNotification; | ||
|
|
||
| return new class () implements ServiceProviderInterface { | ||
| /** | ||
| * Registers the service provider with a DI container. | ||
| * | ||
| * @param Container $container The DI container. | ||
| * | ||
| * @return void | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| public function register(Container $container) | ||
alikon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| $container->set( | ||
| PluginInterface::class, | ||
| function (Container $container) { | ||
| $dispatcher = $container->get(DispatcherInterface::class); | ||
|
|
||
| $plugin = new UpdateNotification( | ||
| $dispatcher, | ||
| (array) PluginHelper::getPlugin('task', 'updatenotification') | ||
richard67 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ); | ||
| $plugin->setApplication(Factory::getApplication()); | ||
| $plugin->setDatabase($container->get(DatabaseInterface::class)); | ||
|
|
||
| return $plugin; | ||
| } | ||
| ); | ||
| } | ||
| }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.