diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php index 6687429..b090d22 100644 --- a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php +++ b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php @@ -13,6 +13,9 @@ defined('_JEXEC') or die('Restricted access'); // Include the rule base class require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/rule.php'; +// Include the helper class +require_once JPATH_COMPONENT_ADMINISTRATOR . '/libraries/helper.php'; + /** * class JedcheckerRulesXMLManifest @@ -100,7 +103,7 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule public function check() { // Find all XML files of the extension - $files = JFolder::files($this->basedir, '\.xml$', true, true); + $files = JEDCheckerHelper::findManifests($this->basedir); // Iterate through all the xml files foreach ($files as $file) @@ -128,12 +131,6 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule return false; } - // Check if this is an extension manifest - if ($xml->getName() !== 'extension') - { - return false; - } - // Check extension type $type = (string) $xml['type']; @@ -205,7 +202,7 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule /** * @param SimpleXMLElement $node XML node object - * @param string $ruleset rulest name in the DTD array + * @param string $ruleset ruleset name in the DTD array * * @return void */ diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_component.json b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_component.json index 5ca36f4..54d4037 100644 --- a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_component.json +++ b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_component.json @@ -104,6 +104,9 @@ "charset", "driver" ], + "schemapath": [ + "type" + ], "server": [ "name", "priority", diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_file.json b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_file.json index 902338e..7400979 100644 --- a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_file.json +++ b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_file.json @@ -73,6 +73,9 @@ "charset", "driver" ], + "schemapath": [ + "type" + ], "server": [ "name", "priority", diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_library.json b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_library.json index b886e4f..a5917ad 100644 --- a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_library.json +++ b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_library.json @@ -82,6 +82,9 @@ "charset", "driver" ], + "schemapath": [ + "type" + ], "server": [ "name", "priority", diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_template.json b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_template.json index dbceb31..60ddfd6 100644 --- a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_template.json +++ b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest/dtd_template.json @@ -106,6 +106,9 @@ "charset", "driver" ], + "schemapath": [ + "type" + ], "server": [ "name", "priority",