mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-12-28 12:30:44 +00:00
rule to found missed method="upgrade"
This commit is contained in:
parent
3961bbf319
commit
a426ccfd0e
@ -89,3 +89,4 @@ COM_JEDCHECKER_MANIFEST_MULTIPLE_FOUND="Node <%1$s> contains multiple <
|
||||
COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILD="Node <%1$s> contains unknown <%2$s> element"
|
||||
COM_JEDCHECKER_MANIFEST_EMPTY_CHILD="Found empty <%s> element"
|
||||
COM_JEDCHECKER_MANIFEST_MENU_UNUSED_ATTRIBUTE="Menu item attribute '%s' is not used with 'link' attribute"
|
||||
COM_JEDCHECKER_MANIFEST_MISSED_METHOD_UPGRADE="Without the method="upgrade" attribute the extension package cannot be upgraded"
|
||||
|
@ -167,6 +167,12 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
|
||||
return true;
|
||||
}
|
||||
|
||||
// warn if method="upgrade" attribute is not found
|
||||
if ((string) $xml['method'] !== 'upgrade')
|
||||
{
|
||||
$this->report->addWarning($file, JText::_('COM_JEDCHECKER_MANIFEST_MISSED_METHOD_UPGRADE'));
|
||||
}
|
||||
|
||||
$data = json_decode(file_get_contents($json_filename), true);
|
||||
$this->DTDNodeRules = $data['nodes'];
|
||||
$this->DTDAttrRules = $data['attributes'];
|
||||
|
Loading…
Reference in New Issue
Block a user