29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-26 07:13:21 +00:00

Template Overrides message on update (#38449)

* Template Overrides message on update

Adds a link

* Update message

* Update administrator/language/en-GB/plg_installer_override.ini

Co-authored-by: Konstantin Kolos <k0nstantinkolos88@gmail.com>

Co-authored-by: Konstantin Kolos <k0nstantinkolos88@gmail.com>
This commit is contained in:
Brian Teeman 2022-08-31 23:11:09 +01:00 committed by GitHub
parent e63d4b68f3
commit 8bd655118d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,7 @@
; Note : All ini files need to be saved as UTF-8
PLG_INSTALLER_OVERRIDE="Installer - Override"
PLG_INSTALLER_OVERRIDE_N_FILE_UPDATED="%d Overridden files have changed."
PLG_INSTALLER_OVERRIDE_N_FILE_UPDATED_1="Overridden file has changed."
PLG_INSTALLER_OVERRIDE_N_FILE_UPDATED="%1$s files that you have an override for in your template have been updated and you should <a href=\"%2$s\">review those changes</a>."
PLG_INSTALLER_OVERRIDE_N_FILE_UPDATED_1="A file that you have an override for in your template has been updated and you should <a href=\"%2$s\">review those changes</a>."
PLG_INSTALLER_OVERRIDE_PLUGIN_XML_DESCRIPTION="This plugin enables notifications and handling of overrides after an update in case of changes."

View File

@ -186,10 +186,11 @@ class PlgInstallerOverride extends CMSPlugin
*/
public function finalize($result)
{
$num = count($result);
$num = count($result);
$link = 'index.php?option=com_templates&view=templates';
if ($num != 0) {
$this->app->enqueueMessage(Text::plural('PLG_INSTALLER_OVERRIDE_N_FILE_UPDATED', $num), 'notice');
$this->app->enqueueMessage(Text::plural('PLG_INSTALLER_OVERRIDE_N_FILE_UPDATED', $num, $link), 'notice');
$this->saveOverrides($result);
}