33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-12-11 05:42:27 +00:00

switch to JEDCheckerHelper::findManifests

This commit is contained in:
Denis Ryabov 2021-05-11 21:05:54 +03:00
parent 88969d8fc4
commit 373f47482e

View File

@ -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
@ -109,7 +112,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)
@ -137,12 +140,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'];