mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-12-31 21:51:46 +00:00
add support of any attribute (by using '*' as value)
This commit is contained in:
parent
62a887092c
commit
f7353bf312
@ -171,12 +171,17 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
|
|||||||
{
|
{
|
||||||
// Check attributes
|
// Check attributes
|
||||||
$DTDattributes = isset($this->DTDAttrRules[$name]) ? $this->DTDAttrRules[$name] : array();
|
$DTDattributes = isset($this->DTDAttrRules[$name]) ? $this->DTDAttrRules[$name] : array();
|
||||||
foreach ($node->attributes() as $attr)
|
|
||||||
|
if (isset($DTDattributes[0]) && $DTDattributes[0] !== '*')
|
||||||
{
|
{
|
||||||
$attr_name = (string)$attr->getName();
|
foreach ($node->attributes() as $attr)
|
||||||
if (!in_array($attr_name, $DTDattributes, true))
|
|
||||||
{
|
{
|
||||||
$this->warnings[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_ATTRIBUTE', $name, $attr_name);
|
$attr_name = (string)$attr->getName();
|
||||||
|
|
||||||
|
if (!in_array($attr_name, $DTDattributes, true))
|
||||||
|
{
|
||||||
|
$this->warnings[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_ATTRIBUTE', $name, $attr_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user