33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-27 15:26:36 +00:00

Merge PR #117 into develop

This commit is contained in:
Llewellyn van der Merwe 2021-08-31 12:04:07 +02:00
commit 94c9e2fc41
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C

View File

@ -15,6 +15,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 JedcheckerRulesXMLlicense
*
@ -60,7 +63,7 @@ class JedcheckerRulesXMLlicense 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)
@ -88,13 +91,6 @@ class JedcheckerRulesXMLlicense extends JEDcheckerRule
return true;
}
// Check if this is an extension manifest
// 1.5 uses 'install', 1.6 uses 'extension'
if ($xml->getName() != 'install' && $xml->getName() != 'extension')
{
return true;
}
// Check if there's a license tag
if (!isset($xml->license))
{