From 942f5a6dc0381885b939083d309188e98284e5b7 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Sun, 4 Apr 2021 16:06:01 +0300 Subject: [PATCH] Warning on outdated manifest format --- .../com_jedchecker/language/en-GB/en-GB.com_jedchecker.ini | 1 + .../components/com_jedchecker/libraries/rules/xmlinfo.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/administrator/components/com_jedchecker/language/en-GB/en-GB.com_jedchecker.ini b/administrator/components/com_jedchecker/language/en-GB/en-GB.com_jedchecker.ini index 6742542..39047a4 100644 --- a/administrator/components/com_jedchecker/language/en-GB/en-GB.com_jedchecker.ini +++ b/administrator/components/com_jedchecker/language/en-GB/en-GB.com_jedchecker.ini @@ -40,6 +40,7 @@ COM_JEDCHECKER_LEAVE_A_REVIEW_JED="If you use this component, please post a rati COM_JEDCHECKER_INFO="Info" COM_JEDCHECKER_INFO_XML="Information about extension xml files" COM_JEDCHECKER_INFO_XML_DESC="The install name of your extension must match your listing name on JED. We scan the xml files and find the value of the name tag. Useful information for the "filename and install as" fields in the jed submission form" +COM_JEDCHECKER_INFO_XML_MANIFEST_OUTDATED="Manifest file uses outdated format. Use <extension> instead of <install> root tag name." COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: %s" COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s" COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s" diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php b/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php index b0bc918..e470ae1 100644 --- a/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php +++ b/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php @@ -107,6 +107,11 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule // Check if this is an extension manifest // 1.5 uses 'install', 1.6+ uses 'extension' + if ($xml->getName() === 'install') + { + $this->report->addWarning($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_MANIFEST_OUTDATED')); + } + if ($xml->getName() !== 'extension') { return false;